Claude Tool Schema Validator

Check Claude tool definitions for anything the Messages API would reject, and convert OpenAI functions and MCP tools to Anthropic format.

published

  • [FREE]
  • [NO_SIGNUP]
  • [NO_UPLOAD]

A Claude tool schema validator checks the tools you send to the Messages API before the API does. Paste Anthropic tool definitions, OpenAI functions or MCP tools; it converts them to Anthropic’s format and lists every problem that would come back as a 400, plus the strict-mode limits that only fail at request time.

What it checks

CheckLevelRule
Tool nameerrorMust match ^[a-zA-Z0-9_-]{1,128}$ and be unique in the request
input_schemaerrorRequired; the root must be "type": "object"
input_exampleserrorEach example must validate against input_schema — invalid examples return a 400
strict: true objectserrorEvery object needs "additionalProperties": false
strict: true keywordserrorNo minimum / maximum / multipleOf, minLength / maxLength, minItems above 1, recursive schemas, external $ref, allOf with $ref, or complex enum values
strict: true regexerrorNo backreferences, lookarounds or \b in pattern
Request limitserrorMax 20 strict tools, 24 optional parameters and 16 union-typed parameters across all strict schemas
Forced tool_choiceerrorany / tool return a 400 on Claude Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1
requiredwarningEvery required name should exist in properties
Reasoning parameterswarningA field named reasoning or thinking can trigger a reasoning_extraction refusal — ask for an explanation instead
DescriptionstipAnthropic recommends at least 3–4 sentences per tool, and a description on every parameter

The rules come from Anthropic’s Define tools, Strict tool use and Structured outputs pages, checked on October 28, 2026.

Converting OpenAI and MCP tools

SourceShapeBecomes
OpenAI Chat Completions{"type": "function", "function": {name, description, parameters, strict}}{name, description, input_schema, strict}
OpenAI Responses{"type": "function", name, description, parameters, strict}{name, description, input_schema, strict}
MCP tools/list{name, title, description, inputSchema, outputSchema, annotations}{name, description, input_schema}

Anthropic-defined tools such as web_search_20260209 or bash_20250124 are passed through untouched — their schemas are fixed by Anthropic.

Two differences trip people up. OpenAI’s strict mode wants every property in required and optional ones made nullable; Claude’s strict mode allows real optional fields, though each one counts toward the 24-parameter budget. And MCP tool names often use dots (github.create_issue), which Claude’s name pattern rejects.

Forced tool use on the newest models

Older guides use tool_choice: {"type": "tool", "name": "extract"} to force structured extraction. On Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1 and Claude Mythos 5.1 that request returns a 400. The replacements are tool_choice: "auto" with a prompt that names the tool, strict: true so arguments always match the schema, or structured outputs when you only need JSON back. Pick the model in the toolbar and the validator checks this for you.

Privacy

Everything runs in this browser tab: no upload, no API call, no key needed. Tool schemas often describe internal systems, so that matters — check DevTools → Network and you will see no request carrying your JSON.

Frequently asked questions

What does a Claude tool definition need?

A user-defined tool needs a name that matches ^[a-zA-Z0-9_-]{1,128}$, a description, and an input_schema that is a JSON Schema object. Optional fields include input_examples, strict, cache_control, defer_loading and allowed_callers. Use {"type": "object", "properties": {}} as the schema for a tool that takes no arguments.

How do I convert an OpenAI function to a Claude tool?

Move function.name and function.description up a level and rename parameters to input_schema. For the Responses API format, name and description are already top-level, so only parameters changes. A strict: true flag carries over unchanged. Paste either format here and the converted array appears on the right.

How do I use MCP tools with the Claude API?

An MCP server lists tools with name, description and inputSchema. For the Messages API, rename inputSchema to input_schema and drop title, outputSchema and annotations, which have no slot on a Messages tool. MCP names with dots, such as github.create_issue, fail Claude's name pattern, so the validator suggests an underscore version. To skip the conversion entirely, the API's MCP connector can call a remote MCP server for you.

Why does tool_choice "any" return a 400?

Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1 and Claude Mythos 5.1 do not accept forced tool use: tool_choice "any" and "tool" return a 400 on those models. Use "auto" with an instruction that names the tool, set strict: true so the inputs always match your schema, or use structured outputs when you only need a JSON reply. Claude Haiku 5.5 and older models still accept forced tool use.

What does strict: true require?

Every object in the schema needs "additionalProperties": false. Numeric limits (minimum, maximum, multipleOf), string lengths (minLength, maxLength), array limits beyond minItems 0 or 1, recursive schemas, external $ref and regex backreferences or lookarounds are not supported. Across one request you can have at most 20 strict tools, 24 optional parameters and 16 parameters with union types.

Is my schema uploaded anywhere?

No. Parsing, conversion and every check run in your browser. The share link puts your JSON in the URL fragment, which browsers never send to a server.

Can it tell me my tool will be called correctly?

No — it checks structure, not behavior. Whether Claude picks the right tool depends mostly on the description, which is why short descriptions and missing parameter descriptions show up as tips. Test the behavior with real prompts.