Skip to main content
Glama

Validate JSON Schema

validate_json_schema
Read-onlyIdempotent

Validates a JSON value against a supplied JSON Schema using draft 4, 7, 2019-09, or 2020-12. Use this to verify generated or extracted structured data. It performs validation only and does not mutate the instance. Limit: 512 KiB request, 40 nesting levels, 100 returned errors.

Input Schema

NameRequiredDescriptionDefault
draftYes2020-12
schemaYes
instanceYes

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description goes beyond them with hard operational limits: 512 KiB request, 40 nesting levels, and a 100-error return cap, which materially affects how an agent should size inputs and interpret truncated error lists. It could additionally state what happens on an invalid instance, but the output schema covers that.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core purpose, followed by usage and then limits. Every sentence carries distinct information with no repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values needn't be explained, and the description covers purpose, input sizing limits and non-mutation. It is nearly complete; the only minor gap is that it does not hint at how 'instance' is passed or how boolean schemas are treated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so all three parameters rely on the description, which only clarifies the 'draft' parameter by listing the four accepted values that mirror the enum. It adds nothing about 'instance' (which accepts any JSON value) or about the object-or-boolean union accepted for 'schema'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource ('Validates a JSON value against a supplied JSON Schema') and enumerates the supported drafts (4, 7, 2019-09, 2020-12). No sibling in the list does validation, so the tool is unambiguously distinguishable from the fetch/parse/extract tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this to verify generated or extracted structured data' gives a concrete use case that ties it to the sibling extraction tools. It does not spell out when-not to use it or name an alternative, but no plausible alternative exists in this toolset.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources