Skip to main content
Glama

Write File

write
Destructive

Create or overwrite text files in a workspace, returning a unified diff for review.

Instructions

Create or overwrite a meaningful text file inside the workspace. Returns a unified diff; do not create empty placeholder files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to workspace root.
contentYesComplete file contents to write.
overwriteNoAllow overwriting existing files. Default: true.
create_dirsNoCreate parent directories if missing. Default: true.
workspace_idNoWorkspace id from open_workspace. Omit to use default workspace.
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description reinforces this with 'overwrite.' Beyond annotations, it discloses that the tool returns a unified diff and warns against empty placeholder files, adding useful behavioral context. It does not contradict the 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 concise sentences with no filler. The primary action is front-loaded first, followed by the return behavior and a key usage rule. Every phrase carries necessary information.

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 5-parameter tool with no output schema, the description covers the essential context: workspace scope, create/overwrite behavior, return format, and a critical guideline about placeholders. It relies appropriately on the schema for parameter details and annotations for destructive behavior. It is nearly complete, though it does not discuss failure modes or diff formatting in more depth.

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 100%, so the baseline is 3; the schema itself documents path, content, overwrite, create_dirs, and workspace_id. The description adds little parameter-level detail beyond 'meaningful text file' and 'inside the workspace.' This meets the baseline but does not exceed it.

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 creates or overwrites a text file inside the workspace, which differentiates it from sibling tools like edit or apply_patch that modify existing content. The scope is specific: a meaningful text file within the workspace. It leaves no ambiguity about the core operation.

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 provides clear usage context: use this tool to create or overwrite files in the workspace. It also gives an explicit constraint, 'do not create empty placeholder files,' which guides agent behavior. However, it does not directly name alternatives or state when to prefer edit or apply_patch over write, so it stops short of full exclusions.

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/Nippori709/AgentDock'

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