Skip to main content
Glama

sassy_edit_block

Find and replace exact text in a file with surgical precision. Uses fuzzy fallback, previews changes, and snapshots the original for safety.

Instructions

Surgical file edit: find old_text and replace with new_text.

  • Exact match preferred; fuzzy fallback with diff reporting

  • Fails if multiple exact matches found (provide more context)

  • Preserves file encoding and line endings

  • Returns a preview of the change with surrounding context

  • Refuses edits on protected paths

  • Snapshots existing content to DELETE/ before applying

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
new_textYes
old_textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description carries full behavioral burden. It discloses fuzzy fallback with diff reporting, failure on multiple matches, encoding/line-ending preservation, preview output, protected-path refusal, and snapshot creation. This is unusually comprehensive for a tool description.

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 is front-loaded with a one-line summary followed by focused bullet points. Each bullet conveys a distinct behavioral detail without unnecessary elaboration, making it compact yet information-dense.

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?

Given the lack of annotations and minimal schema descriptions, the description covers the essential aspects of a file editing tool: success criteria, failure modes, side effects (snapshot), output (preview), and safety (protected paths). An output schema exists, so detailed return-value documentation is not required in the description.

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 explains old_text and new_text semantics via exact match and fuzzy fallback, but path is not described beyond its schema title. The description adds partial value but misses potential path-related details like format or restrictions.

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 clearly states the tool performs a surgical file edit by finding old_text and replacing it with new_text. This distinguishes it from siblings like sassy_edit_multi (multiple edits) and sassy_write_file (whole-file write) through the 'surgical' framing and exact-match preference.

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?

The description provides strong context for when to use it: exact match preferred, fuzzy fallback, fails on multiple matches, and refuses protected paths. However, it does not explicitly compare with alternatives such as sassy_edit_multi for multi-block edits or sassy_write_file for full rewrites, which would make the guidance complete.

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

Install Server

Other Tools

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/sassyconsultingllc/SassyMCP'

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