json-sanity
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.
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.
Tool Definition Quality
Average 4/5 across 4 of 4 tools scored.
Multiple tools have overlapping purposes: repair_json, repair_string, and sanitize_json_output all aim to fix or sanitize JSON, making it difficult for an agent to distinguish between them. validate_json is the only clearly distinct tool.
All tool names follow a consistent verb_noun pattern (e.g., repair_json, validate_json) using snake_case, with no mixed conventions.
With 4 tools, the server is well-scoped for the JSON sanity domain, covering repair, sanitization, and validation without being overly numerous or sparse.
The tool surface covers core JSON repair and validation but has notable redundancy (three repair-oriented tools) and lacks features like formatting or structural transformation, which are common in JSON utilities.
Available Tools
4 toolsrepair_jsonARead-onlyIdempotentInspect
Attempt to repair common JSON issues: trailing commas, single quotes, unquoted keys, Python/JS literals, truncated structures.
| Name | Required | Description | Default |
|---|---|---|---|
| api_key_id | No | Your Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after). | |
| json_string | Yes | The malformed JSON text to repair. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide safety profile (readOnlyHint, idempotentHint), and description adds detail on specific repairs attempted. 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with front-loaded action and list of repair targets; no redundant words.
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?
Adequate for core purpose but missing behavior on repair failure (returns original? error?), and no mention of return format despite lacking output schema.
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 covers 100% of parameters, so baseline is 3. Description does not add meaning beyond schema (e.g., does not explain api_key_id purpose or json_string format).
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?
Description uses specific verb 'repair' and lists concrete issues (trailing commas, single quotes, etc.), clearly distinguishing from siblings like 'validate_json' and 'repair_string'.
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?
No explicit guidance on when to use this tool vs alternatives (e.g., 'validate_json' for checking validity first), nor any when-not-to-use conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
repair_stringARead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Optional 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_id | No | Your Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after). | |
| raw_string | Yes | Raw text that should contain JSON. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description fully discloses behavioral traits beyond the annotations: deterministic processing, markdown fence stripping, regex prose removal, control character escaping, validation with fallback repairs, and optional schema validation. Annotations already indicate read-only, idempotent, non-destructive behavior, and the description aligns without contradiction.
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 concise at 3 sentences, packed with information. It opens with the core purpose ('Deterministic repair engine') and lists steps in a structured manner. No superfluous text, but minor improvement could be bullet points for readability.
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?
Given the lack of an output schema, the description adequately explains the input processing and expected outcome (repaired JSON). It does not explicitly describe the return format, but the steps imply what the output will be. The presence of sibling tools provides context, making the description sufficient for selecting this tool.
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?
The input schema covers 100% of parameters, and the description adds value by explaining that the optional 'schema' parameter triggers validation and translates errors into 'Fix Action' strings. This goes beyond the schema description, though the 'raw_string' and 'api_key_id' are already well-described in the schema.
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 tool's purpose: a deterministic repair engine for raw LLM output containing JSON. It enumerates specific steps (stripping fences, escaping characters, validation) and differentiates from siblings like validate_json by focusing on repair rather than just validation.
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 implicitly defines when to use the tool ('Given a raw LLM output that should contain JSON'), but it does not explicitly contrast with sibling tools or provide criteria for when not to use it. The usage context is clear but lacks explicit exclusion guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sanitize_json_outputARead-onlyIdempotentInspect
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.
| Name | Required | Description | Default |
|---|---|---|---|
| api_key_id | No | Your API key identifier, used to attribute crash-prevention metrics to your account. | |
| raw_string | Yes | Raw string that should contain JSON, possibly with prose or control character issues. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only and idempotent; description adds specific behaviors (removing prose, fixing control characters). No contradictions.
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?
Two sentences, no fluff, front-loaded with action and context. Every word earns its place.
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?
Covers purpose, scenario, and basic actions. Lacks output description or error handling, but for a simple sanitization tool it is adequate.
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 coverage is 100%, so baseline is 3. Description provides no additional parameter meaning beyond what the schema already describes.
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?
Clearly states it sanitizes JSON by removing prose and repairing control characters, with a specific use case. However, does not explicitly distinguish from sibling tools like repair_json or validate_json, but the verb 'sanitize' and specific actions are clear.
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?
Explicitly tells when to use ('before saving to session/state') and why (prevent errors/poisoning), but does not mention when not to use or compare to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_jsonARead-onlyIdempotentInspect
Check whether a JSON string is valid. Returns parsed object on success.
| Name | Required | Description | Default |
|---|---|---|---|
| api_key_id | No | Your Stripe Customer ID, used for metered billing ($1.00/mo base includes first 100 requests; $0.01 each after). | |
| json_string | Yes | The JSON text to validate. |
Tool Definition Quality
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds that it returns a parsed object on success, providing behavioral context beyond annotations. No contradictions.
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?
Two sentences, no wasted words. The first sentence states the purpose, the second describes the return. Perfectly front-loaded.
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?
For a validation tool without output schema, the description mentions the return type but omits behavior on invalid JSON (e.g., error throwing). The api_key_id parameter seems unrelated, adding confusion. Adequate but gaps remain.
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 coverage is 100% with both parameters described in the schema. The description does not add additional meaning beyond what the schema provides. Baseline 3 is appropriate.
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 'Check whether a JSON string is valid' (specific verb+resource) and 'Returns parsed object on success'. This distinguishes it from sibling tools like repair_json and sanitize_json_output, which handle different operations.
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 implies use for validation but does not explicitly state when to use this tool vs alternatives (e.g., repair_json for fixing, sanitize_json_output for cleaning). No when-not or context provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Claim this connector by publishing a /.well-known/glama.json file on your server's domain with the following structure:
{
"$schema": "https://glama.ai/mcp/schemas/connector.json",
"maintainers": [{ "email": "your-email@example.com" }]
}The email address must match the email associated with your Glama account. Once published, Glama will automatically detect and verify the file within a few minutes.
Control your server's listing on Glama, including description and metadata
Access analytics and receive server usage reports
Get monitoring and health status updates for your server
Feature your server to boost visibility and reach more users
For users:
Full audit trail – every tool call is logged with inputs and outputs for compliance and debugging
Granular tool control – enable or disable individual tools per connector to limit what your AI agents can do
Centralized credential management – store and rotate API keys and OAuth tokens in one place
Change alerts – get notified when a connector changes its schema, adds or removes tools, or updates tool definitions, so nothing breaks silently
For server owners:
Proven adoption – public usage metrics on your listing show real-world traction and build trust with prospective users
Tool-level analytics – see which tools are being used most, helping you prioritize development and documentation
Direct user feedback – users can report issues and suggest improvements through the listing, giving you a channel you would not have otherwise
The connector status is unhealthy when Glama is unable to successfully connect to the server. This can happen for several reasons:
The server is experiencing an outage
The URL of the server is wrong
Credentials required to access the server are missing or invalid
If you are the owner of this MCP connector and would like to make modifications to the listing, including providing test credentials for accessing the server, please contact support@glama.ai.
Discussions
No comments yet. Be the first to start the discussion!