Skip to main content
Glama

Repair malformed JSON

json_repair
Read-onlyIdempotent

Repair common malformed JSON (single quotes, trailing commas, unquoted keys) and return valid structured JSON. Paid: $0.005 USDC per call via x402 on Base. Calling without payment returns the payment requirement; invalid input is not charged.

Input Schema

NameRequiredDescriptionDefault
inputYesMalformed JSON text to repair, e.g. {'hello':'world',}

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / input / description
      Added value: +"Malformed JSON text to repair, e.g. {'hello':'world',}"
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: pricing ($0.005 USDC per call via x402 on Base), what an unpaid call returns (the payment requirement rather than an error), and that invalid input is not charged. These are exactly the operational facts an agent needs and none are expressed in the 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?

Three short sentences: capability first, payment second, error semantics third. No filler, no repetition of the title, and the most decision-relevant clause (price) is front-loaded in sentence two.

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?

For a one-parameter tool with no output schema, the description covers purpose, return shape ('valid structured JSON'), cost, and failure-billing behavior, which together answer every question an agent would have before invoking it.

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 100% and the single parameter already carries an example of malformed input, so the schema does the explanatory work. The description adds no further constraint or format detail about the input string, which is the baseline case.

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 ('Repair ... JSON') and enumerates the concrete malformation classes it handles (single quotes, trailing commas, unquoted keys), which no sibling tool touches. An agent can identify the capability without opening the schema.

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?

The examples of malformations give clear context for when this applies, and the input example reinforces it. It does not name an alternative or an exclusion (e.g., when to use a general parser instead), so it stops short of full routing guidance.

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