Skip to main content
Glama

network_prune

DestructiveIdempotent

Remove custom Docker networks with no active containers. Filter by timestamp or label for targeted cleanup of unused networks.

Instructions

Remove networks that have no active container endpoints.

Built-in networks (bridge, host, none) are never removed. Only networks with zero connected containers are eligible. Valid filter keys: until (RFC3339 timestamp or duration — removes networks created before that point), label (key or key=value).

args: filters - Narrow which networks to remove; omit to remove all unused custom networks returns: dict - {"NetworksDeleted": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo
Behavior4/5

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

The description adds key behavioral details beyond annotations: built-in networks are exempt, only zero-container networks are eligible, and valid filter keys are listed. The return format is also given. There is no contradiction with annotations which mark the tool as destructive and idempotent.

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 concise and well-structured. It uses a clear opening sentence, followed by bullet-point-like details and explicit parameter and return documentation. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (one parameter, no output schema), the description covers the parameter thoroughly, explains eligibility criteria, and notes the return format. It omits nothing critical, though permissions or side effects could be mentioned. Still, it is complete for practical use.

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 fully compensates. It explains the 'filters' parameter: narrows removal, valid keys 'until' and 'label', and default behavior (remove all unused custom networks). This adds significant meaning beyond the schema's bare object type.

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 networks that have no active container endpoints' with specific verb and resource. It distinguishes from sibling prune tools like container_prune, volume_prune, and image_prune by focusing solely on networks.

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?

The description explains that built-in networks are never removed and that only networks with zero connected containers are eligible. It also describes filter keys. However, it does not explicitly contrast with other prune tools or state when to use this tool versus alternatives, but the context is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GavinLucas/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server