Skip to main content
Glama

sassy_edit_multi

Destructive

Apply multiple surgical text replacements to one file in a single call. Aborts the entire batch if any old text lacks a unique match, and snapshots the file to staging first.

Instructions

Mutating: applies several surgical edits to one existing file in a single call, with the prior contents snapshotted into the adjacent DELETE/ staging folder first. edits is a JSON string array of {"old", "new"} objects, applied in order against the evolving content. Any edit whose old text has zero or more than one match aborts the whole call before anything is written, so nothing is partially applied. The file must exist and protected paths are refused. Returns only a count of applied edits, no preview. Use it to batch multiple unique-match changes in one file; use sassy_edit_block when you want a single edit with a context preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
editsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds valuable behavior beyond that: prior contents are snapshotted into a staging folder, any non-unique match aborts the entire call before writing, edits apply in order, protected paths are refused, and only a count of applied edits is returned. No contradiction with the annotations.

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?

Every sentence earns its place: mutation warning, snapshot behavior, edits format and ordering, abort semantics, preconditions, return behavior, and sibling routing. The most safety-critical information is front-loaded with 'Mutating' and the all-or-nothing guarantee is stated early.

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

Completeness5/5

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

For a mutating two-parameter tool, the description covers format, ordering, atomicity, side effects, constraints, return value, and alternatives. With an output schema present and annotations supplied, nothing needed for correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 0%, so the description carries the burden for parameters. It clearly defines edits as a JSON string array of {'old', 'new'} objects applied in order. The path parameter is only implied through 'the file must exist' and 'one existing file', but combined with the schema's required path string this is enough to use the tool correctly.

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?

States a specific verb and resource: 'applies several surgical edits to one existing file in a single call'. It also explicitly distinguishes itself from the sibling sassy_edit_block, which is framed as the single-edit alternative. An agent can tell exactly what this tool does without opening any other definitions.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance: 'Use it to batch multiple unique-match changes in one file; use sassy_edit_block when you want a single edit with a context preview.' It also states preconditions like 'The file must exist' and that protected paths are refused, which helps an agent avoid invalid calls.

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

Deploy Server

Other Tools