Skip to main content
Glama
freyajeffers

filesystem-rag-mcp

patch_file

Replace an exact substring in a sandboxed workspace file atomically and trigger immediate incremental re-indexing after a successful edit.

Instructions

Atomically patch a sandboxed file in the workspace by replacing an exact substring with new content. Automatically triggers immediate incremental re-indexing (<50ms) upon successful edit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
rel_pathYes
workspaceNodefault
new_stringYes
old_stringYes
replace_allNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false); the description adds genuinely new behavioral facts: the edit is atomic, it operates on a sandboxed file, and it triggers incremental re-indexing in under 50ms on success. It still omits failure semantics (what happens if old_string is absent or ambiguous) and whether edits are reversible.

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 tight sentences, no filler, with the core action stated first and the side effect (re-indexing) second. Every clause earns its place.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. However, for a 6-parameter mutating tool with 0% schema coverage, the description leaves dry_run, replace_all, and workspace completely unexplained, which is a real completeness gap.

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 0% across 6 parameters, so the description carries the full burden, yet it only indirectly clarifies old_string/new_string. Nothing explains dry_run, replace_all, or workspace, leaving half the parameters undocumented in both places.

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?

States a specific verb (patch) and resource (sandboxed file in the workspace) plus the exact mechanism (replace an exact substring with new content). That mechanism implicitly separates it from read-only siblings like read_file or grep_search, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

The 'exact substring' framing implies when this tool is appropriate (targeted edits at a known location), but there is no explicit when-to-use/when-not guidance, no mention of alternatives (e.g., write_file or refresh_file), and no prerequisites such as the file already existing in the index.

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