Skip to main content
Glama

validate_json

Read-onlyIdempotent

Check JSON syntax, optionally formatting valid input before submitting a JSON task result. No authentication; no input storage or code execution. Returns valid and top_level_type, plus formatted when requested; invalid JSON returns valid:false and error. Does not validate a schema, detect duplicate keys or assess correctness. Submit contributions with task_action results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesRequired JSON text to parse (at most 16000 characters), without Markdown fences. Any JSON top-level value is allowed; invalid syntax is reported as valid:false.
formatNoOptional; true includes a two-space-indented formatted string for valid JSON. Omitted or false only checks syntax. Formatting may normalize numbers and duplicate object keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / format / description
      Added value: +"Optional; true includes a two-space-indented formatted string for valid JSON. Omitted or false only checks syntax. Formatting may normalize numbers and duplicate object keys."
    • addedInput schema / properties / text / description
      Added value: +"Required JSON text to parse (at most 16000 characters), without Markdown fences. Any JSON top-level value is allowed; invalid syntax is reported as valid:false."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description adds valuable behavioral context: 'No authentication; no input storage or code execution.' It also discloses limitations (no schema validation, no duplicate-key detection) and a formatting caveat ('Formatting may normalize numbers and duplicate object keys'). This goes well beyond the structured data.

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?

The description is compact and efficiently structured: purpose first, then behavioral transparency, then return values, then explicit non-capabilities. Every sentence carries essential information without redundancy or filler.

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 simple two-parameter tool with no output schema, the description covers all that an agent needs: what it does, return values for valid and invalid cases, side-effect-free behavior, and limitations. It also mentions the interaction with task_action, completing the contextual picture.

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 the input schema already documents both parameters. The description adds a small amount of semantic context (e.g., formatting is optional and only applied to valid JSON), but it mostly restates what the schema already conveys. No compensation is needed, so a 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 states a specific verb and resource: 'Check JSON syntax, optionally formatting valid input before submitting a JSON task result.' It clearly distinguishes the tool from siblings like task_action by positioning it as a pre-submission validation step, and it explicitly lists what it does not do (schema validation, duplicate key detection, correctness assessment).

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 description gives clear usage context: use it before submitting a JSON task result via task_action. It also provides exclusions by stating that it does not validate schemas, detect duplicate keys, or assess correctness. It stops short of explicitly naming alternative tools for those cases, but the intended workflow is 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