Skip to main content
Glama

write_file

Write new files or overwrite existing ones on a devbox by providing the file path and contents. The full contents are written atomically to ensure consistency.

Instructions

Create or overwrite a file on a devbox.

Use this to write new files or edit existing ones (the full contents are written atomically).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentsYesFull file contents to write.
devbox_idYesThe id of the devbox.
file_pathYesAbsolute path of the file inside the devbox.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description discloses an important behavioral trait: the write is atomic ('the full contents are written atomically'). It also notes the overwrite capability, implying destructiveness. However, without annotations it does not mention error conditions or permission requirements, so it is not fully exhaustive.

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 and front-loads the primary action. The second sentence adds usage nuance without redundancy. Every word earns its place.

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 file-write tool, the description covers creation, overwriting, and atomicity. The presence of an output schema and fully documented parameters means return values and parameter details are covered. It could mention what happens on invalid paths, but the core context is adequate.

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%, with each parameter described (contents, devbox_id, file_path). The description adds the semantic that 'contents' are the full file contents, but this mostly mirrors the schema. No additional parameter-level detail is necessary.

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 uses a specific verb ('Create or overwrite') and identifies the resource ('a file on a devbox'), making the primary action unambiguous. It clearly distinguishes from sibling tools like read_file and execute_command by focusing on file content writing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states explicit usage cases: 'write new files or edit existing ones', which helps the agent choose the tool over alternatives. It does not explicitly mention exclusions or alternatives, but with no other file-writing sibling this context is sufficient.

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/contributory/runloop-mcp'

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