@modelcontextprotocol/ext-apps - v1.1.2
    Preparing search index...

    Variable RESOURCE_URI_META_KEYConst

    RESOURCE_URI_META_KEY: "ui/resourceUri"

    Metadata key for associating a UI resource URI with a tool.

    MCP servers include this key in tool definition metadata (via tools/list) to indicate which UI resource should be displayed when the tool is called. When hosts see a tool with this metadata, they fetch and render the corresponding App.

    Note: This constant is provided for reference. App developers typically don't need to use it directly. Prefer using registerAppTool with the _meta.ui.resourceUri format instead.

    server.registerTool(
    "weather",
    {
    description: "Get weather forecast",
    _meta: {
    [RESOURCE_URI_META_KEY]: "ui://weather/forecast",
    },
    },
    handler,
    );
    // Check tool definition metadata (from tools/list response):
    const uiUri = tool._meta?.[RESOURCE_URI_META_KEY];
    if (typeof uiUri === "string" && uiUri.startsWith("ui://")) {
    // Fetch the resource and display the UI
    }