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
projectNo
device_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "default": "",
      +  "title": "Project",
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is known. The description adds value beyond that by explaining exactly what rewrite does (replaces existing content) versus append, and by warning the agent to verify the destination before mutating stored data.

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?

Three short sentences, each doing work: the first establishes the operation and constraints, the second maps parameters, the third conveys mode behavior and the mutation warning. Nothing is padded and the core action is front-loaded.

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 destructive, five-parameter tool with no output schema, this is nearly sufficient: mutation risk and mode semantics are covered. It stops short of saying whether a missing path is created or whether an unauthorized/offline device errors out, and it omits the project parameter.

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?

With 0% schema description coverage, the description has to carry parameter meaning, and it does cover device_id, path, content, and both mode values including the default. However, the fifth parameter (project) is entirely unexplained in both schema and description, leaving a real gap.

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 with meaningful scope qualifiers: writing UTF-8 content to a remote file on an authorized online device. It implicitly separates itself from read_file and file_info, though it never names a sibling such as edit_block, which is the closest overlapping alternative.

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 only guidance is a caution ('verify destination before use') plus the mode distinction, which implies when rewrite vs append applies. There is no explicit statement of when to choose this over edit_block or transfer_file, so usage must be inferred.

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