Skip to main content
Glama

network_prune

DestructiveIdempotent

Remove unused Docker networks with zero connected containers, excluding built-in networks. Use filters to target specific networks by creation time or labels.

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). Use network_remove to delete one specific network instead.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersNo
Behavior5/5

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

While annotations already declare destructive and idempotent behavior, the description adds crucial context: built-in networks are never removed and only networks with zero connected containers are eligible. It also documents the return dict, going beyond the bare annotations.

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?

Two succinct paragraphs: the first states purpose, eligibility, and safety; the second documents args and return. No redundancy or filler, front-loaded with the core action.

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?

Given one loosely-typed parameter and no output schema, the description covers purpose, usage conditions, filter semantics, alternative tool, and return format. It is entirely sufficient for an agent to select and invoke the tool 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?

Schema description coverage is 0%, but the description fully compensates by explaining the 'filters' parameter: valid keys 'until' and 'label' with formats, and that omitting it removes all unused custom networks. This is far more than the bare schema provides.

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 opens with 'Remove networks that have no active container endpoints' – a specific verb, resource, and condition. It also distinguishes itself from network_remove by explicitly noting the alternative for single-network deletion.

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 when to use: 'Only networks with zero connected containers are eligible' and clearly names the alternative: 'Use network_remove to delete one specific network instead.' It also specifies built-in networks are never removed, providing clear boundaries.

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/L337-org/docker-mcp'

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