Skip to main content
Glama

fs_write

DestructiveIdempotent

Create or replace one UTF-8 text file inside an allowed root; the parent directory must already exist.

Instructions

Create or replace one UTF-8 text file inside an allowed root. The parent directory must already exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
agentNoOptional existing runtime binding for monitor attribution; no extra handshake.
contentYes
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, readOnlyHint=false, and openWorldHint=false, so the safety profile is carried structurally. The description adds genuine context beyond that — UTF-8-only content and the parent-directory precondition — but says nothing about auth/permission requirements, error behavior when the root is not allowed, or that content is silently discarded when replacing.

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 short sentences with zero filler, front-loading the core action before the precondition. Every clause earns its place and nothing is redundant with the title or schema.

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

Completeness3/5

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

With no output schema and annotations covering only the safety profile, the description needs to carry parameter and failure semantics. It covers scope and the parent-directory precondition adequately but omits overwrite behavior, allowed-root boundaries, and error outcomes for a 4-parameter destructive write tool.

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

Parameters2/5

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

Schema description coverage is only 25% (just the optional 'agent' object), so the description must compensate for path, content, and especially 'overwrite' (which defaults to true and silently replaces existing data). It only obliquely implies path/content via 'text file inside an allowed root' and never mentions overwrite at all, leaving the most consequential parameter undocumented in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair ('Create or replace') and resource ('one UTF-8 text file') with a scope constraint ('inside an allowed root'). It is distinguishable from fs_read and fs_search by the write semantics, though it never names fs_replace, the sibling whose whole-file-overwrite behavior is most easily confused with it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Create or replace' implies the tool handles both new and existing files, and 'The parent directory must already exist' gives a real precondition. However there is no explicit when-to-use versus fs_replace or fs_write alternatives, and no statement of when this tool should not be chosen.

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