Send CLI Command to a Cisco Device
send_cli_commandSends IOS commands to Cisco Packet Tracer devices and returns per-command status and output for show or configuration tasks, even before boot completes.
Instructions
Send IOS commands to a Cisco device (router, switch, multilayer switch, ASA, WLC...) and return each command's status and output. Works even before the device finishes booting (boot is skipped).
Separate multiple commands with newlines.
config_command=false (default): privileged exec mode (e.g. "show ip interface brief").
config_command=true: configuration mode -- DO NOT include "enable", "configure terminal" or "end". Sub-modes carry over, so "interface Gi0/0\nip address 10.0.0.1 255.255.255.0\nno shutdown" works.
status is "invalid"/"incomplete"/"ambiguous" when IOS rejected a command.
CRITICAL: Can modify device state. Review commands carefully before executing, especially when config_command=true.
Examples:
"Run 'show ip route' on R1"
"Configure Gi0/0 on R1 with 10.0.0.1/24 and bring it up"
"Show the running config of SW1"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Device display name as shown in Packet Tracer (e.g. 'Router0', 'PC1') | |
| commands | Yes | ||
| config_command | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |