Skip to main content
Glama

write_file

Write UTF-8 text content to a file, creating it if missing or overwriting it if present. Specify the destination path and the text to write.

Instructions

Write UTF-8 content to a file (created if missing, overwritten if present).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesDestination path.
contentYesText to write.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the file is created if missing and overwritten if present, which is key behavioral information. However, it does not mention whether permissions are checked, what happens if the parent path does not exist, or if there are size limits. With no annotations, some additional context would be helpful.

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 a single, concise sentence that front-loads the key action and behavior. Every word is necessary; there is no wasted text.

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

Completeness4/5

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

Given the tool's simplicity (2 required params, no nested objects, output schema present), the description is nearly complete. It covers creation vs. overwrite behavior. The only minor gap is the lack of mention of error conditions (e.g., invalid path) or relationship to parent directories, which could be inferred but is not explicit.

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 coverage is 100%, so the baseline is 3. The description does not add any additional meaning beyond what the schema already provides for the two parameters. It restates that content is written but does not clarify file path format (absolute vs. relative) or content encoding beyond UTF-8, which is already in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Write'), the resource ('file'), and the encoding ('UTF-8'). It also specifies the behavior for missing vs. existing files, which distinguishes it from siblings like 'append_file' (which only appends) and 'replace_in_file' (which replaces specific text).

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 does not explicitly state when to use this tool versus alternatives like 'append_file' or 'replace_in_file'. It implies use for creating or overwriting files, but provides no guidance on when to choose one sibling over another, nor does it mention prerequisites (e.g., parent directory must exist).

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/jvcaesar/gremlin-mcp'

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