OptionalavailableDisplay modes the host supports. Apps can use this to offer mode-switching UI if applicable.
OptionaldeviceDevice input capabilities
Optionalhover?: booleanWhether the device supports hover interactions
Optionaltouch?: booleanWhether the device supports touch input
OptionaldisplayHow the UI is currently displayed.
OptionallocaleUser's language and region preference in BCP 47 format.
OptionalplatformPlatform type for responsive design decisions.
OptionalsafeMobile safe area boundaries in pixels. Used to avoid notches, rounded corners, and system UI on mobile devices.
Bottom safe area inset in pixels
Left safe area inset in pixels
Right safe area inset in pixels
Top safe area inset in pixels
OptionalthemeCurrent color theme preference.
OptionaltimeUser's timezone in IANA format.
OptionaltoolMetadata of the tool call that instantiated this App
JSON-RPC id of the tools/call request
Tool definition including name, inputSchema, etc.
OptionaluserHost application identifier.
OptionalviewportCurrent and maximum dimensions available to the UI
Current viewport height in pixels
OptionalmaxHeight?: numberMaximum available height in pixels (if constrained)
OptionalmaxWidth?: numberMaximum available width in pixels (if constrained)
Current viewport width in pixels
Rich context about the host environment provided to Guest UIs.
Hosts provide this context in the McpUiInitializeResult response and send updates via McpUiHostContextChangedNotification when values change. All fields are optional and Guest UIs should handle missing fields gracefully.
Example