jsonshelf_repair
Repair malformed JSON. Returns valid JSON plus a diff of what was fixed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | strict | |
| input | Yes | Malformed JSON as a string. | |
| schema | No | Optional JSON Schema to conform the output to. |
Repair malformed JSON. Returns valid JSON plus a diff of what was fixed.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | strict | |
| input | Yes | Malformed JSON as a string. | |
| schema | No | Optional JSON Schema to conform the output to. |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It reveals the return format (valid JSON plus a diff) but does not explain the mode parameter effects, side effects, error behavior, or how 'repair' differs from 'coerce'. This leaves significant behavioral ambiguity.
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?
The description is a single sentence, entirely free of filler or redundancy. It front-loads the primary purpose and return type. However, it is so brief that it sacrifices valuable context, making it less effective than a slightly longer but more informative description.
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?
Despite the lack of an output schema, the description does state what is returned (valid JSON plus diff). However, with no annotations, no explanation of the two modes, no differentiation from the sibling tool, and no guidance on the optional schema, the description is insufficient for an agent to confidently invoke this tool in complex scenarios.
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 description coverage is 67%, with 'input' and 'schema' having descriptions but 'mode' only having an enum. The description adds no parameter details at all, failing to explain the semantics of 'strict' vs 'coerce' or how the optional schema is used. It could compensate for the missing coverage but does not.
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?
The description clearly states the action ('Repair') and the resource ('malformed JSON'), and it adds a distinctive return value (diff of fixes). However, it does not explicitly differentiate from the sibling jsonshelf_coerce, which likely performs a similar function, so it loses a point for missing sibling distinction.
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?
The description provides no guidance on when to use this tool versus alternatives like jsonshelf_coerce or jsonshelf_validate. It does not mention prerequisites, exclusions, or suitable contexts. This is a clear gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.