Skip to main content
Glama

server_file_write

Create or replace an entire file on a Docker host with optional backup, directory creation, and octal permission mode. Requires confirmation before writing.

Instructions

Create a file, or replace a whole file, on the Docker host. Needs confirm=true.

make_dirs creates missing folders. backup keeps the old file as .bak. mode is an optional octal mode such as 644 or 755 (for scripts). An existing file keeps its mode and owner. encoding is text, or base64 for binary files. For a small change to an existing file use server_file_edit instead: it never touches hidden secret lines.

Input Schema

NameRequiredDescriptionDefault
hostNo
modeNo
pathYes
backupNo
as_rootNo
confirmNo
contentYes
encodingNotext
make_dirsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description does real work: it discloses that whole-file replacement overwrites content, that backup produces <name>.bak, that make_dirs creates missing folders, and that an existing file keeps its mode and owner. It omits anything about privilege requirements (as_root is never explained) or failure behavior, which keeps it short of a 5.

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?

Front-loaded with the core action and the confirm requirement, then parameter semantics packed tightly. Every sentence carries information; only the slightly fragmented line-per-parameter layout costs it the top mark.

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?

An output schema exists, so return values needn't be explained, and the overwrite/backup/mode/encoding semantics are all present for a nine-parameter destructive write. The unexplained host and as_root parameters, plus no mention of what happens on permission failure, are the remaining 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 coverage is 0%, so the description must compensate, and it largely does — mode ('optional octal mode such as 644 or 755'), encoding ('text, or base64 for binary files'), make_dirs, backup, and confirm all get meaning beyond their bare names. Two of nine parameters, host and as_root, receive no explanation at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ('Create a file, or replace a whole file, on the Docker host') and immediately distinguishes the overwrite case from the incremental-edit case. An agent can tell this apart from server_file_edit without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'For a small change to an existing file use server_file_edit instead', and states the confirm=true requirement up front. Both the when-to-use and when-not-to-use conditions are named.

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