Skip to main content
Glama

iafri x402 APIs

json_preflight

Read-only

Deterministic broken-JSON preflight & repair (GET ?data=... or POST raw body): strips markdown code fences, JS comments, trailing commas, single-quoted strings & closes truncated brackets, returning valid_as_is, repaired, repairs_applied, top_level_type, key_count & parsed JSON. Price $0.002 per call via x402, USDC on Base.

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": {
      "data": "<data>"
    },
    "name": "json_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesRaw JSON or broken JSON string to validate and deterministically repair (strips markdown code fences, JS comments, trailing commas, single-quoted strings, and closes truncated brackets).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnlyHint=true (consistent with a validate/repair operation), it discloses determinism, the exact repair set applied, the response field names, and the payment requirement ($0.002 per call via x402, USDC on Base). Cost and payment mechanism are behavior an agent cannot infer from annotations alone.

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?

A single dense sentence with the tool's identity front-loaded, the repair list in the middle, and output fields plus pricing at the end. No filler sentences, and the parenthetical repair list is scannable.

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?

There is no output schema, so the description's enumeration of return fields (valid_as_is, repaired, repairs_applied, top_level_type, key_count, parsed JSON) is exactly what an agent needs to interpret results. For a one-parameter, non-destructive tool this is complete.

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

Parameters4/5

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

With one parameter at 100% schema coverage the schema already carries the meaning of 'data'. The description still adds value by specifying the transport options (query string vs raw body) and restating the repair scope, though it adds no size limits or encoding expectations.

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 ('Deterministic broken-JSON preflight & repair') and enumerates exactly what it fixes, letting an agent distinguish it from csv_preflight even though no sibling is named. The output field list further pins down what the call produces.

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 description explains how to supply input (GET ?data=... or POST raw body) and the per-call price, which is useful invocation context. It does not say when to prefer this over alternatives such as extract_markdown or csv_preflight, nor does it give any exclusions, so usage is implied rather than stated.

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