Skip to main content
Glama
ellmos-ai

ellmos-filecommander-mcp

Edit File (Lines)

fc_edit_file
Destructive

Edit files line-by-line: replace, insert, or delete lines using 1-based indexing. Specify start and end lines for targeted modifications, with optional content for replace/insert operations.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file
operationYesOperation
start_lineYesStart line (1-based)
end_lineNoEnd line
contentNoNew content
Behavior4/5

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

Annotations already indicate destructiveHint=true, so description reinforces this with operation details. It adds clarity on line-based nature and required parameters, but doesn't disclose edge cases (e.g., behavior if file doesn't exist, or what happens with invalid line numbers).

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?

Description is concise with a clear header line and structured Args/Examples sections. Every sentence adds value, and examples are highly informative.

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?

Given no output schema, description explains the effect but not the return value (e.g., success message). Annotations cover destructive behavior. For a line-editing tool with 5 parameters, the description is nearly complete, lacking only return details.

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 coverage is 100%, but description adds value by explaining the relationships between parameters (e.g., end_line optional for insert) and providing examples. However, some nuance about line ranges could be clearer.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool edits a file line-based with three specific operations (replace, insert, delete), and differentiates it from siblings like fc_write_file (overwrites whole file) and fc_str_replace (string-based replace).

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

Usage Guidelines4/5

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

Description includes examples showing when to use each operation, but does not explicitly state when not to use this tool (e.g., for whole-file edits or string substitutions) or reference alternatives among siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ellmos-ai/ellmos-filecommander-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server