[BUG] Claude Code Broken by one bad MCP tool schama

Resolved 💬 3 comments Opened Mar 7, 2026 by mikera Closed Mar 11, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When testing MCP servers that have bad JSON schemas I get the following error:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.14.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_011CYoXbTiJ1m3BDcxD7DPUJ"}

From this point onwards, all prompts fail with a similar error. The only way to recover appears to be to close and restart.

What Should Happen?

Error is fine if the tool is buggy but:

  1. It should identify which MCP tool has an issue so it can be removed / fixed
  2. It should not stop the users from proceeding with unrelated tasks

This is an error handling issue. A buggy external tool should not render Claude Code unusable.

Error Messages/Logs

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.14.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_011CYoXbTiJ1m3BDcxD7DPUJ"}

Steps to Reproduce

Have an MCP server with a bad input schema and ask Claude Code to use it. Example:

 44 tools total across the XXX MCP server. Want me to explore any of these in more detail?

> Yes test drive running an agent and work out any issues with the API / implementation we need to address

● Let me load the agent tools and start exploring.

● Good, all agent tools are loaded. Let me also load some supporting tools for later.
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.14.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_011CYoXbTiJ1m3BDcxD7DPUJ"}

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.71

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗