Skip to main content
Glama

x402 Toolbox

Validate JSON data against a JSON Schema (draft 2020-12 / draft-07)

json_validate
Read-onlyIdempotent

Validate JSON data against a JSON Schema (draft 2020-12 / draft-07). Checks data against a schema: types, enum/const, numeric and string limits, patterns, formats (email, date-time, uri, uuid, ipv4/6, hostname), arrays, objects, $ref (same document), allOf/anyOf/oneOf/not, if/then/else. Returns every error with its JSON Pointer path. Remote $ref is not fetched. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
dataYesData to validate (any JSON value; a string is parsed as JSON when it is valid JSON, otherwise validated as a plain string)
schemaYesJSON Schema (a JSON value, or a string containing JSON)
formatsNoAssert "format" keywords

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The description discloses the return format ('Returns every error with its JSON Pointer path'), a key limitation ('Remote $ref is not fetched'), and the payment requirement ('Price: $0.003 USDC per call via x402'). This adds substantial value beyond the annotations, which already cover safety and idempotency.

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?

The description is front-loaded with the purpose, then provides a dense but useful enumeration of supported features, followed by return behavior, limitation, and price. It is not wasteful, though the long keyword list could be trimmed for tighter readability.

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?

Given the complexity of JSON Schema validation and the absence of an output schema, the description covers purpose, supported features, return behavior, and key constraints. It stops short of fully specifying the response shape (e.g., a success/error object), but is otherwise complete for an agent to call it correctly.

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 coverage is 100%, so the schema already documents all three parameters. The description does not clarify the semantics of the 'formats' boolean parameter beyond listing supported format keywords. Baseline 3 is appropriate when the schema carries the parameter documentation.

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?

The description states a specific verb and resource ('Validate JSON data against a JSON Schema') and enumerates supported keywords, making the tool's function unmistakable. Sibling tools like json_format, json_query, and json_diff have clearly different purposes, so an agent can distinguish this tool without opening its schema.

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

Usage Guidelines3/5

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

The description implies when to use the tool by describing its validation checks, but it does not explicitly say when to prefer it over alternatives or note exclusions (e.g., 'use json_format for reformatting'). The context is clear but leaves routing inference to the agent.

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.