Skip to main content
Glama

write_file

Destructive

Write UTF-8 content to a remote file on an authorized online device. device_id chooses the device, path the local target and content the text. mode is 'rewrite' (default, replaces content) or 'append' (adds content). Mutates stored data; verify destination before use.

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": {
      "device_id": "<device_id>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNorewrite
pathYes
contentYes
device_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the write profile is known. The description adds genuinely useful behavioral detail beyond that: mutation of stored data, the explicit 'verify destination before use' warning, the requirement that the device be authorized/online, and the semantics of 'rewrite' (replaces existing content) versus 'append'.

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?

Four compact sentences, front-loaded with the action and destination, then parameter glosses, then the mode and the safety warning. The telegraphic middle sentence ('path the local target and content the text') is terse to the point of ambiguity but wastes no words.

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 destructive mutation tool with no output schema and zero schema-level parameter docs, the description covers the essentials (destination, mutation, mode semantics, verification warning). It omits what happens on failure (offline/unauthorized device, unwritable path) and gives no sense of the returned result, leaving meaningful gaps.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the full burden and does map all four parameters: device_id chooses the device, path the target, content the text, and mode with its default and two allowed behaviors. It does not document failure conditions, and 'path the local target' is slightly ambiguous on a remote-device tool, so it falls just short of full compensation.

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 (write) and resource (UTF-8 content to a remote file on an authorized online device), which naturally separates it from read_file, delete_path and move_path in the sibling list. It does not explicitly name or rule out any sibling, so the differentiation is implicit rather than stated.

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 implies the appropriate context (writing content to a paired, online device) and offers the caution 'verify destination before use', but gives no explicit when-to-use vs when-not guidance or alternatives. The mode explanation hints at intent (replace vs append) but the agent must infer which to pick.

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