Skip to main content
Glama

network_connect

Attach a running container to an additional network without restarting, enabling access to services on that network with optional static IPs or DNS aliases.

Instructions

Attach a running container to an additional network without restarting it.

Use this to give a container access to services on a network it was not started with. aliases sets extra DNS names for this container within the network (other containers can reach it by those names in addition to its container name). ipv4_address / ipv6_address assign a specific IP on the network; omit to let the driver assign one. links is a legacy feature (deprecated; prefer DNS aliases). Use network_disconnect to undo.

args: id_or_name - Network id or name to connect the container to container - Container id or name to attach aliases - Additional DNS names for this container within the network links - Legacy container links (deprecated) ipv4_address - Static IPv4 address to assign on this network ipv6_address - Static IPv6 address to assign on this network link_local_ips - Link-local IP addresses to assign driver_opt - Driver-specific endpoint options returns: bool - True after the container is connected

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
aliasesNo
containerYes
driver_optNo
id_or_nameYes
ipv4_addressNo
ipv6_addressNo
link_local_ipsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description adds complementary context: "without restarting it," the deprecation of links ("legacy feature... prefer DNS aliases"), and the reversibility via network_disconnect. It does not discuss error conditions or prerequisites like network existence, but adds solid value beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose, then usage context, parameter behavior, and a formatted args list plus return type. There is minor redundancy (aliases, ipv4, links appear in both prose and args list), but each mention serves a distinct purpose: prose explains behavior, args list provides quick reference.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters with 0% schema coverage, the description covers purpose, when-to-use, all parameter semantics, return value (bool), and the undo path. Gaps include explicit prerequisites (network must exist, container must be running) and error behavior, but overall it is highly complete for the tool's complexity.

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%, so the description carries the full burden and succeeds: the args section documents all 8 parameters with meaningful one-liners. Prose adds deeper semantics for aliases (extra DNS names), ipv4/ipv6 (specific IP or driver-assigned), and links (deprecated), fully compensating for the bare schema.

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 a specific verb+resource: "Attach a running container to an additional network without restarting it." This clearly distinguishes the tool from siblings like network_create (creating networks), network_list/inspect, and network_disconnect, which is explicitly named as the undo operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear usage context: "Use this to give a container access to services on a network it was not started with." It also directs users to network_disconnect for undoing. However, it does not state explicit when-not scenarios or alternatives such as connecting during container creation via container_run.

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