Skip to main content
Glama

Validar contra JSON Schema

json-schema-validate
Read-onlyIdempotent

Valida un JSON contra un JSON Schema (subconjunto propio, sin $ref); informa palabras clave no soportadas. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: convertir documentos de ejemplo (json-schema-from-samples). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Validates a JSON value against a JSON Schema using a built-in subset (type, enum, const, properties, required, items, min/max*, pattern, format, allOf/anyOf/oneOf/not). No $ref; patterns are time-limited; unsupported keywords are reported. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: turning sample documents (json-schema-from-samples). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
valueYesInstance (any JSON value; required).
schemaYesJSON Schema (object or boolean) (object or boolean; required).

Output Schema

NameRequiredDescriptionDefault
validNo
errorsNo
unsupported_keywordsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / value / examples
      Added value: +[
      +  {
      +    "age": 30,
      +    "name": "Ana"
      +  }
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Validates a JSON value against a JSON Schema using a built-in subset (type, enum, const, properties, required, items, min/max*, pattern, format, allOf/anyOf/oneOf/not). No $ref; patterns are time-limited; unsupported keywords are reported. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: turning sample documents (json-schema-from-samples). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. 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 read-only, no-network, idempotent, non-destructive, so restating 'solo lectura, sin red, sin estado guardado' earns little. What does add value is beyond annotations: the supported keyword subset, the no-$ref restriction, time-limited pattern matching, reporting of unsupported keywords, and concrete limits (64 KB input, 1 s per call, 1 MB result).

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

Conciseness3/5

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

Well front-loaded and segmented (Cuándo / No para / Efectos / Determinista / Límites), but the text is delivered twice in ES and EN, with the EN block truncated into a pointer to inputSchema.description. The duplication roughly halves the information density of an otherwise tight definition.

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?

With an output schema, full annotation coverage and 100% parameter description coverage, the remaining burden is limits, determinism and validation scope — all present. An agent has everything needed to call this correctly and to interpret a failure as an unsupported-keyword report.

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. The description still adds meaning for the `schema` parameter by declaring the validator's subset and that $ref is unsupported, which directly constrains what can be passed — meaningful beyond the schema's bare 'JSON Schema (object or boolean)'.

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 ('Valida un JSON contra un JSON Schema') and immediately bounds the scope with '(subconjunto propio, sin $ref)'. It also names the sibling it is not for (json-schema-from-samples), so an agent can distinguish it from the ~250 other tools without opening a schema.

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?

Has an explicit 'Cuándo' clause plus an explicit 'No para' exclusion naming json-schema-from-samples — a real routing decision. The positive condition ('transformar, comparar o revisar con exactitud datos estructurados') is broad enough to overlap with json-parse-check, json-diff-patch and other validators, so it is clear context but not fully discriminating.

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