sunpeak APIDocumentation Index
Fetch the complete documentation index at: https://sunpeak.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Manages UI state that is automatically synced to the host viaupdateModelContext. Works like React’s useState, but each update is pushed to the host so the AI model can see it on the next message. Use this for user decisions, selections, or any state the model should be aware of.
Wraps updateModelContext
MCP Apps SDK reference
Import
Signature
Parameters
Initial state value.
Returns
A tuple containing the current state and a setter function, similar to React’s
useState.