Skip to main content
Glama

fs_write

Write a single file in the workspace with optional hash precondition to prevent stale overwrites. Mutates exactly one file for safe, bounded edits.

Instructions

Write a single file within the workspace (stale-safe). Mutates exactly one file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
expected_hashNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

No annotations, so the description carries the burden. It discloses mutation ('Mutates exactly one file') and a 'stale-safe' property, which usefully signals concurrency protection. However, it omits auth requirements, overwrite semantics, atomicity, or failure modes, and 'stale-safe' is jargon without explanation of what happens on a stale write.

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, front-loaded clauses with no filler. The essential action is stated first, and the modifier is second. Nothing wasted.

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

Completeness2/5

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

For a mutating, three-parameter tool with no annotations, no output schema, and 0% schema coverage, the description is far too thin. It should explain the write semantics, what 'stale-safe' means (role of expected_hash), and overwrite behavior.

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 coverage is 0%, so the description must compensate. It mentions 'single file' but says nothing about path, content (including the 8MB maxLength), or expected_hash and what stale-safety has to do with it. The three parameters are functionally undocumented in both schema and description.

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 (Write) and resource (a single file within the workspace), and adds a scope qualifier (single file). It distinguishes from fs_patch (which presumably edits), but doesn't explicitly name that sibling or others, so it falls short of a 5.

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

Usage Guidelines2/5

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

No when-to-use, when-not-to-use, or alternative routing is provided. An agent can't tell from this whether to pick fs_write, fs_patch, or another sibling for a given edit scenario.

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