Skip to main content
Glama

Write a file

write_file
Destructive

Create or overwrite a text file on the user's computer.

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
pathYes
appendNo
deviceNoDevice name. Optional when the account has only one online device.
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is known. The description adds that files may be created or overwritten, but omits the append parameter (which can avoid overwrite) and device targeting, so it does not fully disclose behavior beyond annotations. With annotations covering safety, a 3 is appropriate.

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 sentence with no wasted words, and the core action is front-loaded. It is appropriately sized for the basic purpose, though its brevity contributes to incompleteness elsewhere.

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 four parameters and no output schema, the description omits append mode, device targeting, directory creation behavior, and prerequisites, leaving key invocation details to inference. Annotations cover the destructive hint, but the description is not complete enough for confident use.

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 only 25% (device only), and the description adds no parameter semantics for path, content, or append beyond implying content is text. The append flag is particularly important because it changes write mode, yet it is undocumented in both schema and description. This fails to compensate for low coverage.

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 (create/overwrite) and resource (text file) with scope (user's computer), so the agent knows it is a file-writing tool. However, it does not differentiate itself from sibling edit_block, create_directory, or move_file, leaving the agent to infer when to choose this over partial-edit tools. Clear but not sibling-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?

No when-to-use guidance or alternatives are provided. The agent is not told to prefer edit_block for partial modifications or read_file for reads, nor when append should be used. This is essentially no guidance.

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