Skip to main content
Glama

pt_read_stp

Reads actual Spanning Tree state per VLAN to identify the root bridge, root port, path cost, and priority across switches, flagging VLANs that disagree on the root and are not converged.

Instructions

Reads Spanning Tree's REAL state per VLAN: who the root bridge is.

Per switch and VLAN: whether it is the root, the root ID (priority and MAC), and where available its bridge ID, priority, root path cost and root port. Across switches it flags VLANs where they disagree on the root (not converged). PT 9 does not expose per-port STP state or role.

Parameters:

  • switch: switch name; empty = every switch.

  • vlans: VLAN numbers to read; empty = every VLAN in the switch.

Example: pt_read_stp(vlans=[1, 10])

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

Input Schema

NameRequiredDescriptionDefault
vlansNo
switchNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does substantial work: it discloses exactly which values come back, that results are aggregated and compared across switches to flag non-converged VLANs, and — importantly — that PT 9 does not expose per-port STP state or role. That explicit limitation prevents wasted calls. It lacks any statement about permissions or empty-result behavior, keeping it at 4.

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

Conciseness5/5

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

Front-loaded summary sentence, then returned fields, then the scoping caveat, then compact parameter notes and an example. Every sentence carries information the agent needs; nothing is restated from the schema or padding.

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

Completeness4/5

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

With an output schema present, the description needn't document return structure, and it correctly focuses on scope, caveats, and parameter semantics. The only real gap for a tool of this complexity is behavior on edge cases — an unknown switch name, a VLAN absent from a switch, or an empty result set — which an agent would need in order to interpret output reliably.

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 compensate, and it does: 'switch: switch name; empty = every switch' and 'vlans: VLAN numbers to read; empty = every VLAN in the switch' define both the type meaning and the empty-value semantics that the schema's bare defaults do not. The inline example with a literal VLAN list reinforces the expected argument shape.

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?

Opens with a specific verb and resource ('Reads Spanning Tree's REAL state per VLAN') and immediately narrows the question to 'who the root bridge is'. The 'REAL state' framing and the enumeration of returned fields make it distinguishable from the mutating sibling pt_apply_stp without opening either schema.

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?

The read-only framing and the stated scope (per switch AND per VLAN, aggregating across switches) give a clear picture of the situation this tool serves, and the cross-switch disagreement flag tells the agent when it is useful. It stops short of explicitly naming pt_apply_stp as the write counterpart or stating when not to use it, so it is a 4 rather than a 5.

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

Deploy Server

Other Tools