Skip to main content
Glama

Build an Image

build_image
Destructive

Build a container image on Control Plane and push it to the org's private registry, from a GitHub or GitLab repository (repoUrl) or from the app files stored with write_app_files (omit repoUrl). No Docker daemon is involved: the service detects how to build (Dockerfile when present, otherwise auto-detected) and always produces linux/amd64. Returns a buildId to read with get_image_build. The build keeps running after this call returns. Building an existing NAME:TAG replaces that image. A private repository needs a one-time browser authorization per org; this tool returns the link when that is missing. A folder on the user's machine still goes through the CLI: cpln image build --remote --dir PATH --name NAME:TAG --org ORG.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgNoOrganization slug.
tagYesTag for this build, e.g. "v1.2.0". Required, there is no default. Building an EXISTING tag REPLACES it, and any workload on that tag with dynamic-tag support redeploys onto the new image. Prefer a fresh tag.
nameYesImage name WITHOUT the tag, e.g. "my-app". The result is referenced in a workload as //image/NAME:TAG.
branchNoBranch to build. Omit for the repository's default branch.
noCacheNoRebuild every step, ignoring cached layers. Slower — only when a cached layer is suspect.
repoUrlNoHTTPS URL of the repository to build, e.g. "https://github.com/acme/api". GitHub and GitLab only. SSH remotes and URLs with embedded credentials are rejected. A private repo needs a one-time browser authorization per org, which this tool returns a link for. OMIT it to build the app files stored under this NAME with write_app_files.
connectNonceNoOnly when retrying after the user authorized the git provider: echo this tool's previous `connectNonce` verbatim.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNoThe full result. Read this, not only the summary.
detailsNo
summaryYes
nextStepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed28 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / branch / maxLength
      Removed value: -255
    • removedInput schema / properties / branch / minLength
      Removed value: -1
    • removedInput schema / properties / connectNonce / maxLength
      Removed value: -256
    • removedInput schema / properties / connectNonce / minLength
      Removed value: -1
    • removedInput schema / properties / name / maxLength
      Removed value: -128
    • removedInput schema / properties / name / minLength
      Removed value: -1
    • removedInput schema / properties / name / pattern
      Removed value: -"^(?![0-9]+$)[a-z0-9][a-z0-9\\-./_]*$"
    • changedInput schema / properties / org / description
      Previous value: -"Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants."New value: +"Organization slug."
    • removedInput schema / properties / org / maxLength
      Removed value: -63
    • removedInput schema / properties / org / minLength
      Removed value: -1
    • removedInput schema / properties / org / pattern
      Removed value: -"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"
    • changedInput schema / properties / repoUrl / description
      Previous value: -"HTTPS URL of the repository to build, e.g. \"https://github.com/acme/api\". GitHub and GitLab only. SSH remotes and URLs with embedded credentials are rejected. A private repo needs a one-time browser authorization per org, which this tool returns a link for."New value: +"HTTPS URL of the repository to build, e.g. \"https://github.com/acme/api\". GitHub and GitLab only. SSH remotes and URLs with embedded credentials are rejected. A private repo needs a one-time browser authorization per org, which this tool returns a link for. OMIT it to build the app files stored under this NAME with write_app_files."
    • removedInput schema / properties / repoUrl / maxLength
      Removed value: -512
    • removedInput schema / properties / repoUrl / minLength
      Removed value: -8
    • changedInput schema / properties / tag / description
      Previous value: -"Tag for this build, e.g. \"v1.2.0\". Required — there is no default. Building an EXISTING tag REPLACES it, and any workload on that tag with dynamic-tag support redeploys onto the new image. Prefer a fresh tag."New value: +"Tag for this build, e.g. \"v1.2.0\". Required, there is no default. Building an EXISTING tag REPLACES it, and any workload on that tag with dynamic-tag support redeploys onto the new image. Prefer a fresh tag."
    • removedInput schema / properties / tag / maxLength
      Removed value: -128
    • removedInput schema / properties / tag / minLength
      Removed value: -1
    • removedInput schema / properties / tag / pattern
      Removed value: -"^[a-zA-Z0-9_][a-zA-Z0-9_\\-.]*$"
    • changedInput schema / required
      Previous value: -[
      -  "org",
      -  "name",
      -  "tag",
      -  "repoUrl"
      -]New value: +[
      +  "name",
      +  "tag"
      +]
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / data / description
      Previous value: -"The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary."New value: +"The full result. Read this, not only the summary."
    • addedOutput schema / properties / details
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / nextSteps / description
      Removed value: -"Recommended follow-up actions for this task, in order."
    • removedOutput schema / properties / ok / description
      Removed value: -"Whether the call succeeded."
    • removedOutput schema / properties / summary / description
      Removed value: -"One-line summary of the result."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Despite annotations already covering readOnly=false, destructive=true, and openWorld=true, the description adds substantial context: the build continues asynchronously after the call, building an existing NAME:TAG replaces that image and may trigger redeploys, no Docker daemon is involved, the output is always linux/amd64, and private repos require a one-time browser auth link returned by the tool. This goes well beyond what annotations provide.

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?

The description is front-loaded with the core action and then systematically covers source options, async behavior, auth, and CLI fallback. Every sentence contributes, though the single dense paragraph could be slightly tighter; it remains efficient and well-organized.

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?

Given the tool's complexity (7 params, build + push operation) and the existence of an output schema, the description covers all critical aspects: source options, async return, replacement semantics, authentication, and the CLI alternative for local folders. Nothing needed for correct invocation is missing.

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 100%, so the schema already documents all seven parameters in detail. The description reinforces the repoUrl omission and the name/tag replacement semantics, but adds little parameter-level meaning beyond what is already in the structured descriptions. A baseline of 3 is appropriate.

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 states a specific verb and resource: 'Build a container image on Control Plane and push it to the org's private registry.' It clearly distinguishes from siblings like get_image_build (which reads builds) and write_app_files (which stores app files) by explaining the two source paths and the resulting buildId.

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 explicitly says when to use repoUrl versus omitting it for app files, and provides a clear alternative for local folders ('A folder on the user's machine still goes through the CLI'). It also flags the private repo authorization requirement and the need to use connectNonce on retry, leaving no ambiguity about selection or prerequisites.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.