Skip to main content
Glama

write_file

Writes text content to a specified path in the workspace, automatically creating parent directories when needed.

Instructions

Write a text file into the workspace, creating parent directories.

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries full behavioral burden. It usefully discloses that parent directories are auto-created, but is silent on the key mutation behavior: whether an existing file is overwritten, truncated, or appended, and what permissions/encoding are applied. That gap matters for a write tool framed as non-destructive by default.

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?

A single front-loaded sentence with no filler. The verb leads, the resource and the parent-directory behavior follow, and nothing extraneous is included.

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 output schema removes the need to describe return values, and the tool is simple with only two required params. However, for a write operation with no annotations and no schema descriptions, the description leaves overwrite semantics and path handling unstated.

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 0%, so the schema documents nothing about 'path' or 'content'. The description compensates only minimally by calling the payload 'text', leaving questions of relative vs absolute paths and encoding unaddressed; the parameter names themselves are largely self-explanatory.

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 ('Write a text file into the workspace') and adds the side effect of creating parent directories. An agent can distinguish this from read_file/list_files, though the description never names a sibling explicitly, so sibling differentiation is only implicit.

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?

Gives no when-to-use guidance, no prerequisites, and no mention of alternatives such as echo or render, which also appear to produce output. The agent must infer that writing is the right choice from the verb alone.

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