Skip to main content
Glama

Tidy Byte Tools API

Repair JSON

json_repair
Read-onlyIdempotent

Fix broken or incomplete JSON, including text from language models.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
textNoThe broken or cut-off JSON text to fix. Code fences and text from language models are fine.

Output Schema

NameRequiredDescriptionDefault
okYes
toolYes
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / description
      Added value: +"The broken or cut-off JSON text to fix. Code fences and text from language models are fine."
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so the safety profile is fully covered elsewhere. The one piece of added context is tolerance for language-model output, which signals best-effort parsing of prose-wrapped input. It does not say what happens when input is unrecoverable (error vs. partial result), which is the key behavioral unknown for a repair tool.

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?

One short sentence, front-loaded with the verb and resource, with no filler or repetition. Every clause contributes.

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?

With an output schema present, a fully documented single parameter, and complete annotations, almost nothing needs to live in the description. The only shortfall is silence on failure behavior for unrepairable input, which matters for a repair utility.

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 single "text" parameter is already fully documented, including the same note about code fences and language-model text. The description adds nothing beyond the schema, so the baseline 3 applies.

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?

"Fix broken or incomplete JSON" states a specific verb and resource, and the qualifier "broken or incomplete" distinguishes it from a plain formatter like json_format. It does not name any sibling explicitly, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The condition for use is implied by "broken or incomplete" — an agent can infer it should reach for this when JSON fails to parse. However, there is no explicit when-not guidance (e.g., use json_format for already-valid JSON) and no stated alternatives among the many JSON-adjacent siblings.

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.