Skip to main content
Glama

OpenFactory

build_image

Prepare, build, verify, and publish one OS image lifecycle.

This is the ONLY way the harness can produce an ISO — it has no root and must not run build.sh directly. The worktree path and base image come from the build record (never trusted from the caller), but it builds the config/ you authored: from the recipe it writes only config/distribution, the os.packages/os.services package list (Debian targets), the archive entries for published os.custom_obs_packages and the installer manifest. Feature packages and hooks, ENABLE_* gates, branding, users, the desktop session, GRUB/Plymouth and wallpaper exist only if you wrote them, so a recipe alone builds a stock image. Run check_image_inputs before every call. Streams build output to the dashboard and returns the durable lifecycle result. wait_seconds may keep an existing detached build in this call for up to 300 seconds; otherwise re-call the same tool while fleet build or finalization is in progress. Durable polling never redispatches or takes ownership from the worker/finalizer.

It accepts edits from config/recipe.json before choosing a cached result. A fleet-dispatched image's result is returned once: re-calling reads a build still running, still finalizing, or finished but not yet answered, and never redispatches it; after a call has returned its finished answer (finalized, a terminal failure, or a v2 session handover), the next call builds a fresh image only when the canonical inputs have changed. If the finalized image has the same recorded inputs, the tool preserves it and directs you to verification instead of consuming another attempt. Read a returned result or verdict with get_build_status or get_verification_session. Before building it checkpoints config, stages package archives and uploads, refuses a second concurrent call for the same build (in_progress: True), cleans stale live-build state/mounts left by a prior attempt (deliberately NO git reset — an agent's between-retry fixes are working-tree edits and must survive), and dispatches the authored config.

A successful image is finalized and tested in this same call. success therefore means the full lifecycle is certified; image_built separates a verification failure from an image compilation failure.

Only for builds your own MCP client drives: a free client-driven account gets five new image dispatches per UTC month, including failed compiles. A platform goal build has no per-build attempt cap. Polling, replay and verification-only checks consume none. This is separate from the one verified hosted-chat result. A quota refusal includes the paid-signup URL to relay to the owner.

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": {
      "build_id": "<build_id>"
    },
    "name": "build_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoOpenFactory MCP API key (optional).
build_idYesThe build to prepare, compile, verify, and publish.
wait_secondsNo
session_tokenNoSession token from a previous tool response. IMPORTANT: Always pass the session_token from the most recent tool response to maintain session continuity.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so in detail: it checkpoints config, stages archives, refuses concurrent calls for the same build with in_progress: True, cleans stale live-build state while deliberately avoiding git reset, and streams output to the dashboard. It further discloses quota mechanics (five dispatches per UTC month, failed compiles counted, polling/replay free) and the non-redispatch/one-time-result semantics of fleet builds.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded correctly, but the text is sprawling and repetitive, restating the non-redispatch/re-call behavior across several sentences and embedding quota/pricing copy that is only tangentially about invoking the tool. It is information-dense but would benefit from tighter grouping of lifecycle, concurrency, and quota facts.

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 needn't be described, and the definition still covers the lifecycle, idempotency/replay rules, concurrency refusal, quota limits, and what to read next. For a tool of this complexity, an agent has everything needed to call it correctly and interpret refusals.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, with api_key, session_token, and build_id documented in-schema, but wait_seconds has no schema description. The definition compensates by explaining that wait_seconds keeps an existing detached build in this call for up to 300 seconds. It also clarifies that worktree path and base image are never taken from the caller, which resolves ambiguity about what build_id actually controls.

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 opening sentence gives a specific compound verb set and resource: 'Prepare, build, verify, and publish one OS image lifecycle.' It further distinguishes itself from siblings by declaring it is the ONLY path the harness has to produce an ISO, so an agent can separate it from create_build, prepare_harness_build, and retry_build without opening schemas.

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 states prerequisites ('Run check_image_inputs before every call'), names follow-up/alternative tools explicitly (get_build_status, get_verification_session), and describes re-call behavior during fleet build or finalization. It also gives an implicit when-not: if the finalized image has the same recorded inputs, it preserves the image and routes the agent to verification rather than consuming another attempt.

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.