Skip to main content
Glama

Check JSON data against a JSON Schema

json_validate
Read-only

Validates JSON data against a JSON Schema (draft 2020-12): valid true or false, and up to 50 errors with the instance path, the keyword and the message. Schema and data are each limited to 200 KB. Remote $ref targets are not fetched. No network call. Related tools on this server, for a different need: json_repair when you need to convert broken JSON to valid JSON and check it on a schema. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "schema": "<schema>",
      "data": "<data>"
    },
    "name": "json_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesAny JSON value to validate
schemaYesA JSON Schema (object or boolean)

Output Schema

NameRequiredDescriptionDefault
draftNo
validNo
errorsNo
sourceNo
checkedAtNo
errorCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint and openWorldHint, it discloses the result shape (valid boolean, up to 50 errors with instance path, keyword, message), hard limits (200 KB each for schema and data), that remote $ref targets are not fetched, and the pricing/charging model including that failed calls are not charged. The 'no network call' line refers to local validation and sits slightly oddly with the x402 payment path, but it is not a contradiction of the stated annotations.

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

Conciseness4/5

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

Front-loaded with purpose, then output shape, limits, and routing, so the reader gets the essentials first. The final sentence packs the sibling reference and the full x402 pricing/network detail into one long compound clause, which is denser than necessary.

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

Completeness5/5

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

For a two-parameter validation tool with an output schema, an agent needs input limits, remote-ref behavior, outcome shape, cost, and the alternative tool — all of which are present. Nothing required to call it correctly is missing.

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?

Schema coverage is 100%, so parameter definitions already carry the baseline; the description still adds a genuine constraint not in the schema, the 200 KB per-input size limit, which an agent must respect before calling. It adds constraint meaning but no per-parameter syntax detail.

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 specific verb and resource ('Validates JSON data against a JSON Schema') plus the draft version (2020-12), and explicitly names the sibling json_repair as serving a different need. An agent can distinguish this from json_repair without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit alternative with the selecting condition: use json_repair to convert broken JSON to valid JSON and check it against a schema. That is a clear when-to-use-this-vs-that routing statement rather than implied usage.

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