Skip to main content
Glama

JSON Repair

dev_json_repair

Repairs broken JSON: trailing commas, single quotes, unquoted keys, Python literals (True/False/None), NaN, comments, smart quotes and truncated documents. Built for the most common agentic failure mode — parsing slightly-wrong JSON from an LLM or a human. Use this when an agent needs to fix LLM-mangled, truncated or sloppy JSON. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesBroken JSON

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full disclosure burden, and it does substantial work: the full list of supported defect classes tells the agent what repair scope to expect (including non-obvious truncation recovery and Python-literal coercion), and it discloses the payment/auth requirement ('x402 price $0.01/call (USDC, eip155:8453)'), which is critical operational context. It is silent, however, on the return value and on what happens when input is unrepairable or only partially repairable.

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

Conciseness4/5

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

Front-loaded with the verb and the defect list, followed by rationale and a usage condition; nothing is buried. Minor redundancy: 'Built for the most common agentic failure mode — parsing slightly-wrong JSON from an LLM or a human' and 'Use this when an agent needs to fix LLM-mangled, truncated or sloppy JSON' restate the same point in back-to-back sentences.

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 single-parameter, non-nested tool with no output schema and no annotations, the description covers the input domain, defect scope, intended caller scenario, and cost. The one meaningful gap is that, with no output schema present, it never states what comes back (repaired JSON text? a status plus repaired text?), leaving the agent to guess at the result shape.

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?

There is a single parameter ('text') and schema description coverage is 100%, so the baseline is 3. The description adds essentially no semantics about the parameter beyond the schema; it only implies the input is a raw JSON string that may be malformed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Repairs broken JSON') and enumerates the exact defect classes handled (trailing commas, single quotes, Python literals, NaN, comments, smart quotes, truncation), which is far more informative than a bare 'fix JSON'. It does not explicitly name or contrast itself with the closely related siblings dev_json_formatter and dev_json_schema_validator, so an agent must infer the boundary between repairing, formatting, and validating.

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?

Gives clear usage context twice: 'Built for the most common agentic failure mode — parsing slightly-wrong JSON from an LLM or a human' and 'Use this when an agent needs to fix LLM-mangled, truncated or sloppy JSON.' This tells an agent the triggering condition well. It stops short of explicit exclusions or named alternatives (e.g., 'use dev_json_formatter for already-valid JSON'), which is what a 5 would require.

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