Skip to main content
Glama

Lordevo Shop: website checks for agents (x402)

JSON repair for LLM output (fences, quotes, commas, truncation) ($0.0021/call)

json_repair
Read-onlyIdempotent

$0.0021 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Turns malformed or LLM-style JSON into valid JSON: removes code fences and leading text, fixes trailing commas, single or smart quotes, unquoted keys, comments, Python constants and truncated endings, and lists the problem types found. Input: json (POST for large input). Limit: 1 MB. Offline.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text, up to 1 MB (a JSON value is also accepted in a POST body or MCP arguments)
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.

Output Schema

NameRequiredDescriptionDefault
toolNo
cacheNo
fixesNo
_trialNoPresent when the call was a free trial call.
changedNo
providerNo
repairedNo
price_usdNo
input_was_validNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "repaired",
      +        "fixes"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "changed": {
      +      "type": "boolean"
      +    },
      +    "fixes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "input_was_valid": {
      +      "type": "boolean"
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "repaired": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/closed-world/non-destructive, so the bar is lower; the description still adds real context: 1 MB input limit, offline operation, the 'lists the problem types found' behavior, and the payment/trial model with its 3-per-IP-per-day quota. It does not say what happens on unrecoverable input, which is the one notable gap.

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?

Two dense sentences that front-load pricing and then the capability; nearly every clause carries information. The parenthetical of fix types is long but each item is a legitimately distinct repair case, so it earns its space.

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?

With an output schema present, return values need not be described; the description still covers cost, quota, size limit, transport option, and offline behavior. For a two-parameter, single-purpose utility, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description adds meaning the schema does not: a JSON value may be sent via POST body instead of a string, the 1 MB ceiling, and the trial parameter's fallback-to-payment semantics and daily quota. This genuinely supplements the schema rather than repeating it.

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?

The description names a specific transformation ('Turns malformed or LLM-style JSON into valid JSON') and enumerates exactly what it fixes: fences, leading text, trailing commas, quotes, unquoted keys, comments, Python constants, truncation. That is far stronger than a restated title, though no sibling (e.g. json_validate, json_query) is named to sharpen the boundary.

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?

Use-when is implied by the enumeration of malformed input classes, and the trial mechanism is explained. However, there is no explicit statement of when not to use it (e.g. for merely checking validity, use json_validate) and no alternatives are named.

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