Skip to main content
Glama

mcp_doctor_repair_json

Repairs malformed MCP configuration JSON by fixing trailing commas, removing invalid comments, and converting single quotes to ensure a valid root mcpServers key.

Instructions

Auto-repairs malformed MCP configuration JSON (fixes trailing commas, removes invalid comments, converts single quotes, ensures root mcpServers key).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
raw_jsonYesThe broken or unformatted JSON text

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior2/5

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

There are no annotations providing safety or side-effect information, and the description does not disclose what the tool returns after repairing (e.g., the repaired JSON, a success status, or an error). It also does not mention whether the repair is in-place or returns a new value, leaving important behavioral aspects ambiguous. The description focuses solely on the action, not the outcome or consequences.

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 sentence with no fluff or redundancy. It efficiently lists the key repair operations in a parenthetical, making the tool's functionality clear without wasted words. The structure is compact and information-dense, earning a perfect score.

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

Completeness2/5

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

The description adequately covers the tool's input and purpose but omits critical context: there is no output schema and the description does not state what the tool returns after repair. An agent using this tool would not know whether to expect the repaired JSON, a confirmation message, or an error. It also does not mention edge cases (e.g., non-JSON input or unresolvable malformations). This lack of output and error handling information makes the description incomplete for practical use.

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 single parameter `raw_json` has a schema description ('The broken or unformatted JSON text') that fully explains its meaning, so the schema coverage is high. The tool description itself does not add any additional explanation about the parameter beyond what is already in the schema, so it provides no extra value. Per the baseline for high schema coverage, a score 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 clearly states the tool's function: auto-repair malformed MCP configuration JSON. It lists specific repair actions (fixing trailing commas, removing invalid comments, converting single quotes, ensuring a root mcpServers key), which is a specific and unambiguous verb+resource. The name and description also differentiate it from sibling tools like scan and diagnose, making its purpose distinct.

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 implies when to use the tool: when you have malformed or unformatted MCP JSON that needs fixing. It does not explicitly mention alternatives or state 'use this instead of scan/diagnose', but the action-oriented phrasing and the sibling tool names make the appropriate context clear. A slight deduction for not making the when-to-use-versus-alternatives guidance explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafim-dev/mcp-doctor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server