Skip to main content
Glama

switch_resolve_port

Resolve a port number or name to its port details, including PoE and protection status. Type-stable: integers and digit strings are always port numbers.

Instructions

Read-only helper: resolve a port number or PORT_MAP name to {port, name, is_poe, protected, max_port}. Resolution is type-stable: an integer or a string of digits is ALWAYS a port number (never a name), so 3 and "3" mean the same physical port and a numeric name can never shadow one. A non-digit string is a case-insensitive name. UNKNOWN_PORT lists the known names; AMBIGUOUS_NAME if a name maps to more than one port; an out-of-range number is INVALID_PORT. Does not mutate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
name_or_portYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and does so well: it declares read-only, 'Does not mutate,' spells out type-stable resolution rules (integer/digit-string is always a port, never a shadowing name), and enumerates the failure modes UNKNOWN_PORT, AMBIGUOUS_NAME, and INVALID_PORT.

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?

Front-loaded with the purpose and return shape, then rules, then error codes, then the no-mutation guarantee. Every sentence carries information, though the middle passage on type-stability is dense and could be slightly tightened.

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?

No output schema exists, but the description specifies the returned object fields and the error identifiers, covering both success and failure paths. Only auth requirements are unaddressed, which is minor for a read-only resolver.

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% and the single parameter name_or_port has no inline documentation, so the description must compensate — and it does, explaining the anyOf(integer|string) semantics in detail, including case-insensitivity, digit-string equivalence, and that names cannot shadow numeric ports.

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

Purpose4/5

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

States a specific verb (resolve) and resource (port number or PORT_MAP name) plus the exact return shape {port, name, is_poe, protected, max_port}. It is clearly a distinct utility from the get_* siblings, though it does not name any sibling to differentiate itself explicitly.

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?

Implies usage as a read-only resolution helper and usefully notes that UNKNOWN_PORT 'lists the known names,' which hints at a discovery workflow. However, it never states when to prefer this over switch_get_ports or switch_get_port_stats, nor any prerequisites, so the routing guidance is only implied.

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