Skip to main content
Glama

JSON Schema validator

json_schema_validate
Read-onlyIdempotent

Validate JSON data against a JSON Schema (draft-07/2019-09/2020-12, formats like email/uri/date-time) and get every error with its exact path — check tool I/O before acting on it. Ajv, strict about types, all errors reported. Pass data and schema as JSON values (or JSON strings). Price: free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesany JSON value (or a JSON string with parse_strings=true)
schemaYes
parse_stringsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), the description discloses the underlying engine (Ajv), strict type checking, that all errors are reported, and the supported draft versions and formats. It also notes the input flexibility (JSON values or strings) and cost, giving the agent a complete behavioral model.

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?

A single dense sentence that front-loads the primary purpose before the use-case hint and supporting details. No filler; each clause (draft versions, formats, path reporting, Ajv, strictness, input modes, price) adds decisionally relevant information.

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?

For a validation tool with no output schema, the description is nearly complete: it covers accepted inputs, expected behaviors (strict types, all errors, exact paths), and the use case. The only minor omission is the precise shape of the success response, but the error-oriented phrasing provides enough guidance.

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

Parameters4/5

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

Only one of three parameters has a schema description, so the description carries the burden. It clarifies that both data and schema can be passed as JSON values or JSON strings, which indirectly explains the parse_strings toggle, though it doesn't explicitly document parse_strings semantics or default. The core parameter meaning is adequately conveyed.

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 exactly what it does with a specific verb ('Validate') and resource ('JSON data against a JSON Schema'), including supported draft versions and that it returns every error with its exact path. This clearly differentiates it from validation-adjacent sibling tools like email_check or address_check, which validate specific domains rather than arbitrary JSON.

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?

Explicitly frames when to reach for it: 'check tool I/O before acting on it', which tells an agent to validate tool responses before taking consequential actions. It does not name alternatives, but there are no obvious siblings performing JSON Schema validation, so the guidance is sufficient.

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