Skip to main content
Glama

compose_build

Build images for Docker Compose projects without starting services. Control builds with service selection, pull, and cache options.

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?

Annotations only provide readOnlyHint=false and destructiveHint=false, but the description reveals important behavioral traits: it does not raise on a non-zero CLI exit, project_dir is copied to the target host if no local plugin exists, and there is a default timeout of 1800 seconds. These details go beyond what annotations convey and are critical for correct usage.

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-sentence purpose statement, a brief behavioral note, and a scannable list of arguments and return type. Every sentence earns its place without redundancy, making it concise and easy to parse.

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?

The description covers all parameters, the return dict format, error handling behavior, and the key differentiation from compose_up. Given there is no output schema, the explicit return format is essential and provided. It is complete for a compose build tool with 7 parameters and no structured output schema.

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?

The input schema contains only type and default for each of the 7 parameters, leaving a 0% description coverage. The description's 'args:' block fully explains each parameter, including that files is repeatable, services defaults to all, pull forces a newer base image, no_cache disables cache, and timeout_seconds has a default. This completely compensates for the schema's lack of descriptions.

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 'Build images for a compose project,' a specific verb+resource statement that clearly identifies the tool's purpose. It further clarifies the scope by stating it builds only images declared in the project's `build:` sections without starting anything, and explicitly contrasts with compose_up(build=True), distinguishing it from a sibling tool.

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 explicitly states when to use this tool: to build images 'without starting anything,' and it names the alternative compose_up(build=True) for a combined build-and-start operation. It also provides guidance on handling non-zero CLI exits by inspecting returncode/stderr, giving clear usage instructions.

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