Skip to main content
Glama
ellmos-filecommander-mcp

ellmos-filecommander-mcp

Edit File (Lines)

fc_edit_file
Destructive

Edit files by line: replace, insert, or delete specific lines using 1-based line numbers, enabling precise text changes without rewriting the whole file.

Instructions

Edits a file line-based: replace, insert, or delete.

Args:

  • path (string): Path to the file

  • operation (string): "replace" | "insert" | "delete"

  • start_line (number): Start line (1-based)

  • end_line (number, optional): End line for replace/delete

  • content (string, optional): New content for replace/insert

Examples:

  • Replace lines 5-10: operation="replace", start_line=5, end_line=10, content="new text"

  • Insert after line 3: operation="insert", start_line=3, content="new line"

  • Delete lines 7-9: operation="delete", start_line=7, end_line=9

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>",
      "operation": "<operation>",
      "start_line": "<start_line>"
    },
    "name": "fc_edit_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file
contentNoNew content
end_lineNoEnd line
operationYesOperation
start_lineYesStart line (1-based)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.11.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / end_line / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / start_line / maximum
      Added value: +9007199254740991
  2. Addedv1.9.3
  3. Removedv1.9.3
  4. First observedv1.7.8

TDQS

A3.7/5.0
Behavior3/5

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

The annotations already declare destructive=true, readOnly=false, and idempotent=false, so the safety profile is covered. The description adds line-based operation behavior through examples, but it does not disclose irreversibility, file-existence requirements, encoding concerns, or atomicity.

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?

The description is front-loaded with the core action, then uses a compact Args block and three targeted examples. Every sentence supports correct invocation with no filler.

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

Completeness4/5

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

For a five-parameter, non-idempotent, destructive file edit tool with no output schema, the description gives enough operation and parameter detail to call it correctly. It still leaves gaps around failure modes and alternative-tool selection, but the annotations carry the destructive safety signal.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful conditional semantics beyond the schema, especially that end_line applies only to replace/delete and content applies only to replace/insert, plus concrete examples that clarify start_line behavior for insert.

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 states a specific verb and resource: editing a file line-based via replace, insert, or delete. It clearly scopes the tool to line-oriented operations, though it does not explicitly contrast itself with siblings such as fc_write_file or fc_str_replace.

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?

The examples imply how each operation is used, which gives some practical guidance. However, the description never states when to choose this tool over fc_write_file or fc_str_replace, nor does it name any exclusions or prerequisites.

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