Skip to main content
Glama

docker_stack_write

Create or replace a Docker Compose stack file, validate it with docker compose config, and restore the prior file if validation fails. Does not start services.

Instructions

Create a new stack, or replace the compose file of one, then check it. Needs confirm=true.

The file goes to //compose.yaml (an existing compose file keeps its name). The result is checked with docker compose config. If the check fails, the old file is put back (or the new file removed) and the error is shown. Nothing is started: use docker_stack_action up. Secret values should be ${VARIABLES} that live in the .env file (write that with server_file_write).

Input Schema

NameRequiredDescriptionDefault
hostNo
stackYes
confirmNo
contentYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the confirm=true gate, the write target path, the validation step (`docker compose config`), and rollback semantics ('the old file is put back (or the new file removed)'), plus that it is not a start operation. It stops short of stating permission/auth requirements or multi-host 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?

Front-loaded with the action and the confirm requirement, then the mechanics, then the alternative tools. No filler sentences, though the file-path sentence and the variable guidance make it slightly dense for what is essentially a write-with-validate operation.

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 mutation tool with no annotations and a 0%-coverage schema, the description covers atomicity, rollback, validation, and the not-a-start caveat; an output schema exists so return values needn't be explained. The unexplained `host` parameter is the main remaining hole.

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 0%, so the description must compensate. It explains `confirm` ('Needs confirm=true'), implies `stack` via the target path, and implies `content` is the compose file body, but the `host` parameter is never mentioned at all — a real gap given four undocumented parameters.

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 specific verb and resource: 'Create a new stack, or replace the compose file of one, then check it.' That precisely separates it from docker_stack_file (read), docker_stack_config (validate only), and docker_stack_action (start/stop), and it names the follow-up sibling explicitly.

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?

Gives explicit routing: 'Nothing is started: use docker_stack_action up' after writing, and 'write that with server_file_write' for .env secrets. Both alternatives and the condition that selects them are named, leaving little to inference.

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