MCP Apps SDKDocumentation 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
Theontoolinputpartial notification handler is called as the host streams partial tool arguments during tool call initialization. This enables progressive rendering — your app can display a live preview of content before the complete input is available.
Partial arguments are delivered as “healed” JSON: the host closes any unclosed brackets or braces to produce valid JSON at each step. This means the data is always parseable but may be incomplete.
Like all notification handlers, ontoolinputpartial should be registered before calling connect().
Signature
Parameters
Partial tool arguments (healed JSON — incomplete objects may be truncated).
Usage
Basic preview rendering
Progressive rendering with a final state
Combineontoolinputpartial for live preview with ontoolinput for the finalized result:
Using with the sunpeak framework
The sunpeak framework provides theuseToolData hook, which manages both partial and complete tool input as a reactive value. This is the recommended approach when building with sunpeak.
Related
- Event Handlers overview — all notification and request handlers
- ontoolinput — receive complete tool arguments