x402 JSON Repair
Server Details
Pay-per-call JSON repair + JSON Schema validation for AI agents (USDC on Base, x402).
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP
- URL
Glama MCP Gateway
Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.
Full call logging
Every tool call is logged with complete inputs and outputs, so you can debug issues and audit what your agents are doing.
Tool access control
Enable or disable individual tools per connector, so you decide what your agents can and cannot do.
Managed credentials
Glama handles OAuth flows, token storage, and automatic rotation, so credentials never expire on your clients.
Usage analytics
See which tools your agents call, how often, and when, so you can understand usage patterns and catch anomalies.
Tool Definition Quality
Average 4.9/5 across 2 of 2 tools scored.
The two tools have completely distinct purposes: one repairs malformed JSON, the other converts tabular text to JSON. There is zero overlap in functionality, making it unambiguous which tool to use for a given task.
Both names use snake_case and are descriptive, but they follow slightly different patterns: 'structured_json_repair' includes the target format and action, while 'tabular_to_json' specifies source and target format. This minor inconsistency prevents a perfect score.
With only 2 tools, the server is narrowly scoped but covers its stated purpose well. It could benefit from additional related tools (e.g., JSON minification), but the current count is not unreasonable for a focused utility.
The set covers JSON repair with schema validation and tabular-to-JSON conversion comprehensively. Minor gaps exist (e.g., no tool for other data formats like XML), but the core functionality is well-rounded for the server's intended domain.
Available Tools
2 toolsstructured_json_repairStructured JSON RepairARead-onlyIdempotentInspect
Repair messy or invalid JSON (the kind LLMs and tools often emit) into clean, valid JSON, and optionally validate/coerce it against a JSON Schema. Pure deterministic compute — no network or model calls.
What it fixes: trailing commas, single-quoted strings, unquoted keys, Python literals (None/True/False), NaN/Infinity, Markdown code-fence wrappers, and truncated/garbled tails.
When to use: you received text that should be JSON but JSON.parse fails, or you have JSON that must conform to a specific schema and want types coerced (e.g. "36" -> 36, "true" -> true).
When NOT to use: the input is already known-valid JSON and no schema check is needed.
Args:
input (string, required): the raw/malformed JSON text.
schema (object, optional): a JSON Schema (draft 2020-12) to validate and coerce against.
coerce (boolean, optional, default true): coerce primitive types to satisfy the schema before validating.
Returns structuredContent: { "ok": boolean, // true if valid JSON (and schema-valid when a schema was given) "data": any, // the repaired/validated JSON value; null if unfixable "changed": boolean, // true if any repair or coercion modified the input "errors": string[], // actionable messages when ok is false "repairs": string[] // description of each fix applied }
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Raw or malformed JSON text to repair. Examples: "{name: 'Ada', age: '36',}", a ```json fenced block, or a truncated '{"items":[1,2,3'. | |
| coerce | No | When true (default), coerce primitives to satisfy the schema before validating (e.g. "36" -> 36). | |
| schema | No | Optional JSON Schema (draft 2020-12) object to validate and coerce the repaired JSON against. |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | True if the result is valid JSON (and schema-valid when a schema was provided). |
| data | No | The repaired/validated JSON value (object, array, or primitive). null when repair failed. |
| errors | Yes | Actionable error messages when ok is false (empty when ok is true). |
| changed | Yes | True if any repair or coercion changed the input. |
| repairs | Yes | Human-readable description of each repair or coercion applied. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses beyond annotations: 'Pure deterministic compute — no network or model calls.' Lists specific fixes (trailing commas, single quotes, etc.). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-organized with clear sections: purpose, fixes list, usage guidelines, args, return structure. Every sentence adds value; no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all necessary context: what it fixes, when to use/not use, parameter details, return structure with fields. Output schema exists but description still explains return format. Excellent completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions, and description adds example values, default behavior for coerce, and schema draft version. Adds significant meaning beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it repairs messy/invalid JSON into valid JSON, optionally validating against a schema. Distinguishes from sibling 'tabular_to_json' which converts tabular data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides 'When to use' and 'When NOT to use' sections, with concrete examples. Guides agent away from using when input is already valid JSON and no schema check needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tabular_to_jsonTabular to JSONARead-onlyIdempotentInspect
Convert messy tabular text into clean, typed JSON rows. Auto-detects CSV, TSV, or a Markdown table and returns one JSON object per row plus an inferred column/type summary. Pure deterministic compute — no network or model calls.
What it handles: delimiter sniffing (comma/semicolon/tab/pipe), quoted fields with embedded commas and newlines, BOM, ragged rows (padded/truncated), Markdown separator rows and escaped pipes, header auto-detection, and per-column type inference (integer/number/boolean/null/string).
When to use: you have CSV/TSV/Markdown-table text (often emitted by tools or LLMs) and want structured, typed rows — optionally validated/coerced against a JSON Schema.
When NOT to use: the data is already clean JSON, or it is HTML/xlsx/binary (not supported).
Args:
input (string, required): raw tabular text.
format ("auto"|"csv"|"tsv"|"markdown", default "auto"): force a format or auto-detect.
hasHeader ("auto"|"true"|"false", default "auto"): whether the first row is a header.
inferTypes (boolean, default true): coerce cells to number/integer/boolean/null; else keep strings.
schema (object, optional): JSON Schema (draft 2020-12) to validate/coerce each row object against.
Returns structuredContent: { "ok": boolean, // false if the input cannot be parsed as a table "format": "csv"|"tsv"|"markdown", "columns": [{ "name": string, "type": string }], "rows": [{ ... }], // one object per row, keyed by column name "rowCount": number, "changed": boolean, // true if any normalization/coercion happened "errors": string[], // actionable messages when ok is false "repairs": string[] // description of each normalization applied }
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Raw tabular text: a CSV/TSV block or a Markdown table. | |
| format | No | Force a parser or auto-detect (default 'auto'). | auto |
| schema | No | Optional JSON Schema (draft 2020-12) to validate/coerce each row object against. | |
| hasHeader | No | Whether the first row is a header. 'auto' uses a heuristic. | auto |
| inferTypes | No | When true (default), infer cell types (number/integer/boolean/null); else keep strings. |
Output Schema
| Name | Required | Description |
|---|---|---|
| ok | Yes | True if the input parsed as a table (and every row is schema-valid when a schema was given). |
| rows | Yes | One JSON object per data row, keyed by column name. |
| errors | Yes | Actionable error messages when ok is false (empty when ok is true). |
| format | Yes | The detected/used format. |
| changed | Yes | True if any normalization or coercion changed the input. |
| columns | Yes | Inferred column names and types. |
| repairs | Yes | Human-readable description of each normalization applied. |
| rowCount | Yes | Number of data rows returned. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses deterministic compute, auto-detection, type inference, and error handling. Adds detail beyond annotations (e.g., no network calls, ragged row handling). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections, but somewhat lengthy. Every sentence adds value, though could be slightly trimmed without loss of clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers input parsing, all parameters, output structure (including fields like 'repairs'), edge cases, and error behavior. No gaps given the tool's complexity and presence of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 5 parameters are described in schema (100% coverage). Description adds context (e.g., format variants, schema purpose) but baseline is 3; the extra detail earns a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states conversion of messy tabular text to typed JSON rows, lists supported formats (CSV, TSV, Markdown), and distinguishes from sibling 'structured_json_repair' which targets JSON repair.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit 'When to use' and 'When NOT to use' sections, with concrete examples like avoiding clean JSON or binary formats. Provides clear context for appropriate invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Claim this connector by publishing a /.well-known/glama.json file on your server's domain with the following structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"maintainers": [{ "email": "your-email@example.com" }]
}The email address must match the email associated with your Glama account. Once published, Glama will automatically detect and verify the file within a few minutes.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!