Skip to main content
Glama

JSON Schema Validate

json_schema_validate
Read-onlyIdempotent

Validate a JSON instance against a JSON Schema (draft 2020-12, core and validation vocabularies). Send schema and instance as JSON text. Get back valid or invalid and every error with its JSON Pointer into the instance, the JSON Pointer of the failing keyword in your schema, the keyword and a plain message; a schema that is itself not valid 2020-12 (or has a bad pattern or a $ref outside it) gives verdict schema_error with the reason. Nothing is fetched: $ref works inside the schema only. Limits: schema 12,000 and instance 15,000 characters, 32 levels of nesting. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/json-schema-validate). Not legal, tax or financial advice.

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>",
      "instance": "<instance>"
    },
    "name": "json_schema_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaYesThe JSON Schema as JSON text (draft 2020-12; $schema may be left out or must be https://json-schema.org/draft/2020-12/schema). Up to 12,000 characters.
instanceYesThe JSON value to validate, as JSON text (any JSON: object, array, string, number, true, false, null). Up to 15,000 characters. No personal data: emails, SSN or phone shapes and card numbers are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it enumerates the two verdict paths (valid/invalid with JSON Pointer for instance and schema keyword, plus schema_error for a malformed schema), documents error behavior (ok false with reason, hourly limit), and discloses privacy and trust traits (no network, nothing stored, signed answer). That is exactly the kind of context annotations cannot carry.

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 scoping, then limits and error modes in a tight sequence with no filler. It is dense and slightly cluttered by the enumerated answer-field list and the trailing 'not legal, tax or financial advice' boilerplate, which dilutes rather than informs.

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?

There is no output schema, and the description compensates by naming the answer fields and the verdict vocabulary, plus error and failure semantics. For a two-input, read-only validation tool, an agent has everything needed to call it and interpret the result.

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 both parameters are already fully documented with formats and length caps. The description's 'Send schema and instance as JSON text' only restates that, adding no new per-parameter meaning; the $ref and schema_error notes are behavioral rather than parameter semantics.

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+resource pair: validate a JSON instance against a JSON Schema, and even pins the dialect (draft 2020-12, core and validation vocabularies). The scope (no remote $ref resolution) is signalled up front, so an agent knows exactly what class of task this covers.

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?

Gives clear invocation context: both inputs go in as JSON text, $ref only resolves within the supplied schema, and hard limits (12k/15k chars, 32 nesting levels) tell the agent when this tool will fail. It does not name a sibling alternative (e.g. a CSV-schema checker) or state exclusions, so it stops short of a 5.

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