Skip to main content
Glama

link

List existing network connections or batch connect/disconnect GNS3 nodes with two-phase validation to prevent partial topology changes.

Instructions

Manage network connections (links)

v0.47.0: Renamed from set_network_connections to link (CRUD consolidation).

Actions: - list: List all links in a project - batch: Execute multiple connect/disconnect operations with two-phase validation

Two-phase execution for batch operations prevents partial topology changes:

  1. VALIDATE ALL operations (check nodes exist, ports free, adapters valid)

  2. EXECUTE ALL operations (only if all valid - atomic)

Connection Operations (for 'batch' action): Connect: {action: "connect", node_a, node_b, port_a, port_b, adapter_a, adapter_b} Disconnect: {action: "disconnect", link_id}

Port addressing: - adapter_* as number: link uses (adapter_*, port_*). Switches/hubs have all ports on adapter 0, so port_b=2 selects Ethernet2. - adapter_* as port name ("eth1", "Ethernet2", "Gi0/1"): the name fixes both adapter and port; port_* is ignored.

Examples: # List links >>> link(action="list", project_id="abc-123") >>> link(action="list", project_id="abc-123", format="json")

# Connect two nodes (batch)
>>> link(action="batch", connections=[{
...     "action": "connect",
...     "node_a": "Router1",
...     "node_b": "Router2",
...     "port_a": 0,
...     "port_b": 0,
...     "adapter_a": 0,
...     "adapter_b": 0
... }])

# Disconnect link (batch)
>>> link(action="batch", connections=[{"action": "disconnect", "link_id": "abc123"}])

Returns: JSON with OperationResult (completed and failed operations) or list of links

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "link"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesAction: 'list' (list links) or 'batch' (batch operations)
formatNoOutput format: 'table' (default) or 'json' (for 'list')table
project_idNoProject ID (required for 'list')
connectionsNoList of connection operations (required for 'batch')

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.54.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations are empty, so the description carries the full burden and does substantial work: it discloses the two-phase validate-then-execute semantics, that batch is atomic and prevents partial topology changes, and the precise port-addressing rules (numeric adapter vs. port-name fixing both adapter and port). It stops short of stating permission requirements, reversibility of a disconnect, or failure modes when validation fails on only some operations.

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

Conciseness5/5

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

The definition is front-loaded with the purpose and action list, then usage semantics, then examples, using headings and code blocks that make it scannable. Given the genuinely non-obvious port-addressing and atomicity rules, the length is earned; only the second 'list' example with format='json' is marginally redundant given the schema default.

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?

For a tool with nested, loosely typed connection payloads the description covers what an agent needs: action selection, operation shapes, port addressing, atomicity, and a one-line return summary (output schema exists, so return details need not be expanded). With no annotations on a topology-mutating tool, it should still say whether disconnects are destructive/irreversible or require confirmation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the top-level parameters, so the baseline would be 3, but the description adds real meaning the schema cannot: 'connections' is an untyped array of free-form objects in the schema, and the description supplies the exact accepted shapes for connect and disconnect plus the adapter/port addressing semantics. It does not elaborate on 'format' or 'project_id', which the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Manage network connections (links)') and enumerates the two actions ('list', 'batch') with one-line definitions, plus a rename note for continuity. It does not explicitly distinguish itself from the sibling tool 'gns3_connection', which sounds like it could overlap, leaving that disambiguation to the agent.

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?

It clearly states what each action does and gives runnable examples for list, connect, and disconnect, so an agent knows which action shape to use for a given intent. It never says when NOT to use this tool or names an alternative (e.g., gns3_connection) for connection-related work, so there is no explicit exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.