Skip to main content
Glama

fs_edit

Replace an exact substring in a file, with control to replace one or all occurrences.

Instructions

Replace an exact substring in a file. old_string must match exactly once unless replace_all is true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
new_stringYes
old_stringYes
replace_allNo
Behavior2/5

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

The description implies mutation ('replace') but lacks disclosure of behavioral traits: no mention of file existence requirements, error behavior on no match or multiple matches (when replace_all=false), side effects, or permission needs. With no annotations, it is insufficient.

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?

Extremely concise: two sentences. The first sentence front-loads the purpose, the second adds a critical constraint. No wasted words.

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?

Given the tool has 4 parameters, no output schema, and no annotations, the description covers only a fraction of necessary context. Important aspects like return value, error handling, and usage context are missing.

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

Parameters1/5

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

Schema coverage is 0%, yet the description only explains old_string and replace_all constraints. Path and new_string are left undefined; the agent must guess their formats and roles. This is a significant gap.

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's action ('Replace an exact substring in a file') with a specific verb and resource, distinguishing it from siblings like fs_write (file overwrite) or fs_search (pattern search).

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 explicit guidance on when to use fs_edit versus other tools. The only usage hint is the constraint on old_string matching exactly once, but no context on prerequisites, error handling, or when to choose this tool over alternatives like fs_write for bulk operations.

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/Antropov31/noticode-mcp'

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