Skip to main content
Glama
ellmos-filecommander-mcp

ellmos-filecommander-mcp

Fix JSON

fc_fix_json
Idempotent

Repair common JSON file errors such as BOM, trailing commas, single quotes, comments, and NUL bytes, with optional dry-run inspection and backup creation before fixes.

Instructions

Automatically repairs common JSON errors.

Args:

  • path (string): Path to the JSON file

  • dry_run (boolean, optional): Only show problems, do not repair

  • create_backup (boolean, optional): Create backup before repair

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": "fc_fix_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the JSON file
dry_runNoOnly show problems
create_backupNoCreate backup

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.5
  2. Removedv1.9.3
  3. First observedv1.7.8

TDQS

B3.2/5.0
Behavior3/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 safety framing is covered. The description adds useful context: repairs happen against a file path and a backup is created by default, plus a dry-run preview mode. It does not say whether the file is rewritten in place, what happens if repair partially fails, or whether the repair is atomic — meaningful gaps for a mutation tool.

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 sentence is front-loaded and the repairs list is a compact, high-signal enumeration. The Args section duplicates schema content and consumes space without adding information, which is the only waste.

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?

For a file-mutating repair tool with no output schema, the description never says what is returned (list of fixes applied? success flag? file untouched on failure?) or how the agent should interpret the dry-run output. Combined with no sibling routing to fc_validate_json, an agent can call it but cannot confidently predict the result.

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 all three parameters are already documented with defaults. The Args block largely restates the schema (the description actually omits the create_backup default of true that the schema states), adding no format or edge-case semantics beyond it. Baseline 3 applies.

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 ('repairs common JSON errors') and enumerates the exact error classes it handles (BOM, trailing commas, single quotes, comments, NUL bytes), which lets an agent judge applicability. It does not differentiate itself from the closely related sibling fc_validate_json, so the agent must infer that validate checks while fix mutates.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use statement, and no mention of fc_validate_json as the non-mutating alternative despite it being a direct sibling. The repair list implicitly bounds scope (other JSON errors are out of reach), but nothing tells the agent when to prefer this tool over validating or hand-editing.

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