Skip to main content
Glama

sassy_write_file

Destructive

Write files with full overwrite or append modes; preserves a backup snapshot before replacing existing content and creates missing folders automatically.

Instructions

Mutating: creates or overwrites files. mode defaults to 'rewrite' (full replace); on an existing file the prior contents are first snapshotted into the adjacent DELETE/ staging folder as stem.overwrite..ext, so overwrites are recoverable. mode 'append' adds bytes to the end. Missing parent directories are created. encoding defaults to utf-8 (any Python codec name); line_endings defaults to 'preserve' (verbatim), with 'lf' and 'crlf' normalizing all line breaks (crlf is useful for Windows .bat/.ps1 files). It bypasses the shell-keyword interceptor entirely, but protected paths (SassyMCP source tree, ~/.sassymcp, ~/.ssh, ~/.aws, etc.) are refused. Use it to create files or full rewrites; prefer sassy_edit_block or sassy_edit_multi for small changes to existing files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNorewrite
pathYes
contentYes
encodingNoutf-8
line_endingsNopreserve

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?

Beyond the destructiveHint=true annotation, the description discloses overwrite snapshot recovery into _DELETE_, append behavior, parent-directory creation, default encoding and line-ending normalization, and refusal of protected paths. It also notes that the shell-keyword interceptor is bypassed. This is substantial behavioral context consistent 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph, but it is front-loaded with the core purpose and every subsequent clause adds operational information needed to call the tool correctly. It is long due to the number of behavioral nuances, not verbosity.

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?

All five parameters, the primary behavioral modes, safety constraints, and the recommended alternative tools are covered. An output schema exists, so the lack of explicit return-value description is acceptable; nothing essential for a correct call is missing.

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?

Schema description coverage is 0%, and the description compensates by explaining mode values ('rewrite' vs 'append'), encoding default and accepted codec names, and line_endings behavior ('preserve', 'lf', 'crlf'). It also clarifies path-related behavior by mentioning missing parent directories and protected paths.

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 opens with 'Mutating: creates or overwrites files'—a specific verb and resource—then distinguishes the two write modes. It also names sassy_edit_block/sassy_edit_multi as the tools for small edits, so it is clear what this tool is not for.

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 explicitly says to use this tool for file creation or full rewrites and to prefer sassy_edit_block or sassy_edit_multi for small changes to existing files. Mode-level guidance (append vs rewrite) and the 'prefer' rule give an agent concrete decision criteria.

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