Skip to main content
Glama

docker_build

Builds Docker images from local directories or HTTPS Git repositories using a specified tag and Dockerfile. Requires confirmation to proceed.

Instructions

Build an image with docker build. Needs confirm=true.

context is a folder on the host (in an allowed folder) or an https git URL such as https://github.com/example/repo.git#main. tag is the image name, for example myapp:latest. dockerfile is a path inside the context. Build args are visible in the image history: do not put real secrets in them.

Input Schema

NameRequiredDescriptionDefault
tagYes
hostNo
pullNo
targetNo
confirmNo
contextYes
no_cacheNo
platformNo
build_argsNo
dockerfileNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations present, the description carries the burden and does disclose meaningful behavior: a confirm gate is required, context must be in an allowed host folder or an https git URL, and build args leak into image history. It omits whether the build blocks/streams, timeout behavior, and whether an existing tag is overwritten.

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-loads the action and the confirm requirement, then documents the two required parameters in compact sentences. The security warning is a worthwhile addition; nothing is redundant, though the formatting is slightly fragmented.

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

Completeness3/5

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

Output schema exists so return values need not be described, but for a 10-parameter mutation tool with zero annotations, missing explanation of target (multi-stage builds), platform, and no_cache leaves meaningful invocation ambiguity. The safety-critical parts are covered; the optional-flag semantics are not.

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% across 10 parameters, and the description explains only context (formats, constraints), tag (image name example), dockerfile (path inside context), and build_args (secret-leak warning). Optional parameters host, pull, target, no_cache, and platform remain completely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Build an image with docker build' — which is unambiguous and clearly distinct from siblings like docker_pull_image or docker_run, but it never explicitly contrasts itself with those siblings.

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

Usage Guidelines3/5

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

Provides a hard prerequisite ('Needs confirm=true') and restricts context to an allowed folder or https git URL, which is real usage guidance, but gives no when-to-use/when-not guidance relative to docker_create, docker_run, or docker_pull_image.

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