Skip to main content
Glama

sassy_write_file

Write or append to files with custom encoding and line-ending options. Includes snapshot undo for rewrites and blocks sensitive paths.

Instructions

Write or append to a file. mode: rewrite | append.

encoding: any Python codec name (utf-8, utf-16, ascii, latin-1, ...). line_endings: 'preserve' (default — write content verbatim), 'lf' (normalize all CRLF/CR to LF before writing), 'crlf' (normalize all to CRLF — useful for Windows .bat / .ps1 files generated from a model that emits LF).

Rewrite mode on an existing file first snapshots the prior contents into the adjacent DELETE/ staging folder so destructive overwrites can always be undone. Protected paths (SassyMCP source tree, ~/.sassymcp) are refused.

Bypasses the shell-keyword interceptor entirely — content with words like 'format' or 'rm -rf' as data inside scripts is fine. Path validation runs _check_write_path (allowedDirectories + sensitive-read denylist + protected roots) so an LLM cannot write into ~/.ssh, ~/.aws, the SassyMCP source tree, etc. even when allowedDirectories is empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNorewrite
pathYes
contentYes
encodingNoutf-8
line_endingsNopreserve

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and does so thoroughly: it explains the destructive-overwrite snapshot to _DELETE_/, protected-path refusals, the shell-keyword bypass, and the path validation chain (`_check_write_path` with allowedDirectories/denylist/roots). These are substantive behavioral traits beyond the schema.

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 the primary action and then organized into focused blocks (modes, encoding/line endings, safety snapshot, interceptor bypass, validation). Every sentence adds operational value; there is no fluff or repetition.

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 that an output schema exists (so return values are covered elsewhere) and no annotations are present, the description thoroughly covers inputs, modes, safety behavior, encoding, and path validation. It is complete enough for an agent to invoke the tool correctly, with only minor details like file-creation behavior left to the runtime.

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%, so the description must explain parameters, and it does: mode ('rewrite | append'), encoding (any Python codec name), and line_endings ('preserve', 'lf', 'crlf' with explicit normalization behavior) are all detailed. Path validation semantics are also disclosed, adding meaning to the path parameter.

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 'Write or append to a file' and explicitly lists modes ('rewrite | append'), making the tool's purpose unmistakable. It clearly distinguishes from file-reading and editing siblings by focusing on whole-file write/append operations.

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 clear context for when to use the tool: writing or appending files with encoding/line-ending control, especially when content may contain shell keywords (since it bypasses the interceptor). However, it does not explicitly mention alternatives or exclusions (e.g., 'use sassy_edit_block for partial edits'), so it stops short of a full 5.

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