MCP Apps Kit - v0.5.0
    Preparing search index...

    Interface HostContext

    Runtime context from the host platform

    interface HostContext {
        availableDisplayModes: string[];
        containerDimensions?: ContainerDimensions;
        deviceCapabilities?: DeviceCapabilities;
        displayMode: "inline" | "fullscreen" | "pip";
        locale: string;
        platform: "web" | "desktop" | "mobile";
        safeAreaInsets?: SafeAreaInsets;
        styles?: HostStyles;
        theme: "light" | "dark";
        timeZone?: string;
        userAgent?: string;
        view?: string;
        viewport: Viewport;
    }
    Index

    Properties

    availableDisplayModes: string[]

    Available display modes

    containerDimensions?: ContainerDimensions

    Container dimensions from host (ext-apps v0.4.0+)

    More explicit than viewport - indicates whether dimensions are fixed (host-controlled) or flexible (app-controlled up to max).

    deviceCapabilities?: DeviceCapabilities

    Device capabilities

    displayMode: "inline" | "fullscreen" | "pip"

    Current display mode

    locale: string

    BCP 47 locale code

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

    Platform type

    safeAreaInsets?: SafeAreaInsets

    Safe area insets (mobile)

    styles?: HostStyles

    Host-provided styling

    theme: "light" | "dark"

    Current theme

    timeZone?: string

    IANA timezone

    userAgent?: string

    User agent string

    view?: string

    View identifier for multi-view widgets (ChatGPT only). Allows widgets to have different views/screens.

    viewport: Viewport

    Viewport dimensions