Skip to main content
Glama

Johto Data JSON Repair

json_repair
Read-only

POST broken or LLM-truncated JSON (max 16 KB). Returns valid JSON plus an ordered list of fixes: code fences, comments, single quotes, bare keys, trailing or missing commas, Python literals and unclosed strings, arrays or objects. Valid input is returned unchanged. Costs $0.005 USDC per call via x402. Without payment, the call returns the x402 payment requirements; retry with an X-PAYMENT or PAYMENT-SIGNATURE header, or params._meta["x402/payment"].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "json_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesBroken JSON text, max 16 KB

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds substantial context beyond them: the $0.005 USDC x402 cost, the unpaid-request behavior (returns payment requirements rather than failing opaquely), and the retry path via X-PAYMENT/PAYMENT-SIGNATURE headers or params._meta. That payment/auth disclosure is genuinely valuable for an agent. The 'POST' wording is an HTTP method convention, not a claim of side effects, so it does not contradict readOnlyHint.

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 purpose and return shape, then the payment mechanics. Every clause carries information and there is no filler. It is dense — the x402 payment sentence is long — but each part earns its place.

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?

No output schema exists, yet the description explains the return value (valid JSON plus an ordered list of fixes) and the failure path (unpaid calls return payment requirements). For a one-parameter transformation tool with a paywall, an agent has everything needed to call it and to recover from a 402-style response.

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 with 100% schema description coverage, and the schema already states both the type and the 16 KB limit. The description's 'max 16 KB' merely repeats the schema, adding no new meaning about format or encoding. Baseline 3 applies when the schema does the documentation work.

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: takes broken or LLM-truncated JSON and returns valid JSON plus an ordered list of fixes. It enumerates the exact defect classes it handles (code fences, comments, single quotes, bare keys, commas, Python literals, unclosed strings/arrays/objects), which makes it clearly distinct from siblings like extract_jsonld or html_to_rag.

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 context for when this is appropriate (broken or truncated JSON, 16 KB cap) and notes that valid input passes through unchanged, which tells the agent it is safe to call defensively. It does not name an alternative tool or an explicit when-not-to-use case, so it stops short of a 5.

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