Skip to main content
Glama

data.json-repair

Read-onlyIdempotent

Repair caller-supplied malformed JSON by safely removing an outer Markdown fence, comments, single-quoted strings, unquoted identifier keys, Python literals, and trailing commas, with transformation hashes and strict rejection of duplicate keys or non-finite numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
repairsNoSafe repair classes to permit; service execution order is fixed and deterministic

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesStructured Deterministic JSON repair result
metaYes
serviceYes
versionYes
request_idYesUnique request identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / checkout_path
      Added value: +{
      +  "pattern": "^/try/",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / executes_automatically
      Added value: +{
      +  "const": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / handoff_path
      Added value: +{
      +  "description": "Free full contract and spend-capped command handoff; reading it does not execute or purchase the follow-up.",
      +  "pattern": "^/catalog/",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / handoff_payment_required
      Added value: +{
      +  "const": false,
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / maximum_atomic_usdc
      Added value: +{
      +  "pattern": "^[1-9][0-9]*$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / meta / properties / next_actions / items / properties / sample_path
      Added value: +{
      +  "pattern": "^/samples/",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / meta / properties / next_actions / items / required
      Previous value: -[
      -  "service",
      -  "title",
      -  "reason",
      -  "method",
      -  "path",
      -  "price",
      -  "input_template",
      -  "use_output",
      -  "authorization_required"
      -]New value: +[
      +  "service",
      +  "title",
      +  "reason",
      +  "method",
      +  "path",
      +  "price",
      +  "input_template",
      +  "use_output",
      +  "handoff_path",
      +  "checkout_path",
      +  "sample_path",
      +  "maximum_atomic_usdc",
      +  "handoff_payment_required",
      +  "executes_automatically",
      +  "authorization_required"
      +]
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive. The description adds valuable behavior context: transformation hashes, strict rejection of duplicate keys or non-finite numbers, and 'safely' removing. 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.

Conciseness4/5

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

A single dense sentence front-loaded with the core action. Each clause adds unique information, making it compact yet comprehensive. Slightly long but appropriate for the complexity of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers repair types and rejection constraints, but leaves open questions about default repairs when the optional `repairs` array is omitted and behavior for already-valid JSON. Output schema likely explains return values, so this is sufficient but not exhaustive.

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 50% (only `repairs` has a description). The tool description enumerates repair classes that map directly to the `repairs` enum and clarifies `content` as caller-supplied JSON. However, it does not explain default behavior when `repairs` is omitted or how transformation hashes appear in output, leaving gaps.

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 repairs malformed JSON, enumerating specific operations (outer Markdown fence, comments, single-quoted strings, unquoted keys, Python literals, trailing commas) and constraints (transformation hashes, strict rejection of duplicate keys/non-finite numbers). This distinguishes it from generic data.clean or data.convert tools.

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?

Provides clear context: use for caller-supplied malformed JSON. It does not explicitly name alternatives (e.g., data.schema-validate for validation, data.clean for general cleaning) or state when not to use, but the specific repair scope implies the intended use case.

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