Skip to main content
Glama

network_remove

Destructive

Remove a Docker network by ID or name. Fails if containers are attached, and built-in networks cannot be removed.

Instructions

Remove a single custom network by id or name.

Fails if any container is still attached (disconnect with network_disconnect or stop the containers first). Built-in networks (bridge, host, none) can never be removed and return an error regardless of attachment state. For bulk cleanup of every unused custom network at once use network_prune instead.

Returns: bool: True after removal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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?

Beyond the destructiveHint annotation, the description adds critical behavioral details: failure when containers are attached, the irreversibility of built-in network removal regardless of attachment state, and the boolean return value. These are meaningful operational traits that an agent needs to predict behavior correctly.

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 compact and front-loaded, stating the core purpose in the first sentence, followed by essential failure conditions and the alternative tool. There is no redundant filler; every sentence adds operational value.

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?

For a single-parameter destructive tool with a bool output schema, the description covers purpose, preconditions, failure modes, non-removable networks, and the bulk alternative. Nothing critical is missing for an agent to invoke this tool correctly.

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?

The schema only defines id_or_name as a required string with no description. The description compensates by clarifying that this single parameter accepts either an id or a nametemp, and that it refers to a custom network. While it does not elaborate on formats or validation, the key semantic ambiguity is resolved.

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 first sentence clearly states the verb (remove), the resource (custom network), and the selection method (by id or name). It distinguishes itself from related network operations and explicitly identifies the bulk alternative, network_prune, so an agent can select the correct tool.

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?

The description gives concrete guidance on when to use this tool versus alternatives: use network_disconnect or stop containers first if any are attached, and use network_prune for bulk cleanup. It also warns that built-in networks can never be removed, giving the agent clear preconditions and exclusions.

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