Skip to main content
Glama
docker-mcp
by falkenslab

Build a Compose project

compose_build

Build the images of a Compose project's services that have a build (all, or some), without starting anything: to check a Dockerfile change, or to have the images ready.

Instructions

Build the images of a Compose project's services that have a build (all, or some), without starting anything: to check a Dockerfile change, or to have the images ready. Returns the exit code and the build's output (its end when long); a failed build says why at the end. Uses the network and disk: confirm with the person first.

Input Schema

NameRequiredDescriptionDefault
fileNoIts compose file, when it isn't the folder's compose.yaml
pullNoPull newer versions of the base images first
folderYesThe Compose project's folder (absolute path), where its compose.yaml is
noCacheNoBuild every step again, ignoring the cache
servicesNoOnly these services; all with a build when missing

Output Schema

NameRequiredDescriptionDefault
outputYes
exitCodeYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: discloses network and disk consumption, that long output is truncated to its end, that failures explain themselves at the end, and that the agent should confirm with the person first. These are the exact operational facts annotations cannot convey, and they are consistent with openWorldHint=true and destructiveHint=false.

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 its boundary, and every following clause carries information (use cases, return shape, failure behavior, side effects, confirmation). The opening sentence is dense with nested clauses and the parenthetical '(its end when long)' is slightly cryptic, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and 100% schema coverage, the description only needs to cover intent, boundaries, and side effects — and it does all three, including the human-confirmation requirement for a mutating, network-touching operation. Nothing an agent needs to call this correctly is missing.

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 100%, so the baseline would be 3, but the description adds a real semantic: only services that declare a build are built, and 'all, or some' clarifies the services parameter's default scope beyond the schema's 'all with a build when missing'. The file, pull, and noCache parameters are left entirely to the schema.

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 ('Build the images of a Compose project's services') plus an explicit scope limiter ('that have a build') and boundary ('without starting anything'). This cleanly separates it from compose_up and from the single-image build_image sibling without opening any schema.

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

Usage Guidelines4/5

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

Gives concrete use cases ('to check a Dockerfile change, or to have the images ready') and the negative condition 'without starting anything', which implicitly routes starting to compose_up. It does not name the alternative sibling or state prerequisites beyond the human-confirmation instruction, so it falls just short of a 5.

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