Skip to main content
Glama

Write a file

write_file
DestructiveIdempotent

Create or replace/append a UTF-8 file in an approved folder.

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_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo
pathYes
contentYes
steerlatchDeviceNoOptional: name or deviceId of the computer that runs this action (from operatorlane_list_devices). Recommended when several computers are online or several conversations work at once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=true, so the safety profile is largely covered; the description adds the meaningful constraint that writes are limited to an approved folder and are UTF-8. It does not warn that 'replace' silently destroys existing content, nor explain the size ceiling. Note the tension that the advertised append mode means repeated calls accumulate content, which sits awkwardly with idempotentHint=true, though this reads as annotation imprecision rather than a direct contradiction.

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?

A single front-loaded sentence with no filler; the constraint and the mode options are packed in without wasted clauses.

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 destructive write tool with no output schema, an agent still lacks the return value (whether it reports bytes written or the resulting path), the overwrite risk in rewrite mode, and behavior when the path is outside an approved folder. The definition covers what happens but not the consequences or the response.

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 coverage is only 25% — only steerlatchDevice carries an inline description. The description partially compensates by glossing 'replace/append' (mapping to the rewrite/append enum) and by framing path as an 'approved folder' location, but it says nothing about the 524288-character content limit or when to supply a device.

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/append a UTF-8 file') and adds two scoping facts: the encoding and the 'approved folder' restriction. It clearly separates writing from read_file/edit_block by being the creation/overwrite path, though it never names those siblings explicitly.

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 guidance on when to choose this over edit_block or move_file, nor any stated prerequisite such as verifying the folder is approved or checking existing content first. The 'replace/append' phrasing implies two use cases but leaves the choice entirely to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources