Skip to main content
Glama

write_file

Idempotent

Create or overwrite text files directly on a Pterodactyl-hosted server container by specifying the server ID, target path, and full content.

Instructions

Create or overwrite a text file directly on the server.

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

Input Schema

NameRequiredDescriptionDefault
fileYesTarget file path inside container (e.g. '/index.js')
contentYesFull text content to write to the file
server_idYesShort server identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and idempotentHint=true, so the write and repeat-safety profile is already covered. The description adds the important detail that an existing file is overwritten, meaning prior content is destroyed, but it omits permission requirements, parent-directory creation, text-vs-binary limits, and error behavior.

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?

A single efficient sentence that front-loads the create/overwrite action. The trailing phrase 'directly on the server' is slightly vague and could be tightened, but nothing is wasted.

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 three-parameter write tool with no output schema, the definition covers the core action and overwrite behavior but leaves gaps an agent would want: whether parent directories are created, whether non-text content is rejected, and what is returned on success or failure.

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 (server_id, file, content) are already documented in the schema. The description adds only the marginal hint that content is text, and provides no additional format or path semantics beyond what the schema states.

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 overwrite a text file') and even clarifies the overwrite semantics. It does not differentiate from sibling tools such as upload_file or copy_file, so an agent cannot tell which file-writing path to choose without guessing.

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 or when-not guidance is given. The phrase 'create or overwrite' implies this is the path for writing inline text content, but there is no explicit comparison to upload_file or copy_file, and no prerequisites (permissions, existing directory requirements) are stated.

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