Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/map-server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
registerAppTool,
registerAppResource,
RESOURCE_MIME_TYPE,
RESOURCE_URI_META_KEY,
} from "@modelcontextprotocol/ext-apps/server";
import { startServer } from "./server-utils.js";

Expand Down Expand Up @@ -173,7 +172,7 @@ export function createServer(): McpServer {
.optional()
.describe("Optional label to display on the map"),
},
_meta: { [RESOURCE_URI_META_KEY]: RESOURCE_URI },
_meta: { ui: { resourceUri: RESOURCE_URI } },
},
async ({ west, south, east, north, label }): Promise<CallToolResult> => ({
content: [
Expand Down
2 changes: 1 addition & 1 deletion examples/qr-server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mcp = FastMCP("QR Server", port=PORT, stateless_http=True)


@mcp.tool(meta={"ui/resourceUri": WIDGET_URI})
@mcp.tool(meta={"ui": {"resourceUri": WIDGET_URI}})
def generate_qr(
text: str,
box_size: int = 10,
Expand Down
3 changes: 1 addition & 2 deletions examples/transcript-server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
registerAppTool,
registerAppResource,
RESOURCE_MIME_TYPE,
RESOURCE_URI_META_KEY,
} from "@modelcontextprotocol/ext-apps/server";
import { startServer } from "./server-utils.js";

Expand All @@ -35,7 +34,7 @@ export function createServer(): McpServer {
description:
"Opens a live speech transcription interface using the Web Speech API.",
inputSchema: {},
_meta: { [RESOURCE_URI_META_KEY]: RESOURCE_URI },
_meta: { ui: { resourceUri: RESOURCE_URI } },
},
async (): Promise<CallToolResult> => {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export interface McpUiAppResourceConfig extends ResourceMetadata {
* description: "Get current weather for a location",
* inputSchema: { location: z.string() },
* _meta: {
* [RESOURCE_URI_META_KEY]: "ui://weather/widget.html",
* ui: { resourceUri: "ui://weather/widget.html" },
* },
* }, async (args) => {
* const weather = await fetchWeather(args.location);
Expand Down