Skip to main content
Glama

buildx_remove

Destructive

Remove a Docker Buildx builder instance and its build cache, or clean up inactive builders. Use force to delete an in-use builder, or keep_state/keep_daemon to preserve the BuildKit state or daemon.

Instructions

Remove a builder instance.

Deletes a builder made by buildx_create, including its build cache unless keep_state=True; use buildx_prune to reclaim cache while keeping the builder. Does not raise on a non-zero CLI exit (a missing buildx plugin or a timeout still raises) - inspect returncode/stderr in the result.

Args: name: Builder name to remove (mutually exclusive with all_inactive) all_inactive: Remove every inactive builder keep_state: Keep the BuildKit state volume keep_daemon: Keep the BuildKit daemon process running force: Force removal even if the builder is in use

Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
forceNo
keep_stateNo
keep_daemonNo
all_inactiveNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes beyond annotations (readOnlyHint=false, destructiveHint=true) by detailing what is destroyed (build cache), how to preserve it (keep_state=True), and the error-handling behavior (does not raise on non-zero CLI exit but does on missing plugin/timeout). This adds significant context for safe invocation.

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 well-structured and front-loaded with the primary action, but includes slight redundancy (e.g., 'Remove a builder instance' and 'Deletes a builder made by buildx_create'). Nevertheless, every sentence provides necessary detail, and the arg descriptions are efficiently formatted.

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?

The description covers all parameters, return format (dict with returncode, stdout, stderr, truncated), error behavior, and relationship to siblings. It is sufficient for an agent to invoke the tool correctly without additional documentation.

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 description coverage is 0%, and the description fully compensates by explaining each parameter in the 'Args' section: name (mutually exclusive with all_inactive), all_inactive, keep_state, keep_daemon, and force. This adds meaning beyond the raw schema types and defaults.

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 clearly states 'Remove a builder instance' and specifies it deletes builders made by buildx_create, distinguishing it from buildx_prune (which reclaims cache while keeping the builder). This is a specific verb+resource with explicit differentiation from sibling tools.

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 advises using buildx_prune when wanting to reclaim cache while keeping the builder, providing a clear alternative and condition for selection. It also notes the tool is for builders created by buildx_create, giving context on when this tool is appropriate.

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