toolResultsToMcp
Converts an array of llm-chat ToolResult into the MCP
CallToolResult shape. Maps each result to a { type: "text", text: string }
content entry. Sets isError: true when any result has a non-success status.
See src/lib/result-converter.ts for the
full signature.
Called by BaseMcpServer.register() in the tool
handler closure.
See also: toolSchemaToZod,
Architecture,
Servers