Skip to main content
ChatGPT exposes its host context to your app, which Skybridge’s hooks read and normalize for you. useAppsSdkContext is the escape hatch: it reads a context value raw, by key, before that normalization. It works only under ChatGPT.

Example

useUser canonicalizes the locale (fr_FR becomes fr-FR). Reading it raw gives exactly what ChatGPT sent.

Type Parameters

K

Inferred from key: the literal key you pass fixes the return type to AppsSdkContext[K].

Parameters

key

Required. The context key to read. The hook re-renders when the host pushes a new value for that key, and ignores changes to other keys.

Returns

The requested key’s current value, read live from window.openai. It is un-normalized: every key also has a cross-host hook that returns a wrapped form, so reach here only for the raw value.

useMcpAppContext

The same escape hatch for the MCP Apps runtime

useToolInfo

Read the tool result the view mounted with, cross-host

Apps SDK and MCP Apps

What the raw Apps SDK layer is, and how Skybridge unifies it