Skip to main content
Glama

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
Repository
ktcod/x402-json-repair-mcp
GitHub Stars
0

Glama MCP Gateway

Connect through Glama MCP Gateway for full control over tool access and complete visibility into every call.

MCP client
Glama
MCP server

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.

100% free. Your data is private.
Tool DescriptionsA

Average 4.7/5 across 2 of 2 tools scored.

Server CoherenceA
Disambiguation5/5

The two tools have entirely distinct purposes: one handles malformed JSON and schema validation, the other converts tabular text to JSON. There is no overlap or ambiguity.

Naming Consistency4/5

Both names use underscores and an adjective describing the input, but one ends with a verb (repair) and the other with a target format (to_json). Mostly consistent with a minor deviation.

Tool Count3/5

With only 2 tools, it falls below the typical 3-15 range, but the tools are comprehensive and well-scoped for the server's focus on data cleaning. Slightly thin but not unreasonable.

Completeness4/5

Covers key JSON repair and tabular conversion tasks well, with schema support. Minor gap: the server name implies only JSON repair, yet includes tabular conversion; no obvious missing operations for the covered domains.

Available Tools

2 tools
structured_json_repairStructured JSON RepairA
Read-onlyIdempotent
Inspect

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 }

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYesRaw or malformed JSON text to repair. Examples: "{name: 'Ada', age: '36',}", a ```json fenced block, or a truncated '{"items":[1,2,3'.
coerceNoWhen true (default), coerce primitives to satisfy the schema before validating (e.g. "36" -> 36).
schemaNoOptional JSON Schema (draft 2020-12) object to validate and coerce the repaired JSON against.

Output Schema

ParametersJSON Schema
NameRequiredDescription
okYesTrue if the result is valid JSON (and schema-valid when a schema was provided).
dataNoThe repaired/validated JSON value (object, array, or primitive). null when repair failed.
errorsYesActionable error messages when ok is false (empty when ok is true).
changedYesTrue if any repair or coercion changed the input.
repairsYesHuman-readable description of each repair or coercion applied.
Behavior5/5

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

Annotations already indicate idempotent and non-destructive behavior. The description adds important behavioral details: 'Pure deterministic compute', the list of what it fixes (trailing commas, single quotes, etc.), and that it does not make network/model calls.

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 well-structured and concise: front-loads main purpose and key properties, then lists fixes, usage guidelines, parameters, and return value. Every sentence adds value without redundancy.

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?

The description is complete given the tool's complexity and the presence of input and output schemas. It covers all aspects: what it does, what it fixes, when to use, parameters, and return format. No gaps.

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?

Schema coverage is 100% and includes descriptions. The description reinforces each parameter with examples and clarifications (e.g., input examples, coerce default behavior, schema draft version). This adds meaningful context beyond the schema, earning a score above baseline 3.

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 clearly states the tool's purpose: to repair messy/invalid JSON into clean valid JSON, optionally validating against a schema. It distinguishes itself from the sibling tool 'tabular_to_json' by focusing on repairing malformed JSON rather than converting tabular data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use (when JSON.parse fails or schema validation needed) and when-not-to-use (input already valid JSON with no schema check). This effectively guides the agent to select the tool appropriately.

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 JSONA
Read-onlyIdempotent
Inspect

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 }

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYesRaw tabular text: a CSV/TSV block or a Markdown table.
formatNoForce a parser or auto-detect (default 'auto').auto
schemaNoOptional JSON Schema (draft 2020-12) to validate/coerce each row object against.
hasHeaderNoWhether the first row is a header. 'auto' uses a heuristic.auto
inferTypesNoWhen true (default), infer cell types (number/integer/boolean/null); else keep strings.

Output Schema

ParametersJSON Schema
NameRequiredDescription
okYesTrue if the input parsed as a table (and every row is schema-valid when a schema was given).
rowsYesOne JSON object per data row, keyed by column name.
errorsYesActionable error messages when ok is false (empty when ok is true).
formatYesThe detected/used format.
changedYesTrue if any normalization or coercion changed the input.
columnsYesInferred column names and types.
repairsYesHuman-readable description of each normalization applied.
rowCountYesNumber of data rows returned.
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint false), the description adds key behavioral details: 'Pure deterministic compute — no network or model calls,' the list of edge cases handled (BOM, ragged rows, etc.), and the complete output structure including error and repair messages. No contradictions 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose and then uses bullet-like list for capabilities. It is appropriately sized for the tool's complexity. Minor redundancy (e.g., repeated mention of types) but overall efficient and well-organized.

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?

Given the detailed annotations, rich input schema (5 parameters with enums and defaults), and a complete output schema, the description covers all aspects: purpose, usage, behavior, parameters, and return values. It is fully self-contained and leaves no ambiguity.

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 description coverage is 100%, so the baseline is 3. The description does not add substantial new information about parameters beyond what the schema already provides; it only reiterates their purpose in context. No further semantic enhancement needed.

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 begins with a clear verb ('Convert') and resource ('messy tabular text into clean, typed JSON rows'). It explicitly distinguishes from the sibling tool 'structured_json_repair' by stating it is for tabular text, not JSON repair. The purpose is specific and unambiguous.

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 description provides explicit 'When to use' and 'When NOT to use' sections, including specific formats and data types. It mentions that the tool is for CSV/TSV/Markdown and not for clean JSON or binary formats. Although it does not mention the sibling tool by name, the guidance is clear and sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.