Skip to main content
Glama

edit_file_multi

Apply multiple file edits atomically in order, rolling back all changes if any edit fails; optionally preview with dry run.

Instructions

Apply several edits atomically. Each edit is {"old_string": ..., "new_string": ..., optional "replace_all": "true"}. Edits apply in order; if any fails nothing is written.

Input Schema

NameRequiredDescriptionDefault
pathYes
editsYes
dry_runNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden, and it delivers the two behaviors that matter most for a mutation tool: sequential ordering and all-or-nothing failure semantics ("if any fails nothing is written"). It omits whether the file must already exist and says nothing about the dry_run escape hatch, which is a notable gap for a write operation.

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 plus an inline payload sketch, no filler. The atomicity guarantee, which is the decisive fact for an agent choosing this tool, is front-loaded in sentence one.

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 described, and atomicity is covered. But for a mutation tool with zero annotations, leaving dry_run unexplained and not stating whether path must point at an existing file leaves real gaps an agent must guess at.

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 coverage is 0%, so the description must compensate. It documents the edits payload well, spelling out old_string/new_string and the optional replace_all flag that the bare additionalProperties schema leaves undefined. However, path and especially dry_run (default false, a meaningful control surface) get no explanation anywhere.

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?

"Apply several edits atomically" gives a specific verb (apply edits), a quantified scope (several), and a defining property (atomic) that separates it from the single-edit siblings edit_file and replace_lines. It stops short of naming those siblings explicitly, so the distinction is inferable rather than stated.

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 word "atomically" and the plural "edits" imply the use case (batch changes that must all succeed or none), but the description never states when to prefer this over edit_file or replace_lines, nor what preconditions apply to path. Usage is implied, not guided.

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