We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73eb202 commit 9954606Copy full SHA for 9954606
1 file changed
livekit-agents/livekit/agents/llm/mcp.py
@@ -108,7 +108,10 @@ async def _tool_called(raw_arguments: dict[str, Any]) -> Any:
108
tool_result = await self._client.call_tool(name, raw_arguments)
109
110
if tool_result.isError:
111
- error_str = "\n".join(str(part) for part in tool_result.content)
+ error_str = "\n".join(
112
+ part.text if hasattr(part, "text") else str(part)
113
+ for part in tool_result.content
114
+ )
115
raise ToolError(error_str)
116
117
# TODO(theomonnom): handle images & binary messages
0 commit comments