Skip to main content
Glama

fs_edit

Replace a specific string in a file; fails if not found. Use replace_all for every occurrence.

Instructions

Replace a string in a file. Fails if old_string is not found. Set replace_all=true to replace every occurrence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
pathYes
new_stringYes
old_stringYes
replace_allNoReplace all occurrences (default: first only)
Behavior4/5

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

No annotations provided, so description must convey behavior. It states failure condition and the replace_all parameter. It implicitly indicates destructive nature (modifies file) without explicitly saying so. Lacks warnings about permissions or file creation, but sufficient for common use.

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?

Two sentences, no filler. Every sentence adds value: first defines purpose, second adds constraints and usage details.

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?

Despite simple nature, missing crucial context: no explanation of id vs path (likely file identifier and filesystem path), no return value, no mention that it modifies the file in-place. For a tool with 5 parameters and no output schema, this is insufficient.

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

Parameters2/5

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

Schema description coverage is only 20% (only replace_all has a description in schema). Description adds no additional meaning for id, path, old_string, or new_string beyond what the schema provides (which lacks descriptions). It does not clarify what 'id' or 'path' refer to, nor the expected format of old_string/new_string.

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?

Clearly states the tool does a string replacement in a file. The verb 'replace' and resource 'string in a file' are specific and distinguishable from sibling tools like fs_write (write entire file) or fs_search (search pattern).

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?

Provides explicit behavior: fails if old_string is not found, and the replace_all option for multiple occurrences. No alternatives or when-not-to-use mentioned, but for a simple replacement tool, this is adequate.

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/tawgroup/taw-computer'

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