MCP Tool Schema Validator

Paste a single MCP tool definition or an array of definitions. Get errors, warnings, and suggestions for names, descriptions, inputSchema structure, required fields, and common MCP mistakes.

Paste MCP Tool Definition

Your schema is never uploaded or stored.0 chars

Formatted JSON will appear here after validation

About this tool

What it does

  • โœ“ Validates JSON structure โ€” catches parse errors immediately
  • โœ“ Checks required fields: name, description, inputSchema
  • โœ“ Verifies inputSchema.type is "object"
  • โœ“ Detects required[] fields missing from properties
  • โœ“ Warns when property descriptions are missing
  • โœ“ Flags unrestricted additionalProperties
  • โœ“ Checks tool name format (spaces, unusual chars, length)
  • โœ“ Warns about vague or overly short descriptions
  • โœ“ Normalizes and formats your JSON for copying

How to use it

  1. 1 Paste your MCP tool definition JSON in the left panel โ€” either a single object or an array of objects.
  2. 2 Click "Load Sample" to see two well-formed example tool definitions.
  3. 3 Click "Validate" to run all checks. Issues appear grouped by tool.
  4. 4 Review errors (must fix), warnings (best practice), and suggestions.
  5. 5 Use "Format" to pretty-print your JSON, then "Copy" to copy the formatted output.
  6. 6 Click "Copy Report" to copy a plain-text validation summary to your clipboard.

What MCP tool schemas are

Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools and data sources. A tool definition is the JSON contract that describes a tool to the AI โ€” its name, what it does, and what arguments it accepts. When an AI model (like Claude) decides to use a tool, it reads the tool definition to know how to call it correctly.

Example MCP tool definition

{
  "name": "get_weather",
  "title": "Get Weather",
  "description": "Returns current weather for a location. Use when the user asks about weather, temperature, or conditions in a specific place.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "location": {
        "type": "string",
        "description": "City name or lat/lon. Example: 'Paris' or '48.8566,2.3522'"
      },
      "units": {
        "type": "string",
        "description": "Temperature unit: 'metric' (Celsius) or 'imperial' (Fahrenheit)",
        "enum": ["metric", "imperial"]
      }
    },
    "required": ["location"],
    "additionalProperties": false
  }
}

Common MCP schema mistakes

Vague description

Descriptions like "a tool" or "searches something" give the model no signal on when to call the tool. Write descriptions from the model's perspective: what does calling this tool do, and when should it be called?

inputSchema.type not "object"

MCP requires inputSchema.type to always be "object" even if the tool takes no arguments. Omitting type or using "any" will cause schema validation failures in MCP clients.

required references unknown field

Listing a field name in "required" that isn't defined in "properties" is a JSON Schema error. Every name in required[] must match a key in properties.

Properties missing descriptions

Property descriptions help the model know what value to pass. Without them, models guess โ€” and often guess wrong. Every property should have a clear description with an example where possible.

No additionalProperties: false

Without this flag, the model can pass arbitrary extra keys your handler doesn't expect. Set additionalProperties: false to prevent this and make validation easier.

Tool name with spaces

Tool names should use snake_case or camelCase (e.g. get_weather, createFile). Names with spaces may not parse correctly in all MCP client implementations.

Privacy: This tool runs entirely in your browser. Your pasted schema is not uploaded, stored, or transmitted to any server.

Frequently Asked Questions

What is an MCP tool definition?
A Model Context Protocol (MCP) tool definition is a JSON object that describes a capability an AI assistant can call. It includes a name, description, and inputSchema (a JSON Schema object) that tells the model what arguments the tool accepts. MCP tools are used by AI clients like Claude to invoke external functions, APIs, or system commands.
What fields are required in an MCP tool definition?
Three fields are required: "name" (a unique identifier for the tool), "description" (explains what the tool does and when to call it), and "inputSchema" (a JSON Schema object with type "object" that describes the tool's input arguments). "title" is optional but recommended for display purposes.
Why does inputSchema.type need to be "object"?
The MCP specification requires inputSchema.type to be "object" because tool arguments are always passed as a JSON object (key-value pairs). Even if your tool takes no arguments, you must provide an empty properties object: { "type": "object", "properties": {} }.
What should go in the tool description?
The description is critical โ€” it tells the AI model when to call the tool and what it does. A good description explains: (1) what the tool does, (2) what it returns, (3) when to call it vs. not call it, and (4) any important constraints or side effects. Vague descriptions like "a useful tool" cause models to misuse or ignore the tool.
What is additionalProperties and why should I set it to false?
additionalProperties controls whether the JSON Schema allows extra keys beyond the defined properties. Setting it to false prevents the AI model from passing undefined arguments, which can cause unexpected behavior in your tool handler. It also makes schemas more predictable and easier to validate server-side.
Can I validate an array of tool definitions?
Yes. Paste either a single tool object ({ "name": ... }) or a JSON array of tool objects ([ { "name": ... }, { "name": ... } ]). The validator handles both formats and reports issues per tool.
Is my schema data uploaded anywhere?
No. This tool runs entirely in your browser using JavaScript. Your pasted schema is never sent to any server. No data leaves your device.
What is the difference between a warning and an error?
Errors are structural problems that will cause MCP clients to reject or misbehave with the tool โ€” missing required fields, wrong types, broken required arrays. Warnings are best-practice issues that won't break things but will degrade quality โ€” short descriptions, missing property descriptions, unrestricted additionalProperties. Suggestions are optional improvements.