Skip to main content
Glama

Validar sintaxis JSON

json-parse-check
Read-onlyIdempotent

Verifica si un texto es JSON válido; si no, devuelve el error con línea y columna. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: reparar JSON casi válido típico de salidas de LLM (json-repair). 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: Checks whether text is valid JSON (RFC 8259); on error returns the parser message with line and column. Also reports the top-level type and nesting depth. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: repairing almost-JSON typical of LLM output (json-repair). 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.

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text (string; required).

Output Schema

NameRequiredDescriptionDefault
typeNo
depthNo
errorNo
validNo
locationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / json / examples
      Added value: +[
      +  "{\"a\":[1,2]}"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the safety profile is covered; the description still adds real value with determinism and hard limits (64 KB input, 1 s/call, 1 MB result). However, the stated 64 KB input limit conflicts with the schema's maxLength of 1048576, which is an inconsistency the agent may trip over.

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?

Content is well front-loaded and sectioned (When / Not for / Side effects / Deterministic / Limits), but the entire description is duplicated verbatim in Spanish and English, roughly doubling length for a one-parameter validation tool. The duplicated block is the kind of waste that dilutes signal in a long tool list.

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 present and rich annotations, the remaining burden on the description is error/limit behavior, and it covers that (line/column error reporting, type and depth output, size/time caps, determinism). Nothing an agent needs in order to call this 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?

One required parameter with 100% schema description coverage and an example, so the schema already does the work; the description adds nothing parameter-level beyond saying the input is the JSON text. Baseline 4 applies for a single fully-documented parameter.

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: checks whether text is valid JSON (RFC 8259) and on error returns the parser message with line and column, plus top-level type and nesting depth. It explicitly names the sibling it is not (json-repair) so the agent can distinguish it without opening either schema.

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

Usage Guidelines5/5

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

Provides explicit 'When' (transforming/comparing/checking structured data exactly) and 'Not for' (repairing almost-JSON from LLM output → json-repair) sections. The routing condition is unambiguous, which matters in a sibling list containing json-repair, json-schema-validate and json-describe.

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