Skip to main content
Glama

repair_json

Read-onlyIdempotent

Attempt to repair common JSON issues: trailing commas, single quotes, unquoted keys, Python/JS literals, truncated structures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_key_idNoYour Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after).
json_stringYesThe malformed JSON text to repair.

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds value by specifying the exact types of damage it can handle and the cautious 'Attempt' qualifier. It does not discuss failure modes or return format, but the safety profile is well covered by annotations.

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 a single, front-loaded sentence that immediately states the purpose and lists specific issues. Every word earns its place, with no redundant explanation or filler.

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 schema and annotations thoroughly cover input parameters and safety profile. However, with no output schema, the description does not explain what the tool returns on success or failure. For a repair operation, this is a notable gap, making the overall context slightly incomplete.

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?

Both parameters (api_key_id and json_string) have full descriptions in the schema, achieving 100% coverage. The description does not add any parameter-level meaning beyond the schema, so the baseline of 3 is appropriate.

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 uses the specific verb 'repair' and enumerates concrete JSON issues (trailing commas, single quotes, etc.), making the tool's function clear. It is distinct from sibling tools like validate_json and sanitize_json_output, which focus on validation and sanitization rather than repair.

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?

Usage is implied: use this when JSON is malformed with the listed issues. However, there is no explicit guidance on when not to use it, nor any mention of alternatives like validate_json for checking validity first. The description provides context but lacks exclusions or decision criteria.

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.

TDQS

A3.8/5.0
Disambiguation2/5

The three repair tools (repair_json, repair_string, sanitize_json_output) have heavily overlapping purposes. While repair_string has a more detailed description, an agent may struggle to choose between it, the generic repair_json, and sanitize_json_output, which also repairs control characters and removes prose. Only validate_json is clearly distinct.

Naming Consistency3/5

The names mix patterns: repair_json and repair_string use the 'repair' verb with different objects, while validate_json and sanitize_json_output use other verbs. The object naming is also inconsistent (json, string, json_output). Overall the set is readable but lacks a uniform convention.

Tool Count4/5

Four tools is a reasonable count for a JSON sanity server, fitting within the typical well-scoped range. However, the inclusion of three overlapping repair functions suggests the count could be trimmed without losing core functionality.

Completeness5/5

The server covers the full lifecycle for its stated purpose: validation (validate_json), repair (repair_json, repair_string), and sanitization (sanitize_json_output). It includes schema validation in repair_string, leaving no obvious gaps in the domain of ensuring JSON sanity.

Resources