@modelcontextprotocol/ext-apps - v0.4.0
    Preparing search index...

    Interface McpUiHostContext

    Rich context about the host environment provided to Guest UIs.

    interface McpUiHostContext {
        availableDisplayModes?: string[];
        containerDimensions?: ({ height: number; } | { maxHeight?: number | undefined; }) & ({ width: number; } | { maxWidth?: number | undefined; });
        deviceCapabilities?: { hover?: boolean; touch?: boolean };
        displayMode?: McpUiDisplayMode;
        locale?: string;
        platform?: "web" | "desktop" | "mobile";
        safeAreaInsets?: {
            bottom: number;
            left: number;
            right: number;
            top: number;
        };
        styles?: McpUiHostStyles;
        theme?: McpUiTheme;
        timeZone?: string;
        toolInfo?: {
            id?: RequestId;
            tool: {
                _meta?: { [key: string]: unknown };
                annotations?: {
                    destructiveHint?: boolean;
                    idempotentHint?: boolean;
                    openWorldHint?: boolean;
                    readOnlyHint?: boolean;
                    title?: string;
                };
                description?: string;
                execution?: { taskSupport?: "optional"
                | "required"
                | "forbidden" };
                icons?: {
                    mimeType?: string;
                    sizes?: string[];
                    src: string;
                    theme?: "light" | "dark";
                }[];
                inputSchema: {
                    properties?: { [key: string]: object };
                    required?: string[];
                    type: "object";
                    [key: string]: unknown;
                };
                name: string;
                outputSchema?: {
                    properties?: { [key: string]: object };
                    required?: string[];
                    type: "object";
                    [key: string]: unknown;
                };
                title?: string;
            };
        };
        userAgent?: string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Allow additional properties for forward compatibility.

    Index

    Properties

    availableDisplayModes?: string[]

    Display modes the host supports.

    containerDimensions?: ({ height: number; } | { maxHeight?: number | undefined; }) & ({ width: number; } | { maxWidth?: number | undefined; })

    Container dimensions. Represents the dimensions of the iframe or other container holding the app. Specify either width or maxWidth, and either height or maxHeight.

    deviceCapabilities?: { hover?: boolean; touch?: boolean }

    Type Declaration

    • Optionalhover?: boolean

      Whether the device supports hover interactions.

    • Optionaltouch?: boolean

      Whether the device supports touch input.

    Device input capabilities.

    displayMode?: McpUiDisplayMode

    How the UI is currently displayed.

    locale?: string

    User's language and region preference in BCP 47 format.

    platform?: "web" | "desktop" | "mobile"

    Platform type for responsive design decisions.

    safeAreaInsets?: { bottom: number; left: number; right: number; top: number }

    Type Declaration

    • bottom: number

      Bottom safe area inset in pixels.

    • left: number

      Left safe area inset in pixels.

    • right: number

      Right safe area inset in pixels.

    • top: number

      Top safe area inset in pixels.

    Mobile safe area boundaries in pixels.

    Style configuration for theming the app.

    theme?: McpUiTheme

    Current color theme preference.

    timeZone?: string

    User's timezone in IANA format.

    toolInfo?: {
        id?: RequestId;
        tool: {
            _meta?: { [key: string]: unknown };
            annotations?: {
                destructiveHint?: boolean;
                idempotentHint?: boolean;
                openWorldHint?: boolean;
                readOnlyHint?: boolean;
                title?: string;
            };
            description?: string;
            execution?: { taskSupport?: "optional"
            | "required"
            | "forbidden" };
            icons?: {
                mimeType?: string;
                sizes?: string[];
                src: string;
                theme?: "light" | "dark";
            }[];
            inputSchema: {
                properties?: { [key: string]: object };
                required?: string[];
                type: "object";
                [key: string]: unknown;
            };
            name: string;
            outputSchema?: {
                properties?: { [key: string]: object };
                required?: string[];
                type: "object";
                [key: string]: unknown;
            };
            title?: string;
        };
    }

    Type Declaration

    • Optionalid?: RequestId

      JSON-RPC id of the tools/call request.

    • tool: {
          _meta?: { [key: string]: unknown };
          annotations?: {
              destructiveHint?: boolean;
              idempotentHint?: boolean;
              openWorldHint?: boolean;
              readOnlyHint?: boolean;
              title?: string;
          };
          description?: string;
          execution?: { taskSupport?: "optional"
          | "required"
          | "forbidden" };
          icons?: {
              mimeType?: string;
              sizes?: string[];
              src: string;
              theme?: "light" | "dark";
          }[];
          inputSchema: {
              properties?: { [key: string]: object };
              required?: string[];
              type: "object";
              [key: string]: unknown;
          };
          name: string;
          outputSchema?: {
              properties?: { [key: string]: object };
              required?: string[];
              type: "object";
              [key: string]: unknown;
          };
          title?: string;
      }

      Tool definition including name, inputSchema, etc.

    Metadata of the tool call that instantiated this App.

    userAgent?: string

    Host application identifier.