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
- Uptime
- 95.7% over the last 24 hours
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
- ChatGPT
- –
- Claude
- –
TDQS
Scored across 4 tools
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.
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.
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.
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 toolsrepair_jsonARead-onlyIdempotentInspect
Attempt to repair common JSON issues: trailing commas, single quotes, unquoted keys, Python/JS literals, truncated structures.
Inputs: json_string (required), api_key_id.
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.
Inputs: raw_string (required), schema, api_key_id.
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.
Inputs: raw_string (required), api_key_id.
validate_jsonARead-onlyIdempotentInspect
Check whether a JSON string is valid. Returns parsed object on success.
Inputs: json_string (required), api_key_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceRemote MCP server that lets AI assistants read tracked competitive intelligence — competitor news, reviews, website changes, social posts and ads — and act on it by managing projects, competitors, battle cards, reports and canvases. Every answer carries a source and a date, and write actions only publish when explicitly shared.MIT
- AlicenseCqualityCmaintenanceCompetitor Monitor AI - MCP server providing AI-powered tools and automation by MEOK AI Labs112 npm29 PyPIMIT
- AlicenseAqualityDmaintenanceEnables brand visibility monitoring across major AI platforms like ChatGPT, Claude, Gemini, and Perplexity. It allows users to track visibility scores, analyze competitor data, and receive actionable insights to improve AI-generated brand recommendations.169 npm1MIT

industrylens-mcpofficial
AlicenseNot gradedqualityCmaintenanceBrowse IndustryLens's published competitive-intelligence reports and head-to-head competitor comparisons from any AI agent — real, source-backed data.MIT
Glama MCP Gateway
Add one secure layer between your agents and this server.