Skip to main content
Glama

write

Destructive

Atomically saves UTF-8 content to a scoped file using a stable operation ID for deduplication and an optional SHA-256 check to prevent conflicts.

Instructions

Atomically write a UTF-8 file within declared scope using a stable operation_id for durable deduplication and optional expected_sha256 conflict protection.

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": {
      "context_id": "<context_id>",
      "operation_id": "<operation_id>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
context_idYes
create_onlyNo
operation_idYes
mkdir_parentsNo
expected_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the safety profile is covered structurally. The description adds genuinely useful traits beyond that - atomicity, UTF-8 encoding, durable deduplication via a stable operation_id, and conflict detection via expected_sha256 - but never states that an existing file is overwritten or what happens on a hash mismatch, which is the key destructive consequence.

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?

A single front-loaded sentence with no filler; the atomicity claim leads and the two key safety mechanisms follow. It is dense rather than padded, though the compression contributes to the missing parameter explanations.

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

Completeness2/5

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

For a 7-parameter mutation tool with destructiveHint=true, no output schema, and zero schema description coverage, the definition is thin. It omits overwrite behavior, failure/rollback semantics on atomic write, and the meaning of create_only and mkdir_parents, all of which an agent needs to call this safely.

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% across 7 parameters, so the description must carry the burden and only partially does: it explains operation_id (deduplication) and expected_sha256 (conflict protection). context_id, path, content, create_only and mkdir_parents receive no semantic explanation at all, leaving four of seven parameters - including two behavioral toggles - unexplained in both schema and description.

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 gives a specific verb ('write') plus resource ('UTF-8 file') and qualifies both atomicity and scope confinement, which clearly separates it from a read-only sibling like 'read' and from the likely partial-modification 'edit'. It stops short of explicitly contrasting with 'edit' or stating whole-file replacement semantics, so it is clear but not fully differentiated.

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?

There is no explicit when-to-use or when-not-to-use guidance and no named alternative such as 'edit' or 'antigravity_read'. At best, 'atomically write' faintly implies a full-file write versus incremental editing, leaving the agent to infer the choice from sibling names.

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