Skip to main content
Glama

repair_mcp_configs

DestructiveIdempotent

Detects and rewrites fragile npx -y @latest MCP server configs to direct local node script paths, creating .fixmcp.bak backups to eliminate -32001 startup timeouts. Preview changes with dryRun first.

Instructions

Detect and optionally rewrite fragile 'npx -y @latest' MCP server configs to direct local node script paths (with automatic .fixmcp.bak backups) to eliminate -32001 startup timeouts. When to use: Call after 'diagnose_mcp_configs' identifies unpinned '@latest' packages in Claude Code, Claude Desktop, Cursor, or VS Code configs. When NOT to use: Do NOT use on JSONC or TOML configs (opencode, Codex CLI) which are report-only. Always run with dryRun: true first to preview the exact diff before applying changes.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "repair_mcp_configs"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoIf true, compute and return the rewrite plan without modifying files on disk (default: true). Set to false only after verifying the dry-run diff.
homeDirNoOptional custom home directory path to scan instead of default user home.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / dryRun / description
      Previous value: -"If true, compute and return the rewrite plan without modifying files on disk (default: true)."New value: +"If true, compute and return the rewrite plan without modifying files on disk (default: true). Set to false only after verifying the dry-run diff."
    • changedInput schema / properties / homeDir / description
      Previous value: -"Optional custom home directory path to scan."New value: +"Optional custom home directory path to scan instead of default user home."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description adds critical context the annotations cannot: automatic .fixmcp.bak backups, the safe dry-run-first workflow, and which config formats are excluded. These are exactly the behavioral facts an agent needs before authorizing a destructive rewrite.

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?

Front-loaded with the action and payload, then cleanly segmented into when-to-use and when-not-to-use clauses. No sentence is filler; the timeout symptom and backup behavior each add distinct decision-relevant information despite the length.

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

Completeness5/5

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

For a destructive, zero-required-param tool with no output schema, the description covers scope, exclusions, safety mechanism (backups), and the preview step. An agent has everything needed to decide whether and how to call it without further inspection.

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 both parameters are already documented in the schema, which sets the baseline at 3. The description earns an extra point by prescribing the operational order for dryRun ('Always run with dryRun: true first to preview the exact diff before applying changes') and clarifying the diff-preview return behavior. It does not add further detail on homeDir, keeping it just short of a 5.

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?

States a specific verb pair ('Detect and optionally rewrite') plus the exact resource and pattern targeted ('npx -y <pkg>@latest' MCP server configs), and names the outcome ('eliminate -32001 startup timeouts'). It is clearly distinguishable from siblings like diagnose_mcp_configs because it explicitly describes the mutation step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('after diagnose_mcp_configs identifies unpinned @latest packages'), explicit when-not-to-use ('Do NOT use on JSONC or TOML configs ... report-only'), and a mandated operating sequence (dryRun: true first). Alternatives and exclusions are both named.

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