Open
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
0.1.8
Python Version
3.10.5
Operating System
Windows 11 Enterprise
Installation Method
pip
Steps to Reproduce
- Create a MCPClient using awslabs.dynamodb-mcp-server
- Create an Agent with tools provided by the mcp server.
- Try to use it
Expected Behavior
Bedrock is able to parse the toolSpec and the API call is successful.
Actual Behavior
Bedrock API call crashes because of malformed input request.
Additional Context
Error from Bedrock API:
.venv\lib\site-packages\botocore\client.py", line 1061, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the ConverseStream operation: The model returned the following errors: Malformed input request: #/toolConfig/tools/8/toolSpec/inputSchema/json: extraneous key [$defs] is not permitted, please reformat your input and try again.
Possible Solution
Sanitize all tools before calling bedrock.
Related Issues
No response