Skip to content

Commit bbdb105

Browse files
committed
Log exception before returning tool call error result
Fixes #3266
1 parent a4f4ccd commit bbdb105

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/mcp/server/mcpserver/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ async def _handle_call_tool(
421421
except MCPError:
422422
raise
423423
except Exception as e:
424+
logger.exception("Tool call failed")
424425
return CallToolResult(content=[TextContent(type="text", text=str(e))], is_error=True)
425426

426427
async def _handle_list_resources(

0 commit comments

Comments
 (0)