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

    Options for configuring the useApp hook.

    Note: This interface does NOT expose App options like autoResize. The hook creates the App with default options (autoResize: true). If you need custom App options, create the App manually instead of using this hook.

    • useApp for the hook that uses these options
    • useAutoResize for manual auto-resize control with custom App options
    interface UseAppOptions {
        appInfo: {
            description?: string;
            icons?: {
                mimeType?: string;
                sizes?: string[];
                src: string;
                theme?: "light" | "dark";
            }[];
            name: string;
            title?: string;
            version: string;
            websiteUrl?: string;
        };
        capabilities: McpUiAppCapabilities;
        onAppCreated?: (app: App) => void;
    }
    Index

    Properties

    appInfo: {
        description?: string;
        icons?: {
            mimeType?: string;
            sizes?: string[];
            src: string;
            theme?: "light" | "dark";
        }[];
        name: string;
        title?: string;
        version: string;
        websiteUrl?: string;
    }

    App identification (name and version)

    capabilities: McpUiAppCapabilities

    Declares what features this app supports.

    onAppCreated?: (app: App) => void

    Called after App is created but before connection.

    Use this to register request/notification handlers that need to be in place before the initialization handshake completes.

    Type Declaration

      • (app: App): void
      • Parameters

        • app: App

          The newly created App instance

        Returns void

    useApp({
    appInfo: { name: "MyApp", version: "1.0.0" },
    capabilities: {},
    onAppCreated: (app) => {
    app.ontoolresult = (result) => {
    console.log("Tool result:", result);
    };
    },
    });