Skip to main content
Glama

write

Create or replace UTF-8 text atomically; for existing files, require a prior read and unchanged contents to prevent conflicting edits.

Instructions

Atomically create or replace UTF-8 text. Existing files require a prior read and unchanged contents.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description must carry the behavioral weight and it does: atomicity, UTF-8-only content, and a concurrency safeguard ('unchanged contents') that reveals a failure mode an agent would otherwise not anticipate. It stops short of saying what happens on a stale write or whether parent directories are created.

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?

Two short sentences with no filler; the core action is front-loaded and the precondition follows. Every clause carries information an agent needs.

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?

For a two-parameter mutation tool with no output schema, the essentials (atomic, UTF-8, read-before-overwrite) are covered. Missing are error/failure semantics on stale content, directory-creation behavior, and any statement of the tool's result, leaving meaningful gaps for a destructive-capable write.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so both parameters rely entirely on the description, which only implicitly conveys that 'content' is UTF-8 text. Nothing explains 'path' semantics — absolute vs relative, whether the file or its parent directories must exist, or how overwrite interacts with the prior-read rule.

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 ('Atomically create or replace UTF-8 text'), which is unambiguous about what the tool produces. It does not explicitly contrast with the sibling mutation tools edit and multi_edit, so an agent must infer the boundary itself.

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?

'Existing files require a prior read and unchanged contents' gives a real precondition that implies the safe workflow (read → write) and hints at a stale-write guard. However, it never names edit or multi_edit as the alternative for partial changes, so the choice between whole-file write and surgical edit is left to inference.

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