Describe the bug
When a MCP server presents a tool with a bad schema agents cannot use the gateway
To Reproduce
Set up the gateway
connect claude
claude mcp add --transport http mcp-gateway http://mcp.127-0-0-1.sslip.io:8001/mcp
use the the gateway via a prompt
see
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.2.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at
https://docs.claude.com/en/docs/tool-use."},"request_id":"req_vrtx_011CYzvzNNvyGRdfFJduQKWW"}
The issue is caused by the CustomResponse server we have for testing