Skip to main content
Glama

docker_list_networks

View Docker network configurations to manage container connectivity and inspect driver and scope details.

Instructions

List Docker networks with driver and scope

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the docker_list_networks tool logic.
    export async function listNetworks(): Promise<string> {
      const docker = getDockerClient();
      const networks = await docker.listNetworks();
    
      if (networks.length === 0) {
        return "No Docker networks found.";
      }
    
      const headers = ["NAME", "ID", "DRIVER", "SCOPE"];
      const rows = networks.map((n) => [
        n.Name,
        n.Id.substring(0, 12),
        n.Driver || "N/A",
        n.Scope || "N/A",
      ]);
    
      return `Docker networks:\n\n${formatTable(headers, rows)}`;
    }
  • The registration of the docker_list_networks tool in the main index file.
      name: "docker_list_networks",
      description: "List Docker networks with driver and scope",
      inputSchema: { type: "object" as const, properties: {} },
    },

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