diff --git a/src/renderer/src/utils/mcp-tools.ts b/src/renderer/src/utils/mcp-tools.ts index 1e7c01dfc8..a9c48a7f61 100644 --- a/src/renderer/src/utils/mcp-tools.ts +++ b/src/renderer/src/utils/mcp-tools.ts @@ -228,7 +228,7 @@ export async function callMCPTool(tool: MCPTool): Promise { content: [ { type: 'text', - text: `Error calling tool ${tool.name}: ${JSON.stringify(e)}` + text: `Error calling tool ${tool.name}: ${e instanceof Error ? (e.stack || e.message || "No error details available") : JSON.stringify(e)}` } ] })