docker/networks
List Docker networks with driver, scope, subnet, gateway, and attached containers. Filter by name pattern or driver; output as text, JSON, YAML, or table.
Instructions
Lists Docker networks (not the host's: for host interfaces and routes use the network:// resources and network/* tools) with driver, scope, subnet, gateway and the containers attached with their addresses. Read-only. pattern is a glob on the name; driver an exact driver (bridge, host, none, overlay, macvlan). Text shows Attached: (nothing) for an empty network; output_format: json (also yaml/table/wide) returns an array of objects (name, id, full_id, driver, scope, created, internal, attachable, ingress, ipam_driver, subnets, gateways, containers, options, labels). Removing unused networks is docker/prune (target networks); one network's full detail is the docker-network://<name>/inspect resource. Always runs as root: no privileged argument, refused unless the grant has allowed: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| driver | No | Only networks using this driver (bridge, host, none, overlay, macvlan, ...) | |
| pattern | No | Only networks whose name matches this glob (e.g. 'app-*') | |
| output_format | No | Use json for structured output (yaml, table and wide return the same JSON); default is text |