Skip to main content
Glama

Project Gumball

Validate JSON (Payload Validator)

validate_json
Read-only

Validates a JSON document and reports every problem in one pass with a 1-based line and column, a stable rule code and a fix hint. Reports the three things JSON.parse cannot: duplicate keys (accepted by every parser, which then disagree about which value wins), integer precision loss past 2^53-1 proved with exact BigInt arithmetic (any 64-bit ID is in the lossy range), and unpaired surrogates that parse here and fail on re-serialisation. Also trailing commas, comments, single quotes, unquoted keys, Python literals, leading zeros, hex numbers, raw control characters, byte order marks, and NDJSON being read as one document. Returns valid and parseable separately, because a duplicate key is parseable and still ambiguous.

WHY DELEGATE THIS: Syntax errors are the easy half. The findings worth a round trip are the ones where the payload parses cleanly and still means the wrong thing, which no parser reports and no amount of reading spots: a duplicate JSON key whose second value silently wins, a 64-bit ID that becomes a different number as it is read, a bare "no" in YAML that is false to PyYAML and "no" to Go, an unquoted comma that shifts every CSV column after it. Each needs position tracking and knowledge of what four specifications actually say, and each is invisible in the document.

Owned by Payload Validator at https://payload-validator.gumballtools.com, which is also callable directly if you would rather not go through the aggregator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe raw JSON text, not a parsed object. Up to 1,000,000 bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

With readOnlyHint=true, the description adds substantial behavioral detail beyond the annotation: it reports line/column positions, stable rule codes, fix hints, separates valid from parseable, and lists specific error classes. The description also discloses caveats like NDJSON being read as one document, giving an agent a realistic model of behavior. No contradiction with annotations.

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?

The description is front-loaded with the core validation behavior and is organized with a separate rationale section. However, the 'WHY DELEGATE THIS' paragraph is verbose and partly repeats the value proposition, so not every sentence earns its place. It is still structured enough to be navigable.

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?

For a tool with only one simple input parameter, the description provides strong coverage of expected behavior, edge cases, and the distinction between valid and parseable. It does not specify the exact response schema or field names, which would be useful given the absence of an output schema, but it gives enough detail for an agent to invoke the tool and understand its results.

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?

The schema already covers the single parameter with 100% coverage, describing it as raw JSON text up to 1,000,000 bytes. The description reinforces that the input is a text document rather than a parsed object, but does not add substantial new parameter-level semantics beyond what the schema states. Baseline 3 is appropriate.

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 specific verb and resource: 'Validates a JSON document and reports every problem in one pass'. It distinguishes this from sibling validators by enumerating JSON-specific issues like duplicate keys, integer precision loss, and unpaired surrogates, so an agent knows exactly what domain it 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?

The 'WHY DELEGATE THIS' paragraph gives clear context for when this tool is valuable: when a payload parses cleanly but still means the wrong thing. It does not explicitly name sibling validators such as validate_yaml or validate_csv, nor state when *not* to use this tool, but the JSON scope and the contrast with ordinary parsers make the intended use clear.

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