Skip to main content
Glama

compose_build

Build Docker Compose project images without starting containers. Specify services, disable cache, or force pull for updated base images.

Instructions

Build images for a compose project.

Builds the images declared by the project's build: sections without starting anything - compose_up(build=True) builds and starts in one step. Does not raise on a non-zero CLI exit (a missing compose plugin or a timeout still raises) - inspect returncode/stderr in the result.

Args: project_dir: Dir with the compose file (default: server cwd; copied to the target host if no local plugin) files: Explicit compose file paths (repeatable, -f) project_name: Compose project name override services: Specific services to build (default: all) pull: Always attempt to pull a newer base image no_cache: Do not use cache when building timeout_seconds: Subprocess timeout (default 1800s)

Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pullNo
filesNo
no_cacheNo
servicesNo
project_dirNo
project_nameNo
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the sparse annotations, the description discloses important runtime behavior: it does not raise on a non-zero CLI exit, but a missing compose plugin or timeout still raises; callers should inspect `returncode`/`stderr`. It also notes that `project_dir` may be copied to the target host when no local plugin exists, which is useful contextual behavior.

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?

The description is well structured: a one-line summary, a differentiation note, a behavior warning, an Args list, and a Returns block. Every sentence adds operational value, and the content is front-loaded with the most important scoping detail.

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 no output schema, seven optional parameters, and sparse annotations, the description compensates fully: it documents all parameters, specifies the exact return dictionary, and explains failure semantics. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries full responsibility for explaining parameters. It does so thoroughly: all seven schema properties are documented with meaning, defaults, and Docker-flag equivalences (e.g., `files` as repeatable `-f`, `services` defaulting to all, `timeout_seconds` defaulting to 1800).

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?

The description opens with a specific verb and resource: 'Build images for a compose project.' It further narrows scope to the project's `build:` sections and explicitly contrasts with `compose_up(build=True)`, which also builds. This clearly differentiates the tool from siblings like compose_up and buildx_build.

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?

The description gives explicit when-to guidance: use this tool to build images without starting anything, while `compose_up(build=True)` is named as the alternative for build-and-start in one step. This leaves little ambiguity about how to select between the two closely related compose operations.

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

Deploy Server

Other Tools