Skip to main content
Glama

safe_write

Write content to a file while blocking protected system or user paths; existing files require overwrite and are quarantined first for safe rollback.

Instructions

Write content to a file, refusing system-critical or user-protected paths. If the file already exists, requires overwrite:true and automatically backs up the previous version to the quarantine folder first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to write
contentYes
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses path refusal rules, the overwrite precondition, and that the previous version is automatically backed up to a quarantine folder. It omits error behavior, encoding/atomicity, and permission requirements, but the destructive-side effects are unusually well covered.

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?

Two sentences, zero filler, front-loaded with the primary action followed by the safety and overwrite rules in priority order. Every clause earns its place.

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

Completeness4/5

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

For a 3-parameter mutation tool with no annotations and no output schema, the description covers the key decision points (refused paths, overwrite requirement, backup behavior). It would be fully complete with a note on return/error signaling, but an agent can call it correctly from this text.

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 only 33% (only 'path' is documented), so the description must compensate. It explains the otherwise-bare 'overwrite' boolean's semantics (required only when the file exists) and implicitly defines 'content' via 'Write content to a file'. This is more than the schema provides, though 'content' formatting/encoding is left unaddressed.

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 ('Write content to a file') and immediately narrows scope with 'refusing system-critical or user-protected paths'. This makes it trivially distinguishable from the write-free siblings safe_delete and safe_execute.

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?

Explicitly states the condition that selects the overwrite path ('If the file already exists, requires overwrite:true') and the exclusion (system-critical/user-protected paths are refused). It stops short of naming when to prefer this over a sibling like safe_execute, so it is clear context without full alternative routing.

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