Skip to main content
Glama

sassy_edit_block

Destructive

Replace a single exact text block in a file with new text, after snapshotting the original for recovery. Refuses ambiguous matches and protected paths, reporting fuzzy alternatives if no exact match is found.

Instructions

Mutating: replaces a single exact occurrence of old_text with new_text in an existing file, and the prior contents are snapshotted into the adjacent DELETE/ staging folder before anything is written, so the change is recoverable. Refuses protected paths and refuses to run when old_text has multiple exact matches (add more context to make it unique). If there is no exact match, nothing is written: a fuzzy fallback (80% similarity) reports the closest text and a character diff instead. Reading is UTF-8 with error replacement; encoding and line endings are preserved. Returns a preview of the changed region with line numbers. Use it for one surgical edit; prefer sassy_edit_multi for batching several edits in one call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
new_textYes
old_textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

The description goes far beyond the destructiveHint annotation by explaining the snapshot-to-staging recovery mechanism, path protections, multi-match refusal, fuzzy fallback with similarity threshold, UTF-8 handling, encoding/line-ending preservation, and returned preview. No contradiction exists between the description and 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?

The description opens with the core action and mutation flag, then delivers dense but purposeful behavioral details. Every sentence adds necessary information about safety, matching, encoding, return value, or sibling routing; nothing feels redundant or decorative.

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 mutation tool with sparse schema descriptions and only destructiveHint in annotations, this description is complete: it covers safety/recoverability, failure modes, fallback behavior, encoding handling, output preview, and when to use an alternative. An agent has enough context to invoke it correctly and anticipate outcomes.

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

Parameters5/5

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

With 0% schema description coverage, the description compensates fully: old_text is the exact text to match, new_text is the replacement, and path refers to an existing file. It also explains the uniqueness requirement for old_text and the fuzzy-match behavior, adding important semantic detail not present in the schema.

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?

The description states a specific action: replacing a single exact occurrence of old_text with new_text in an existing file. It clearly distinguishes this tool from sassy_edit_multi by explicitly positioning it for one surgical edit, and the uniqueness condition differentiates it from broader file-write tools.

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?

It gives explicit usage guidance: use for one surgical edit and prefer sassy_edit_multi for batching several edits. It also states refusal conditions (protected paths, multiple exact matches, no exact match) and the fallback behavior, so an agent knows when the tool will not perform as expected.

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