Add a Device to the Network
add_device_to_networkAdds a specified router, switch, PC, or other Packet Tracer device to the logical workspace, optionally setting its display name and X/Y coordinates.
Instructions
Add a device to the logical workspace. Returns the device's name (Packet Tracer assigns one such
as 'Router0'; it is renamed to name if given).
Required: device_type (e.g. "router", "switch", "pc", "server"), model (e.g. "2911", "ISR4331", "2960-24TT", "PC-PT", "Server-PT" -- discover via get_device_models). Optional: x/y position, name.
Examples:
"Add a 2911 router called R1"
"Put a 2960 switch at 300,200"
"Add two PCs to the network"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Logical-workspace coordinate in pixels | |
| y | No | Logical-workspace coordinate in pixels | |
| name | No | ||
| model | Yes | ||
| device_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |