Skip to main content
Glama

repair_json

Read-onlyIdempotent

Attempt to repair common JSON issues: trailing commas, single quotes, unquoted keys, Python/JS literals, truncated structures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_key_idNoYour Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after).
json_stringYesThe malformed JSON text to repair.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds value by specifying the exact types of damage it can handle and the cautious 'Attempt' qualifier. It does not discuss failure modes or return format, but the safety profile is well covered by annotations.

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?

The description is a single, front-loaded sentence that immediately states the purpose and lists specific issues. Every word earns its place, with no redundant explanation or filler.

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?

The schema and annotations thoroughly cover input parameters and safety profile. However, with no output schema, the description does not explain what the tool returns on success or failure. For a repair operation, this is a notable gap, making the overall context slightly incomplete.

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?

Both parameters (api_key_id and json_string) have full descriptions in the schema, achieving 100% coverage. The description does not add any parameter-level meaning beyond the schema, so the baseline of 3 is appropriate.

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?

The description uses the specific verb 'repair' and enumerates concrete JSON issues (trailing commas, single quotes, etc.), making the tool's function clear. It is distinct from sibling tools like validate_json and sanitize_json_output, which focus on validation and sanitization rather than repair.

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?

Usage is implied: use this when JSON is malformed with the listed issues. However, there is no explicit guidance on when not to use it, nor any mention of alternatives like validate_json for checking validity first. The description provides context but lacks exclusions or decision criteria.

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