Skip to main content
Glama
ellmos-filecommander-mcp

ellmos-filecommander-mcp

Cleanup File

fc_cleanup_file
Idempotent

Clean files by removing UTF-8 BOMs, NUL bytes, trailing whitespace, and normalizing line endings, with recursive directory filtering and dry-run preview.

Instructions

Cleans up one or more files from common problems.

Args:

  • path (string): Path to file or directory

  • recursive (boolean, optional): Recursive for directories

  • extensions (string, optional): Filter file extensions (e.g. ".txt,.json,.py")

  • remove_bom (boolean): Remove UTF-8 BOM

  • remove_trailing_whitespace (boolean): Remove trailing whitespace

  • normalize_line_endings (string, optional): "lf" | "crlf" | null

  • remove_nul_bytes (boolean): Remove NUL bytes

  • dry_run (boolean): Preview only

Cleans: BOM, NUL bytes, trailing whitespace, line endings

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

Input Schema

NameRequiredDescriptionDefault
pathYesPath to file/directory
dry_runNoPreview only
recursiveNoRecursive
extensionsNoFilter extensions (.txt,.json)
remove_bomNoRemove BOM
remove_nul_bytesNoRemove NUL bytes
normalize_line_endingsNoLine endings
remove_trailing_whitespaceNoTrailing whitespace

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, and the description is consistent with that profile since repeated cleaning yields the same result. It usefully enumerates the mutations performed (removing BOM, NUL bytes, trailing whitespace, rewriting line endings) and offers dry_run, but omits that files are rewritten in place with no backup and that stripping trailing whitespace can alter semantics in formats where it is significant (e.g. Markdown hard line breaks).

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

Conciseness2/5

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

The bulk of the text is a hand-restated parameter dump that duplicates a fully-described schema, pushing the actual purpose statement and the "Cleans:" summary around without adding information. The one genuinely non-redundant line is the closing list of what gets cleaned, which is buried at the end.

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?

With no output schema and no annotations covering results, the description never says what is returned or reported — how many files were modified, what a dry_run produces, or whether errors on individual files abort the run. For an 8-parameter in-place file mutator this leaves the agent unable to predict outcomes.

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 all eight parameters and the baseline is 3. The description's Args block largely restates the schema and is actually less precise, omitting the defaults (remove_bom/remove_nul_bytes/remove_trailing_whitespace default to true) that materially affect behavior when an agent passes only `path`.

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?

The description uses a specific verb-plus-resource ("Cleans up one or more files") and enumerates the exact defect classes it fixes (BOM, NUL bytes, trailing whitespace, line endings), so an agent knows precisely what class of operation this is. It stops short of distinguishing itself from plausible siblings such as fc_fix_encoding or fc_fix_json, which likely overlap on BOM/encoding repair.

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 "use when" / "do not use when" guidance, no mention of when to prefer fc_fix_encoding or fc_fix_json over this tool, and no stated prerequisite (e.g. safe mode, cloud lock checks) before mutating files. The only implied guidance is the dry_run flag, whose "Preview only" label hints at a safe-first workflow but is never spelled out.

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