[BUG] API Error: 400 JSON schema is invalid. It must match JSON Schema draft 2020-12
Resolved 💬 5 comments Opened Jun 30, 2025 by andig Closed Jul 1, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: custom MCP server<!-- specify -->
- Claude CLI version: 1.0.35 (Claude Code)<!-- output of
claude --version--> - Operating System: macOS <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
- Terminal: Warp<!-- e.g. iTerm2, Terminal App -->
Bug Description
<!-- A clear and concise description of the bug -->
Receiving this error when invoking tool. I can list tools fine and I can invoke tools using mcp-inspector.
Steps to Reproduce
Tool call returns this response (which seems ok to me):
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Title: evcc REST-API\nVersion: latest"
}
]
}
}
Expected Behavior
An indication why this error triggers, or no error
Additional Context
This doesn't happen when the tool call response contains schema information:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Title: evcc REST-API\nVersion: latest"
}
],
"schema": {
"properties": {},
"type": "object"
},
"usage": "call info <json-args>",
"next_steps": [
"list",
"schema info"
]
}
}
but it's not clear how this relates to tools....custom.input_schema
The tool definition itself as returned by tool/list looks correct:
{
"annotations": {},
"description": "Show API metadata: title, version, description, and terms of service.",
"inputSchema": {
"properties": {},
"type": "object"
},
"name": "info"
},This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗