Skip to main content
Glama

compose_build

Build Docker images defined in a Compose project without starting containers. Returns the CLI exit code and output for inspection.

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 — 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
Behavior5/5

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

The description discloses key behavior beyond annotations: it does not raise on non-zero CLI exit, requires inspecting returncode/stderr, and notes that project_dir is copied to the target host if no local plugin. These are valuable operational details not covered by annotations.

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 organized with an intro sentence, usage distinction, behavioral note, parameter list, and return type. Each section adds necessary information without redundancy, and the length is justified by the parameter documentation.

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 7 parameters, no output schema, and minimal annotations, the description covers all necessary aspects: what it does, how it differs from siblings, error handling, parameter meanings, and return format. It is fully complete for the tool's complexity.

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?

Even though the schema has 0% description coverage, the 'args' section provides detailed semantics for all 7 parameters, including defaults, interpretation ('repeatable, -f', 'default: all'), and special behavior like project_dir copying. This fully compensates for the schema gap.

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 clearly states the tool builds images for a compose project, specifically those declared in `build:` sections, and distinguishes itself from `compose_up(build=True)` by noting it does not start anything.

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?

It provides an explicit alternative (`compose_up(build=True)`) for build-and-start workflow, and clarifies the tool's purpose as build-only. The mention of non-zero CLI exit behavior also informs usage expectations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/L337-org/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server