Skip to content

Commit

Permalink
Merge pull request #26 from felixbuenemann:fix-mcp-error-endless-loops
Browse files Browse the repository at this point in the history
Fix endless loop if MCP command fails
  • Loading branch information
chrishayuk authored Dec 18, 2024
2 parents 4373885 + 4c1b5eb commit fde3d3c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mcpcli/tools_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ async def handle_tool_call(tool_call, conversation_history, server_streams):
break
if tool_response.get("isError"):
logging.debug(
f"Error calling tool '{tool_name}': {tool_response.get('error')}"
f"Error calling tool '{tool_name}': {tool_response.get('content')}"
)
return

# Format the tool response
formatted_response = format_tool_response(tool_response.get("content", []))
Expand Down

0 comments on commit fde3d3c

Please sign in to comment.