Skip to main content
Glama

get_stp_status

Read-onlyIdempotent

Retrieves live spanning-tree state per VLAN and port to identify blocked ports, unexpected root bridges, missing edge-port settings, and loop or topology-change issues.

Instructions

Get spanning-tree state (STP 802.1D, RSTP 802.1w, rapid-PVST or MSTP).

FastIron usually runs one 802.1w instance PER VLAN. For each instance returns: bridge priority/address, root bridge priority/address, whether this switch is root, root port, root path cost, timers, topology-change count, and per-port role (ROOT/DESIGNATED/ALTERNATE/BACKUP/DISABLED), state (FORWARDING/ DISCARDING/LEARNING/BLOCKING), cost, priority, edge-port and BPDU guard.

Use this to find blocked ports, unexpected root bridges, missing edge-port config on access ports, or loop/topology-change problems.

Args: vlan: Only this VLAN's instance (per-VLAN STP/RSTP). port_filter: Substring or glob on port name, e.g. "1/1/4*" or "lg1". only_non_forwarding: Only ports NOT in forwarding state.

On FastIron, RESTCONF only has STP configuration; live state comes from show 802-1w and is merged (source "restconf+ssh"). port_config lists the per-port edge-port / BPDU-guard / root-guard config for ALL ports (also ones not currently in an STP instance), handy for spotting access ports missing edge-port.

Returns {source, enabled_protocols, summary:{root_bridge_for, distinct_root_bridges, blocked_or_discarding_ports, ...}, instances:[...], port_config:{port: {...}}}. Summary covers all instances regardless of filters.

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": "get_stp_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
vlanNo
port_filterNo
only_non_forwardingNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the description's job is added context — and it delivers: the FastIron one-instance-per-VLAN behavior, the merged 'restconf+ssh' data source, and the important caveat that `port_config` covers ALL ports including those outside any STP instance. It also discloses that `summary` spans all instances regardless of filters, a non-obvious aggregation quirk an agent would otherwise misread.

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

Conciseness4/5

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

Well front-loaded (purpose, then use cases, then args, then platform caveats, then return shape) and labeled sections keep a long description scannable. Slightly over-long: the full enumeration of returned fields overlaps with the output schema and could be trimmed without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only diagnostic tool with 3 params, an output schema, and platform-specific quirks, everything an agent needs is present: protocol scope, filtering semantics, merged data-source implications, aggregation caveat, and return shape. No gaps remain that would cause a mis-call.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the full burden, and it does: each of the three args is explained with intent and concrete syntax ('1/1/4*' or 'lg1' for the glob/substring port_filter, per-VLAN scoping for vlan, forwarding-state exclusion for only_non_forwarding). The glob syntax is meaning the schema cannot express at all.

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

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Get spanning-tree state') and enumerates the supported protocol variants (802.1D, RSTP 802.1w, rapid-PVST, MSTP). It then lists concrete returned fields (bridge priority/address, root port, root path cost, per-port role/state/cost), making it unmistakably distinct from siblings like get_interfaces or get_vlans.

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?

Explicit use-case routing is given: 'Use this to find blocked ports, unexpected root bridges, missing edge-port config on access ports, or loop/topology-change problems.' It also warns that RESTCONF only carries STP configuration and live state is merged from `show 802-1w`, which steers an agent away from expecting config-only results. No explicit named alternative or when-not-to-use condition, so not a 5.

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