Skip to main content
Glama

buildx_history_inspect

Read-only

Inspect a single Docker build record by ref to debug failed or slow builds. Returns duration, materials, attestations, and errors from JSON output.

Instructions

Inspect a single build record by ref, parsed from --format json.

Returns the full record for one build - duration, materials, attestations, error (if any) - for debugging a failed or slow build found via buildx_history_list. Requires buildx >= v0.13. Raises RemoteFailureError if the CLI call fails.

Args: ref: Build record ref. Pass the ref field from buildx_history_list directly - it reports a qualified "//", but history inspect only accepts the bare id, so this reduces it to the id and (unless builder is given) targets the builder named in the ref. Empty/omitted inspects the most recent build; the ^N syntax (e.g. "^0" = latest) is also valid. builder: Builder instance the build ran on (defaults to the one in ref, else active)

Returns: dict: The parsed build record (or {"raw": } if the output isn't a JSON object)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
builderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.4
  2. Removedv2.1.4
  3. First observedv1.9.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations by disclosing JSON parsing, the buildx >= v0.13 requirement, RemoteFailureError, ref normalization from qualified to bare id, and the {'raw': stdout} fallback when output is not a JSON object.

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 longer than average but every sentence earns its place: purpose, prerequisites, error behavior, parameter semantics, and return format. It is front-loaded with the core purpose and uses a clear Args/Returns structure.

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?

Despite having no output schema, the description explains the return value as a parsed dict and the raw fallback. It covers prerequisites, failure behavior, parameter semantics, and typical usage context, leaving no essential gap for an agent to call it 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?

With 0% schema description coverage, the description carries the full parameter burden and does so thoroughly. It explains ref's qualified format, automatic reduction to bare id, builder targeting, default builder selection, and valid syntaxes like '^0'. Builder is also fully described.

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: 'Inspect a single build record by ref'. It clearly distinguishes this from buildx_history_list by saying the record is found via that list, and frames the purpose as debugging failed or slow builds.

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?

Explicitly describes the intended use case: debugging a failed or slow build located through buildx_history_list. It also gives practical invocation guidance for ref, including empty/omitted behavior and the ^N syntax, but does not explicitly state when to prefer sibling inspect tools.

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

Deploy Server

Other Tools