Interface McpUiHostContext 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 ; } Properties Optionalavailable Display Modes availableDisplayModes ?: string []
Optionalcontainer Dimensions containerDimensions ?: ({ height: number; } | { maxHeight?: number | undefined; }) & ({ width: number; } | { maxWidth?: number | undefined; })
Optionaldevice Capabilities deviceCapabilities ?: { hover ?: boolean ; touch ?: boolean }
Type Declaration Optionalhover ?: boolean Optionaltouch ?: boolean Optionallocale locale ?: string
platform ?: "web" | "desktop" | "mobile"
Optionalsafe Area Insets safeAreaInsets ?: { bottom : number ; left : number ; right : number ; top : number }
Type Declaration bottom : number left : number right : number top : number Optionaltime Zone 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 ; } ; }
Type Declaration Optionalid ?: 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 ; } Optionaluser Agent userAgent ?: string
Description
Rich context about the host environment provided to Guest UIs.