Skip to main content
Glama

write_file

Creates or overwrites a file with specified content, automatically creating parent directories if needed.

Instructions

Creates or overwrites a file on the local filesystem with specified content. Automatically creates parent directories if they don't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo
contentYes
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

The description discloses the key behaviors: creating or overwriting files and automatically creating parent directories. It does not mention confirmation prompts or permission issues, but the destructive overwrite action is explicitly stated, which is essential transparency.

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?

The description is brief and direct, covering the main functionality and a valuable side effect in two sentences. No unnecessary wording or repetition.

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 description covers the core behavior, but the 'source' parameter is left unexplained and no information is given about return values or error conditions. For a simple write tool, the gap regarding 'source' is notable, leaving the description somewhat incomplete.

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?

The description does not explain any of the parameters. The schema shows file_path and content as required and self-explanatory, but 'source' is ambiguous and the description does not clarify its purpose or relationship to the other parameters.

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?

The description clearly states the tool creates or overwrites a file on the local filesystem with specified content, and also mentions auto-creating parent directories. It is specific and distinguishes this tool as a full-file writer, though it does not explicitly reference sibling tools.

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?

The description provides no explicit guidance on when to use this tool versus alternatives like edit_file or append_file. It implies full-file replacement with 'overwrites' but does not state conditions for choosing this tool over others.

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