Skip to main content
Glama
Apple Container MCP Server

Apple Container MCP Server

by joeshirey

build_image

Builds a container image from a local context path asynchronously and returns a build ID for polling status.

Instructions

Build an image from a local context path (runs asynchronously — builds can be long).
Returns a build_id to poll with check_build_status.

Args:
  context_path: Path to the build context directory.
  tag: Image name and tag, e.g. "myapp:v1".
  secrets: Secret specs, e.g. ["id=mysecret,src=secret.txt"].
  dockerfile: Path to a custom Dockerfile (default: Dockerfile in context_path).
  build_args: Build-time variables, e.g. ["VERSION=1.0"].
  no_cache: Disable layer cache.
  platform: Target platform, e.g. "linux/amd64".
  target: Multi-stage build target stage name.
  ssh: Forward the host's SSH agent to the build (Apple Container 1.2.1+), e.g. "default".
    Only reachable during a Dockerfile `RUN --mount=type=ssh` step, not for the container's
    whole lifetime — unrelated to (and no more exposed than) `run_container`'s SSH handling,
    which stays blocked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "context_path": "<context_path>"
    },
    "name": "build_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
sshNo
tagNo
targetNo
secretsNo
no_cacheNo
platformNo
build_argsNo
dockerfileNo
context_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.2

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it declares the operation asynchronous and potentially long-running, names the returned handle, and explains the security-relevant ssh scoping (only during RUN --mount=type=ssh, and distinct from run_container's blocked SSH). It does not cover failure behavior, whether the resulting image lands in the local store, or what permissions/auth are needed.

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 purpose and async behavior, then a clean Args block that maps one-to-one onto the parameters. The ssh entry is noticeably longer than the rest, but that length is justified by a genuine security nuance rather than padding.

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?

An output schema exists, so return values need not be spelled out, yet the description still surfaces the key one (build_id) and the polling pattern. Combined with full parameter documentation and the async caveat, an agent has everything needed to invoke and follow up correctly.

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 coverage is 0% with 9 parameters, so the description must compensate entirely, and it does: every parameter gets a one-line explanation with a concrete example value ("myapp:v1", "id=mysecret,src=secret.txt", "linux/amd64"), and defaults are clarified for dockerfile and no_cache. This adds meaning well beyond the bare typed 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 an image) plus scope (from a local context path), and immediately distinguishes itself from the polling sibling by saying it returns a build_id for check_build_status. An agent can differentiate it from pull_image or commit_container 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?

Clearly establishes the async workflow and explicitly routes the agent to check_build_status as the follow-up. It also restricts the input to a local context path, which implicitly rules out remote-image sources. It stops short of naming alternatives such as pull_image for registry images or stating prerequisites (e.g. builder must be started).

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