Skip to main content
Glama

Write file (ToolAhead)

write_file

Create or overwrite a UTF-8 workspace file by supplying file_path and content. Writes execute directly, without prefetching, caching, or replaying.

Instructions

Create or overwrite a UTF-8 workspace file using the familiar file_path and content contract. Writes execute normally and are never prefetched, cached, or replayed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesComplete UTF-8 file contents.
file_pathYesAbsolute path or path relative to the workspace.
Install Server

TDQS

A4/5.0
Behavior4/5

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

The description adds behavioral context beyond the annotations by specifying UTF-8 encoding, the fact that writes execute normally, and that they are 'never prefetched, cached, or replayed.' This is useful for an AI agent to understand execution semantics. It also discloses the overwrite behavior. There is no contradiction with the annotations; readOnlyHint=false aligns with the write nature.

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 with no redundancy. The first sentence fronts the primary action and object, and the second adds essential execution context. Every word contributes to clarity, making it an excellent example of concise documentation.

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 write tool with two parameters and no output schema, the description covers the core aspects: purpose, encoding, overwrite semantics, and execution guarantees. It does not mention return values or error handling, but these are minor for a write operation. The lack of an output schema means some gap exists, but overall it is sufficiently complete.

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?

The input schema provides 100% coverage of both parameters with clear descriptions ('Complete UTF-8 file contents' and 'Absolute path or path relative to the workspace'). The description's phrase 'familiar file_path and content contract' adds no significant semantic detail beyond what the schema already conveys, hence the baseline score of 3.

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 tool's purpose with a specific verb and resource: 'Create or overwrite a UTF-8 workspace file'. This distinguishes it from siblings like read_file, list_files, search, and run, though edit_file is not explicitly differentiated. The mention of the 'file_path and content contract' adds scope clarity.

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 implies usage scenarios through 'Create or overwrite' and 'familiar file_path and content contract', suggesting it is for writing full file contents. However, it does not explicitly state when to prefer this tool over edit_file or other alternatives, nor does it provide exclusions or when-not-to-use guidance.

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

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/michael-ra/toolahead'

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