docker_inspect_network
Retrieve detailed Docker network information including connected containers to analyze network configuration and container connectivity.
Instructions
Get detailed info about a Docker network including connected containers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Network ID or name |
Implementation Reference
- src/tools/docker/networks.ts:23-37 (handler)The inspectNetwork function executes the 'docker network inspect' command using the Docker client.
export async function inspectNetwork(args: Record<string, unknown>): Promise<string> { const docker = getDockerClient(); const id = args.id as string || args.name as string; if (!id) throw new Error("Network ID or name is required"); const network = docker.getNetwork(id); const info = await network.inspect(); const lines = [ `Name: ${info.Name}`, `ID: ${info.Id.substring(0, 12)}`, `Driver: ${info.Driver}`, `Scope: ${info.Scope}`, `Internal: ${info.Internal || false}`, `IPAM: ${info.IPAM?.Driver || "default"}`, - src/tools/docker/index.ts:102-111 (registration)Tool definition for docker_inspect_network in the Docker tools suite.
name: "docker_inspect_network", description: "Get detailed info about a Docker network including connected containers", inputSchema: { type: "object" as const, properties: { id: { type: "string", description: "Network ID or name" }, }, required: ["id"], }, }, - src/tools/docker/index.ts:130-130 (handler)Dispatch logic for docker_inspect_network inside handleDockerTool.
case "docker_inspect_network": return inspectNetwork(a);