list_ports
List a device's network ports with operational status, speed, and traffic counters, then use the returned port_id to query detailed bandwidth data.
Instructions
List network ports/interfaces for a device.
Returns all network interfaces with their operational state, speed, and basic traffic counters. Essential for finding port_ids before querying traffic details.
RETURNS: Array of ports with:
port_id: Unique identifier (use with get_port_traffic)
name: Interface name (e.g., 'GigabitEthernet0/1', 'eth0')
description: Interface description from device
alias: Configured port description/label
speed: Port speed (e.g., '1 Gbps', '10 Gbps')
admin_status: Administrative state (up/down)
oper_status: Operational state (up/down)
in_octets, out_octets: Total bytes transferred
in_errors, out_errors: Error counters
EXAMPLE QUESTIONS:
"What ports are on the switch?"
"Show me all active interfaces on the router"
"Which ports have errors?"
"List ports that are admin up but operationally down"
NEXT STEPS: Use port_id with get_port_traffic for detailed bandwidth analysis
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_ports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostname | No | The hostname or IP address | |
| device_id | No | The device ID (get from list_devices) | |
| oper_status | No | Filter by operational status | |
| admin_status | No | Filter by administrative status |