Skip to main content
Glama

Server Details

Deterministic JSON repair for LLM agents. Strips prose preambles, fixes malformed control characters, repairs truncated structures, and validates against JSON Schema — no LLM calls, no retries. Stops session poisoning in long-running agents.

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.

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/5 across 4 of 4 tools scored.

Server CoherenceA
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.

Available Tools

4 tools
repair_jsonA
Read-onlyIdempotent
Inspect

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

ParametersJSON 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.
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.

repair_stringA
Read-onlyIdempotent
Inspect

Deterministic repair engine. Given a raw LLM output that should contain JSON, this tool: (1) strips markdown code fences (```json), (2) regex-strips prose preambles/suffixes, (3) escapes unescaped control characters inside string values, (4) validates with json.loads — falling back to structural repairs and partial-recovery bracket closing when needed, and (5) optionally validates the repaired JSON against a JSON schema.

ParametersJSON Schema
NameRequiredDescriptionDefault
schemaNoOptional JSON schema. When provided, the repaired JSON is validated against it. Validation errors are translated into a list of actionable 'Fix Action' strings.
api_key_idNoYour Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after).
raw_stringYesRaw text that should contain JSON.
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds substantial behavioral detail: stripping markdown fences, regex prose removal, escaping control characters, structural repairs, partial bracket closing, and optional schema validation with actionable Fix Actions.

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 dense but well-organized as a numbered list. Every step earns its place, and the opening phrase 'Deterministic repair engine' provides an immediate summary.

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

Completeness4/5

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

The description thoroughly covers inputs, the repair process, and optional schema validation. The only notable gap is the lack of an explicit return type (e.g., repaired string vs parsed dictionary), especially since no output schema exists.

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%, so the structured fields already document all parameters. The description adds meaningful context for raw_string, schema (Fix Action translation), and api_key_id (billing), reinforcing and extending the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Deterministic repair engine' and lists a precise pipeline for repairing raw LLM output into JSON. It clearly distinguishes the tool's scope from siblings like validate_json, though it does not explicitly name sibling alternatives.

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 clearly states the intended input ('raw LLM output that should contain JSON') and when optional schema validation applies. It does not explicitly contrast with repair_json, sanitize_json_output, or validate_json, but the context is sufficiently clear.

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

sanitize_json_outputA
Read-onlyIdempotent
Inspect

Use this tool before saving any JSON data to session history or state files to prevent JSONDecodeErrors and session poisoning. It removes prose preambles and repairs malformed control characters.

ParametersJSON Schema
NameRequiredDescriptionDefault
api_key_idNoYour API key identifier, used to attribute crash-prevention metrics to your account.
raw_stringYesRaw string that should contain JSON, possibly with prose or control character issues.
Behavior4/5

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

Annotations already declare the tool as read-only, idempotent, and non-destructive. The description adds meaningful behavior details: it removes prose preambles and repairs malformed control characters, and explains the consequences it prevents (JSONDecodeErrors, session poisoning). This goes beyond the annotation information.

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 two concise sentences, with the first sentence front-loading the usage context and the second describing the behavior. No filler or redundant information.

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

Completeness4/5

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

This is a simple tool with one required parameter and no output schema. The description covers when and what clearly. It does not explicitly state the return value or the role of api_key_id, but these are reasonably inferable from the tool's purpose and schema descriptions, making it slightly incomplete but adequate.

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 100%, so the baseline is 3. The description adds no parameter-specific details, but the schema already provides clear descriptions for both raw_string and api_key_id, so no additional burden falls on the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: sanitize JSON output by removing prose and repairing control characters before saving. It differentiates itself from siblings by focusing on the pre-save use case, though it does not explicitly contrast with repair_json or validate_json by name.

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 explicitly says when to use the tool: 'before saving any JSON data to session history or state files.' It provides a clear context and rationale, but it doesn't mention when not to use it or alternative tools for validation/repair in other scenarios.

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

validate_jsonA
Read-onlyIdempotent
Inspect

Check whether a JSON string is valid. Returns parsed object on success.

ParametersJSON 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 JSON text to validate.
Behavior3/5

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

Annotations already declare readOnlyHints and idempotentHints, so the description goes beyond by stating the success return value. But it omits behavior on invalid JSON (e.g., whether it throws or returns error), leaving a transparency gap.

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 exactly two sentences, tightly packaged with the core verb, input, and success return. No filler or redundant restatement of the tool name or schema.

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

Completeness4/5

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

For a simple validation tool with one required parameter and strong annotations, the description covers the success path and core operation. It could mention the invalid-input behavior, but the tool is simple enough that this is not critical.

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?

The input schema fully describes both parameters, so the description need not elaborate. The description adds no extra meaning beyond what the schema already provides.

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 a specific verb ('Check whether') and names the resource ('JSON string'), with a clear success outcome ('Returns parsed object on success'). This distinguishes it from sibling tools like repair_json and sanitize_json_output.

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?

The usage is implied: use this when you need to verify JSON validity. However, it does not explicitly compare with repair_json or sanitize_json_output, nor state when not to use it.

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!

Related MCP Servers

View all MCP Servers

Try in Browser

Your Connectors

Sign in to create a connector for this server.

Resources