Skip to main content
Glama
ellmos-codecommander-mcp

ellmos-codecommander-mcp

Cleanup File

cc_cleanup_file
Idempotent

Cleans source code files by removing BOM and NUL bytes, trimming trailing whitespace, and normalizing line endings, with optional dry-run preview.

Instructions

Cleans up source code files: BOM, NUL bytes, trailing whitespace, line endings.

Args:

  • path (string): Path to the file

  • remove_bom (boolean): Remove BOM

  • remove_trailing_whitespace (boolean): Trailing whitespace

  • normalize_line_endings (string): "lf" | "crlf"

  • remove_nul_bytes (boolean): Remove NUL bytes

  • dry_run (boolean): Preview only

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_cleanup_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file
dry_runNoPreview only
remove_bomNoRemove BOM
remove_nul_bytesNoNUL bytes
normalize_line_endingsNoLine endings
remove_trailing_whitespaceNoTrailing whitespace

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

B3.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds the preview capability via dry_run, but never states that the file is modified in place, whether the original is preserved or backed up, or how encoding is detected before stripping a BOM.

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

Conciseness3/5

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

The opening sentence is well front-loaded and earns its place, but the Args block duplicates the input schema almost word for word, adding length without information. Removing it would lose nothing.

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?

It is a mutating file operation with no output schema, so the description should say what happens to the target file and what is returned on a dry run versus a real run. Annotations carry the idempotency and safety signals, but the in-place-edit behavior is left implicit.

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 six parameters are already documented with defaults and the enum is defined. The description's Args block restates those same one-word descriptions verbatim and adds no semantics such as whether omitting normalize_line_endings leaves line endings untouched.

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 ('cleans up') and resource (source code files) and enumerates exactly which issues are handled: BOM, NUL bytes, trailing whitespace, line endings. That said, it does not distinguish itself from near-siblings like cc_fix_encoding or cc_fix_umlauts, which overlap on encoding-related cleanup.

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?

No guidance on when to use this versus cc_fix_encoding, cc_fix_umlauts, or cc_check_indentation, all of which touch adjacent concerns. The only contextual hint is the dry_run parameter, which is schema-level, not usage guidance.

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