Overview
Returns a function to invoke other MCP tools registered on the server. Useful for multi-step workflows where one app needs to trigger another tool.Wraps callServerTool
MCP Apps SDK reference
Import
Signature
CallServerToolParams
string
required
Name of the MCP tool to call.
Record<string, unknown>
Arguments to pass to the tool.
Returns
(params: CallServerToolParams) => Promise<CallServerToolResult | undefined>
Function to call an MCP server tool.
CallServerToolResult
Array<{ type: string; text?: string }>
Tool response content (human-readable text for the host model).
unknown
JSON data from the tool response. Version 2 permits objects, arrays, and primitive JSON values when the tool’s output schema allows them.
sunpeak’s handshake-based HTTP server wrappers preserve compatibility with the
2025-11-25
protocol, which represents a non-object structured result as { result: value } on that wire.boolean
Whether the tool call resulted in an error. Only set for actual execution failures — not for expected outcomes like cancellations.