Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Fix JSON

cc_fix_json
Idempotent

Repairs common JSON errors such as BOM, trailing commas, single quotes, comments, and NUL bytes, with optional dry-run preview and backup creation.

Instructions

Automatically repairs common JSON errors.

Args:

  • path (string): Path to the JSON file

  • dry_run (boolean): Only show issues

  • create_backup (boolean): Create backup

Repairs: BOM, trailing commas, single quotes, comments, NUL bytes

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "cc_fix_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the JSON file
dry_runNoPreview only
create_backupNoCreate backup

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.3.27
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.3.8

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the description's job is to say what is actually mutated — it does, by listing the specific error classes it rewrites and noting that create_backup defaults to keeping a copy. It stops short of saying what happens when a file cannot be repaired or which fixes were applied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the repair list are front-loaded and high-value, but the Args block duplicates schema documentation verbatim at full coverage and could be dropped without loss.

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?

With no output schema, the description should say what the tool returns — a list of applied fixes, a success/failure signal, or untouched output under dry_run — and what happens on unrepairable JSON. None of that is covered, leaving the agent to guess at the result shape.

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 description coverage is 100%, so the schema already documents path, dry_run and create_backup. The description's Args block largely restates these; the only added nuance is 'Only show issues' for dry_run, which is roughly equivalent to the schema's 'Preview only'.

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?

States a specific verb and resource ('Automatically repairs common JSON errors') and enumerates the exact repair classes (BOM, trailing commas, single quotes, comments, NUL bytes), which no schema field conveys. It never names the obvious sibling cc_validate_json, so the fix-vs-check distinction is left implicit.

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 only implied: the tool repairs files, so an agent can infer it should run after validation fails. There is no explicit 'use this instead of / in addition to cc_validate_json' guidance and no statement about prerequisites such as the file existing or being parseable.

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