Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesNetwork ID or name

Implementation Reference

  • 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"}`,
  • 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"],
      },
    },
  • Dispatch logic for docker_inspect_network inside handleDockerTool.
    case "docker_inspect_network": return inspectNetwork(a);

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/batu-sonmez/infraclaude'

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