Skip to main content
Glama
Polarts

fs-mcp

by Polarts

Edit file

edit_file

Apply git-style line edits to a file under the root. Each edit replaces lines [startLine, endLine] (1-indexed, inclusive) with newLines. To delete lines, pass an empty newLines array.

Instructions

Apply git-style line edits to a file under the root. Each edit replaces lines [startLine, endLine] (1-indexed, inclusive) with newLines. To delete lines, pass an empty newLines array. To insert without deleting anything, set endLine = startLine - 1. Multiple edits in one call are applied bottom-to-top so line numbers stay valid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to root
editsYes
createIfMissingNo
Behavior5/5

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

No annotations are provided, so the description carries full burden. It thoroughly explains the edit semantics (inclusive line ranges), the bottom-to-top application order for multiple edits, and the empty array for deletion. It also covers the insert case via endLine = startLine - 1, and mentions the createIfMissing flag implicitly through schema, but the description's core behaviors are well-disclosed.

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 compact, front-loaded with the verb and object, and every sentence adds essential operational detail (line indexing, insert/delete patterns, ordering). No filler.

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

Completeness5/5

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

For a tool with 3 params, no output schema, and no annotations, it covers all necessary behavior: line ranges, deletion, insertion, ordering, and path restriction. The createIfMissing param is in schema but not described, but its default false and the tool's purpose make it low-risk. The description is complete for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%, so the description must compensate. It does: it explains each parameter's role (startLine, endLine, newLines) and the special values for insert/delete. It also clarifies the semantics of multiple edits.

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 it applies git-style line edits to a file, distinguishing it from create/delete operations. It specifies the file must be under the root, and the exact semantics of line replacement.

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?

The description implies usage for editing existing files, and explicitly explains deletion and insertion patterns. It does not explicitly state when not to use it (e.g., for creating new files, use create_file), but the contrast with sibling tools is clear.

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/Polarts/fs-mcp'

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