Skip to main content
Glama

精確編輯

fs_edit

Performs precise text replacements in existing files, requiring prior read and exact matches; supports replace-all and context expansion for unique matches.

Instructions

對既有檔案做精確替換。須先 fs_read;old 必須唯一(多處命中需 replace_all 或更多上下文)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
editsYes
forceNo跳過 STALE_READ 守衛(慎用)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It mentions the read-first prerequisite and the uniqueness constraint, but omits that this is an in-place mutation, the existence of a stale-read guard (only hinted by `force` schema), or the behavior of multiple edits. Partial transparency.

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 short sentences packed with essential information: the primary action, the prerequisite, and the key constraint. No fluff, front-loaded with the core purpose.

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

Completeness3/5

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

For a tool with no annotations or output schema and low schema coverage, the description covers the main workflow (read first, unique old) but omits details like the stale-read guard, the array nature of edits, and potential failure modes. It's adequate but not fully complete for an agent needing robust calling context.

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

Parameters3/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 clarifies `old` must be unique and `replace_all` handles multiple matches, adding value beyond the schema. However, it doesn't explain the `file` or `edits` structure (though `edits` is intuitively an array of edit objects) or the `force` flag, leaving gaps.

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 clear verb ('做精確替換' - perform precise replacement) and resource ('既有檔案' - existing files), making it obvious this tool edits file content. It distinguishes from creation by specifying existing files, though it doesn't explicitly compare with fs_write or other siblings.

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 when-to-use guidance: '須先 fs_read' (must read first) and the uniqueness condition for `old` with the alternative `replace_all` for multiple matches. This gives solid operational context, though it doesn't mention when NOT to use (e.g., for new files).

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

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/win10ogod/Rimai'

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