Skip to main content
Glama

Write local file

write_file
Destructive

Create, overwrite, or append content to any local file, automatically creating missing parent folders and verifying writes for reliability.

Instructions

Create, overwrite, or append to any local file. Create missing parent folders when requested, then verify important writes with read_file or path_info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNooverwrite
pathYes
contentYes
encodingNoutf8
createParentsNo
Behavior3/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds value by noting that parent folders can be created and that verification is recommended. However, it does not disclose other behavioral traits like potential data loss without backup, concurrent access behavior, or size limits (content maxLength is in schema but not mentioned). No contradiction with annotations.

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 two sentences, front-loads the core actions, and adds a single important detail (folder creation and verification). Every sentence earns its place with no redundancy or filler.

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?

Given the tool is destructive, has 5 parameters, and no output schema, the description covers the primary actions but leaves gaps: no warning about overwriting, no mention of encoding or error conditions, and no description of the return value. The verification suggestion is helpful but incomplete for a tool of this complexity.

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%, meaning the description should compensate. It does hint at the 'mode' ('overwrite' or 'append') and 'createParents' ('create missing parent folders'), but it does not explain other parameters like encoding, path constraints, or content max size. For a 5-parameter tool, this is minimal semantic enrichment beyond the schema's enums and defaults.

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, overwrites, or appends to local files, with a specific verb-resource pairing. It mentions creating parent folders, which adds detail. However, it does not explicitly distinguish itself from sibling 'edit_file' which is also a file modification tool, missing a clear differentiator.

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 description gives implicit usage context by suggesting verification after important writes, but it does not state when to prefer write_file over alternatives like edit_file or when not to use it. No explicit exclusion criteria or alternative tool names are given, leaving the agent with limited guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yungsuk53-pixel/unlimited-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server