Skip to main content
Glama

write

Destructive

Create or replace a file in the workspace. Supply the last read revision, or 'missing' for a new file, to prevent overwriting concurrent changes.

Instructions

Create or replace a file using Pi. expected_revision must be the last read revision, or 'missing' to create a new file. Returns its new revision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path or path relative to the workspace. Home is a starting directory, not a sandbox.
contentYes
request_keyYesUnique operation key within this workspace. Reuse only for the exact same request; uncertain outcomes must not be blindly retried.
workspace_idYes
expected_revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already indicate destructive and non-read-only behavior. The description adds valuable behavioral context by explaining the concurrency contract around expected_revision and confirming that the tool returns the new revision. No contradiction with 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 sentences with no filler. It front-loads the purpose and then gives the critical revision guidance and return value, earning every word.

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 file write tool, the description covers the core purpose, the key concurrency rule, and the return value. It does not discuss failure modes or parent-directory creation, but annotations and schema fill much of the safety context.

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 only 40%, and the description compensates for the most important undocumented parameter by explaining expected_revision semantics precisely. However, it adds little about other parameters like content or workspace_id beyond what their names and schema descriptions imply.

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?

The description states a specific verb and resource: 'Create or replace a file.' It clearly conveys the operation's scope. It does not explicitly differentiate from the sibling 'edit' tool, but 'create or replace' implies whole-file operations versus edits.

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 provides necessary practical guidance through the expected_revision requirement, telling the agent when to use 'missing' for new files or the last read revision for replacements. However, it does not explicitly state when to prefer write over edit or other alternatives, leaving this to inference.

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