-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Labels
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.0.1
Python Version
3.13.2
Operating System
macOS 15.5
Installation Method
other
Steps to Reproduce
- Create or use an MCP tool that returns multiple content types, including EmbeddedResource.
- Call the tool using MCPClient.
- Observe that only MCPTextContent and MCPImageContent are mapped and returned; EmbeddedResource is dropped with a debug log entry.
Expected Behavior
All supported content types, including EmbeddedResource, should be mapped and returned in the tool result. The SDK should provide a mapping for EmbeddedResource similar to other content types.
Actual Behavior
MCPClient only maps MCPTextContent and MCPImageContent. EmbeddedResource is dropped, causing loss of resources and incomplete tool results for users relying on EmbeddedResource outputs.
Additional Context
This was discovered while trying to use the github MCP get_file_contents
tool.
Even if called directly:
agent.tool.get_file_contents(owner="example-org", repo="example-repo", path="README.md")
Result:
{'status': 'success', 'toolUseId': 'tooluse_get_file_contents_771272973', 'content': [{'text': 'successfully downloaded text file (SHA: abc123)'}]}
Log:
DEBUG | strands.tools.mcp.mcp_client | [Thread: ThreadPoolExecutor-1_0, Session: a4cad7a7-09f2-44be-8fc5-6c5a14d0c178] unhandled content type: EmbeddedResource - dropping content
Possible Solution
Extend _map_mcp_content_to_tool_result_content
in src/strands/tools/mcp/mcp_client.py
to add support for EmbeddedResource.
Related Issues
No response
bradyburke, lucasdlemos, vinay-kosaraju and KyMidd