Skip to main content
Glama

Grokzilla Micro Pay

json_repair

Repair malformed or truncated JSON from LLMs, JS or Python: strips ```json fences and comments, fixes trailing commas, single quotes, unquoted keys, True/False/None, missing commas and unclosed strings/brackets. Returns the parsed JSON, a compact repaired JSON string and the list of fixes. Deterministic, no network. Price $0.0041 via x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/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 burden and does so largely well: it discloses the return shape (parsed JSON, compact repaired string, list of fixes), states determinism, and confirms no network access. It omits any mention of failure behavior or limits (e.g. what happens if repair is impossible, the 400k length cap).

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?

A dense but well-structured single paragraph; the enumeration of supported fixes and the return-spec are front-loaded and useful. Slightly crowded, and the pricing tail is arguably noise for invocation, but nothing is padded or repetitive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-input tool with no output schema and no annotations, the description should fully specify the input contract and edge behavior. It covers returns and capabilities well but leaves the input parameter and failure modes unspecified, and ships no output schema to compensate.

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 coverage is 0% and there is one parameter, 'text', whose meaning is somewhat inferable from the description but never explicitly defined (e.g. that it is the raw malformed string). With only one param the baseline is around 3-4, but the description adds no format or example guidance.

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 (Repair) and resource (malformed/truncated JSON) and enumerates the concrete failure classes it handles, distinguishing it clearly from siblings like json_flatten, json_sort, and json_schema_validate.

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 (input from LLMs, JS or Python) that implies when the tool is applicable, but never explicitly excludes or contrasts against sibling tools such as json_schema_validate, which also touches malformed JSON.

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