Skip to main content
Glama

write_file

Creates or overwrites a UTF-8 file inside the workspace root, rejecting absolute paths and parent-directory segments to prevent path traversal.

Instructions

Write a UTF-8 file relative to the workspace root.

Refuses absolute paths and parent-directory segments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden. It does disclose important constraints: UTF-8 encoding, relative paths only, and refusal of absolute paths and parent-directory segments. However, it does not specify overwrite behavior, whether directories are created, or failure/error semantics, which are relevant for a mutating file tool.

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?

Two short sentences, each earning its place. The core operation is stated first, followed by essential constraints. There is no filler or redundant repetition of the tool name.

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?

For a simple 2-parameter tool with an output schema, this description is largely complete: it identifies the operation, the path constraints, and the encoding. It could be more complete by mentioning overwrite semantics or directory creation, but the essential calling requirements are present.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It adds meaningful constraints for 'path': must be relative to workspace root and must not be absolute or contain parent-directory segments. It also implies 'content' should be text encoded as UTF-8. This exceeds minimal parameter documentation, although 'content' itself is not explicitly elaborated.

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 states a specific verb ('Write'), a clear resource (a UTF-8 file), and a scope ('relative to the workspace root'). This clearly distinguishes it from sibling tools like read_file and run.

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 guidance about when to choose this tool over alternatives or when not to use it. It does not mention siblings or any decision criteria for selecting write_file instead of run, read_file, or record_terminal.

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/AndreaGriffiths11/machine-mcp'

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