-
Notifications
You must be signed in to change notification settings - Fork 325
Open
Description
The anthropic API says that messages of content type tool_use
can have only following attributes:
The MCP client's process_query
function tried to check if there is a attribute text
in a content
block of type
== tool_use
- which as per the API documentation will not be the case.
quickstart-resources/mcp-client-python/client.py
Lines 88 to 92 in dfc9247
if hasattr(content, 'text') and content.text: | |
messages.append({ | |
"role": "assistant", | |
"content": content.text | |
}) |
While API may respond with an array of content blocks, maybe one with type
= text
, and then the next one with type
= tool_use
but a content of type tool_use
will never have an attribute text
.
Let me know if I'm missing something here. If you agree with this, I'd like to fix this.
Metadata
Metadata
Assignees
Labels
No labels