Skip to main content
Glama

switch_get_port_stats

Read TP-Link switch port TX/RX good and bad packet counters for one port, a PORT_MAP name, or all ports with error_ports flagged. Non-mutating, for monitoring link health and errors.

Instructions

Read-only: tx/rx good/bad packet counters. Pass a port number or a PORT_MAP name for one port, or omit it for all ports plus error_ports (any port with rx_bad+tx_bad > 0). Does not mutate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the safety profile ('Read-only', 'Does not mutate') and the derived semantics of error_ports (rx_bad+tx_bad > 0), which is genuinely useful. However, it omits permission/auth requirements (relevant given sibling switch_login/switch_check_auth) and any error or rate-limit behavior.

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?

Three short sentences, front-loaded with the read-only safety statement, then the return content, then the argument contract. No filler; every clause carries information.

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?

For a one-parameter read tool with no output schema and no annotations, the description covers purpose, argument contract, return content summary, and non-mutation. It is nearly complete, missing only auth/permission prerequisites that siblings imply may exist.

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

Parameters4/5

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

The single parameter has 0% schema description coverage, so the description must compensate. It does so well: it maps the anyOf integer|string|null to 'port number' / 'PORT_MAP name' / omit-for-all. The only gap is that 'PORT_MAP name' is not defined and its source (possibly switch_resolve_port) is left implicit.

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?

States a precise verb+resource combination ('tx/rx good/bad packet counters' for switch ports) and defines the scope (one port vs. all ports plus error_ports). This is clearly distinguishable from siblings like switch_get_ports, switch_get_poe, or switch_status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains how to invoke it (pass a port number, a PORT_MAP name, or omit for all) and what the omission yields, but gives no guidance on when to choose this tool over siblings such as switch_get_ports or switch_status. Usage context is implied rather than stated.

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