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).
Record<string, unknown>
Structured data from the tool response. Use this for machine-readable data the calling resource needs to render (e.g.,
{ status: 'success', message: '...' }).boolean
Whether the tool call resulted in an error. Only set for actual execution failures — not for expected outcomes like cancellations.