Skip to main content
Glama

write_file

Create or overwrite a file on a cPanel server, with an automatic backup saved to .claude_backups before writing. Specify a relative directory, filename, and full content.

Instructions

Create or overwrite a file on the cPanel server (automatically saves a backup in .claude_backups first).

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

Input Schema

NameRequiredDescriptionDefault
dirNoRelative directory path (leave empty for root).
fileYesTarget file name.
contentYesComplete file content to write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does disclose two important behavioral facts: the write overwrites existing content, and a backup is automatically saved in .claude_backups. It still omits permission/auth requirements, whether missing directories are created, encoding assumptions, and what the call returns on success or failure, so it remains partial for a destructive mutation tool.

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?

One tightly written sentence with the action front-loaded and the backup behavior placed in a parenthetical where it belongs. There is no redundant or filler wording.

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 three-parameter write tool with no annotations and no output schema, the definition covers the essential risk (overwrite) and the safety net (automatic backup), which is the most important context an agent needs. It falls short only on return behavior and directory-creation semantics, which are secondary here.

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 description coverage is 100%, so all three parameters are already documented in the schema. The description adds no format, path-resolution, or size-limit detail for 'dir' or 'content' beyond what the schema provides, so the baseline 3 applies.

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 pair and resource ('Create or overwrite a file on the cPanel server'), which cleanly separates it from read_file, delete_item, and rename_or_move by action. It does not explicitly name a sibling or state which one to prefer, which is the only thing keeping it from a 5.

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?

Usage is implied by the verb: use it when you need to create new content or replace existing content. There is no explicit when-to-use versus when-not-to-use guidance, no mention of when to prefer rename_or_move or create_folder, and no stated prerequisites such as the directory already existing.

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