pt_add_link
Create a validated link between two Packet Tracer devices, checking device and port existence, free ports, and cable type inference to prevent connection errors.
Instructions
Create a link between two devices in Packet Tracer with full validation. Checks: both devices exist, both ports exist, ports are free, cable type is valid. If cable_type is omitted, it is inferred from the device categories.
Parameters:
device1: first device name
port1: port on device1 (e.g. "GigabitEthernet0/0", "FastEthernet0/1")
device2: second device name
port2: port on device2
cable_type: cable type (straight, cross, serial, fiber, console, roll, auto, etc.) Common aliases accepted: "crossover"→"cross", "rollover"→"roll"
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": {
"device1": "<device1>",
"port1": "<port1>",
"device2": "<device2>",
"port2": "<port2>"
},
"name": "pt_add_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port1 | Yes | ||
| port2 | Yes | ||
| device1 | Yes | ||
| device2 | Yes | ||
| cable_type | No |