Tool name
Tool arguments
Tool result
Configure logging transport settings
Logging configuration
Connect to the host platform Called during client initialization
Get file download URL May throw on unsupported platforms
File ID
Download URL
Get host capabilities Returns capabilities advertised during handshake
Get current host context
Get host version information Returns host name and version
Get persisted widget state On MCP Apps: Returns null (silent no-op for graceful degradation) On ChatGPT: Returns session-scoped state
State or null if not set
Get current tool input
Get current tool metadata
Get current tool output
Check if the adapter is connected
Log to host console
Log level
Data to log
Subscribe to host context changes
Callback for context changes
Unsubscribe function
Subscribe to teardown events
Callback for teardown
Unsubscribe function
Subscribe to tool cancellation
Callback for cancellation
Unsubscribe function
Subscribe to tool input changes
Callback for tool input
Unsubscribe function
Subscribe to partial/streaming tool input
Unsubscribe function
Subscribe to tool results
Callback for tool results
Unsubscribe function
Open an external link
URL to open
Read an MCP resource
Resource URI
Resource contents
Request widget close May be a no-op on some platforms
Request a different display mode
Target display mode
Actual mode applied
Send a log message to the host via the protocol
Log level
Data to log
Send batched log entries to the server
Array of log entries to send
Number of entries processed
Send a message to the conversation
Message content
Send size changed notification to host
Size parameters (width, height)
Set handler for tool calls from the host
Set handler for listing app-exposed tools
Set persisted widget state On MCP Apps: Silent no-op (graceful degradation) On ChatGPT: Persists session-scoped state
State to persist
Update model context (ext-apps v0.4.0+)
On ChatGPT, this method uses setState() internally, which calls the OpenAI SDK's setWidgetState(). In ChatGPT, setWidgetState() exposes data to the AI model context, making it visible to the model.
ChatGPT Implementation Details:
MCP Apps Implementation:
Reserved Keys:
_) in structuredContent are filtered__mcp_*)Use updateModelContext() for context-focused use cases (informing the model about app state), and setState() for persistence-focused use cases. Note: On ChatGPT, both methods expose state to the AI model.
Upload a file May throw on unsupported platforms
File to upload
File ID
Call a server tool