Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-staging.skybridge.tech/llms.txt

Use this file to discover all available pages before exploring further.

Skybridge exports hooks and utilities from skybridge/web that work across multiple runtimes. See the compatibility matrix below for platform-specific availability.

State Management

useToolInfo

Get initial tool input, output and metadata

useViewState

Persist state across view renders

Context Sync

data-llm

Sync view UI state with the model for contextual responses

Utilities

createStore

Create a Zustand store that automatically syncs with view state

generateHelpers

Generate fully typed hooks from your MCP server

User Interface

useLayout

Get layout and visual environment (theme, safe area)

useUser

Get user information (locale, device type)

useDisplayMode

Get and request view display mode changes

useRequestModal

Open a modal portaled outside of the view iframe

Actions

useCallTool

Call tools from within a view

useOpenExternal

Open external links

useSendFollowUpMessage

Send a follow-up message in the conversation

useFiles

Upload and download files

useSetOpenInAppUrl

Set URL for “open in app” button in fullscreen mode in ChatGPT

Advanced

useAppsSdkContext

Low-level hook to subscribe to window.openai state values (Apps SDK)

useMcpAppContext

Low-level hook to subscribe to MCP App host context (MCP Apps)

Import

All hooks and utilities are exported from skybridge/web:
import {
  createStore,
  useCallTool,
  useDisplayMode,
  useFiles,
  useLayout,
  useSetOpenInAppUrl,
  useAppsSdkContext,
  useMcpAppContext,
  useOpenExternal,
  useRequestModal,
  useSendFollowUpMessage,
  useToolInfo,
  useUser,
  useViewState,
} from "skybridge/web";

Runtime Compatibility

Skybridge supports two runtime environments: Apps SDK (ChatGPT) and MCP Apps (open specification). Most hooks work in both, but some features are platform-specific.
Hook / FeatureApps SDKMCP AppsNotes
useToolInfo
useViewState⚠️MCP Apps: polyfilled; state doesn’t persist across view renders
data-llm⚠️MCP Apps: polyfilled (same limitation as useViewState)
useCallTool
useSendFollowUpMessage
useOpenExternal
useLayout
useUser
useDisplayMode
useFilesApps SDK only
useSetOpenInAppUrlApps SDK only
useRequestModal⚠️MCP Apps: polyfilled; renders in iframe instead of host modal
useAppsSdkContextApps SDK only
useMcpAppContextMCP Apps only
Learn more about runtime differences in Write Once, Run Everywhere.