Skip to main content
Glama

MAD Synapse · Utils

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. Errors: returns isError with a message for invalid input or an upstream failure (not charged).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesany JSON value (or a JSON string with parse_strings=true)
schemaYesThe JSON Schema to validate against.
parse_stringsNotrue = if data is a string, parse it as JSON first. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validNo
errorsNo
error_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, openWorld, so the safety profile is covered. The description adds genuinely new behavioral facts beyond them: the validator is Ajv and strict about types, all errors are reported, the call is free, and invalid input or upstream failure returns isError rather than a normal result. That is substantive added context, though it omits whether it is a local or network operation.

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 a use-case clause, then operational notes; nothing is wasted. It is slightly crowded and fragmented by the clipped "Ajv, strict about types, all errors reported." and "Price: free." fragments, which read like stitched-together metadata.

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?

An output schema exists, so return values need no prose, and the description still covers error behavior and cost. Combined with the annotations, an agent has enough to call it correctly; the only real gap is the absence of parse_strings semantics and whether third-party $ref resolution is supported by the open-world validator.

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 100%, so the schema already documents data, schema, and parse_strings, making 3 the baseline. The description adds only that data and schema may be passed as JSON values or JSON strings, but it never mentions parse_strings, the flag that actually governs string parsing, so it contributes marginal meaning over the 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 specific verb and resource ("Validate JSON data against a JSON Schema") and immediately scopes it with supported drafts and formats like email/uri/date-time. Among siblings like address_check, email_check, and jwt_decode, it is unmistakably the generic schema validator, and the added "check tool I/O before acting on it" frames the exact use case.

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?

The phrase "check tool I/O before acting on it" gives a concrete situation that selects this tool over the domain-specific checkers. However, it never names an alternative explicitly or states when not to use it (e.g., for validating a specific address or email, use address_check/email_check instead), so routing still requires inference.

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