Skip to main content
Glama

file_write

DestructiveIdempotent

Writes content to a specified file path within allowed filesystem paths, enabling agents to persist data while staying inside sandbox boundaries.

Instructions

Writes content to a file in the allowed filesystem paths

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file to write
contentYesContent to write to the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

Annotations declare destructiveHint=true and idempotentHint=true, yet the description never says whether an existing file is truncated or overwritten, whether parent directories are created, or what happens on an out-of-scope path. For a destructive write, the overwrite semantics are the single most important behavioral fact and they are absent.

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?

A single front-loaded sentence with no filler. It is efficient, though its brevity comes partly from omitting information an agent would need.

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?

The tool has no output schema and only two parameters, so the surface is small, but the description leaves open overwrite behavior, error conditions, and the return value. Adequate but with clear gaps for a destructive operation.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters ('path' and 'content') are already documented in the schema. The description adds no syntax, encoding, or path-format guidance beyond that, so baseline 3 applies.

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 and resource ('Writes content to a file') plus a scoping constraint ('allowed filesystem paths'). It does not explicitly distinguish itself from file_read or json_transform, but the write-versus-read distinction is unambiguous from the verb.

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 'allowed filesystem paths' clause hints at a precondition, but there is no statement of when to use this instead of alternatives, nor any exclusion such as 'not for appending' or 'use json_transform to modify JSON in place'. Usage is only implied.

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