Skip to main content
Glama

Write File

write
Destructive

Create or overwrite text files in your workspace, returning a unified diff to track changes. Use to write meaningful content without empty placeholders.

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?

destructiveHint: true and readOnlyHint: false already flag the mutation; the description adds value beyond annotations by disclosing that it 'Returns a unified diff' and requiring meaningful content. These details go beyond what structured annotations carry and do not contradict them.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with the core action front-loaded and no filler. The tail packs the return format and a usage rule into one compact clause, which is efficient though slightly dense; every sentence earns its place.

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

Completeness3/5

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

Adequate for a write tool whose safety profile is covered by annotations, but the sibling edit is never addressed and 'unified diff' is left undefined. For a destructive tool with no output schema, it could clarify overwrite defaults and edge behavior more.

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 documentation covers 100% of the 5 parameters (path, content, overwrite, create_dirs, workspace_id), so the baseline of 3 applies. The description adds no parameter-level meaning beyond what the schema already provides.

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

Purpose4/5

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

States a specific verb and resource ('Create or overwrite a meaningful text file inside the workspace') with clear scope, and the title 'Write File' reinforces it. It clearly implies whole-file creation vs. incremental edits, but stops short of naming the edit sibling explicitly, so it earns a 4 rather than a 5.

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?

Offers one behavioral rule ('do not create empty placeholder files') but gives no guidance on when to use this tool versus the sibling edit (or bash). The alternatives are not named and no conditions for choosing write over edit are provided, leaving the agent to infer.

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/sedatustunova/S3dat-Relay'

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