Skip to main content
Glama

FixMyJSON

repair_json

Repair malformed JSON produced by an LLM or agent (trailing commas, missing quotes, code fences, chatty text around the JSON, blocks, double-encoded JSON) and check the result against a JSON Schema. Returns the repaired value, what was changed, what could not be fixed (unresolved_errors), and truncated: true when the input looks cut off (e.g. by a token limit) so you can retry instead of trusting it. It never invents missing data. Free trial, no signup: 20 calls per client per day, 20000 characters per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe raw model output (a string), or an already-parsed object/array.
schemaYesA JSON Schema (draft 2020-12) describing the desired shape.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that it never invents missing data, reports what could not be fixed via `unresolved_errors`, sets `truncated: true` on cut-off input, and states free-tier rate limits (20 calls/client/day, 20000 chars/call). These are exactly the behavioral traits an agent needs before trusting output.

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 core action, then the return contract, then limits. The parenthetical failure-mode list is long but each item maps to a real repair case rather than padding; still, it is denser than strictly necessary.

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 and no annotations exist, so the description must explain returns — and it does (repaired value, changes made, unresolved_errors, truncated flag). Combined with the repair guarantees and rate limits, nothing an agent needs to call or interpret the tool is missing.

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%: both `data` and `schema` are documented in the schema itself, including that `data` may be a raw string or parsed object. The description restates the purpose of `schema` (validate result) but adds no format or syntax detail beyond the structured fields, so baseline 3 applies.

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+resource ('repair malformed JSON') and enumerates the concrete failure classes it targets (trailing commas, missing quotes, code fences, chatty text, thinking blocks, double-encoding), so an agent knows exactly what inputs qualify. It also names the secondary action (schema validation), distinguishing it from any generic parser.

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?

Clearly signals the use case (LLM/agent output that may be malformed) and gives an explicit follow-up action on `truncated: true` (retry rather than trust). No alternatives or exclusions are needed since there are no sibling tools, but it never states when NOT to use it.

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