Skip to main content
Glama

elci.dev developer tools

JSON Schema Validator

json_schema_validate
Read-only

Validate JSON data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12; "auto" reads $schema and defaults to 2020-12). Lists every error with a JSON Pointer path.

Returns: Object with valid (boolean), draft (the draft used) and errors: [{ path (JSON Pointer, "" for the root), keyword, message }].

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": {
      "data": "<data>",
      "schema": "<schema>"
    },
    "name": "json_schema_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesThe JSON document to validate.
draftNoSchema draft.auto
schemaYesThe JSON Schema, as JSON text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real value beyond that by naming supported drafts, explaining that 'auto' reads $schema and falls back to 2020-12, and promising exhaustive error reporting with JSON Pointer paths. It doesn't discuss size/performance limits on the 1MB payloads, which is the only notable omission.

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?

Two compact blocks — the operation and its draft semantics first, the return shape second — with no filler sentences. Since no output schema exists, the 'Returns:' line earns its place by describing the result structure.

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 three-parameter, single-purpose validator with no output schema, the description supplies both the operational scope (drafts, auto-resolution) and the return contract (valid, draft, errors with path/keyword/message). Nothing an agent needs in order to call and interpret the result 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 baseline is 3, but the description meaningfully enriches the 'draft' parameter: the schema only says 'Schema draft' with an enum, whereas the description explains what 'auto' actually does and what the default resolves to. 'data' and 'schema' remain as documented in the schema, so this is an addition rather than a full clarification.

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 opens with a precise verb+resource ('Validate JSON data against a JSON Schema') and immediately scopes the supported drafts, so the agent knows exactly what operation is performed. It is trivially distinguishable from siblings like json_format, json_diff, or jsonpath_query, which transform, compare, or query rather than validate.

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?

Usage is implied by the purpose ('validate against a schema') but there is no explicit statement of when to prefer this over, say, jsonpath_query for checking structure, and no exclusions or prerequisites. The draft/auto semantics give the agent a hint about intended inputs but not about tool selection.

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