Skip to main content
Glama

switch_set_port

Enable or disable a single switch port to control link state; requires write confirmation, verifies the change, and refuses protected ports.

Instructions

MUTATES one port's admin state (enable/disable the link). Reads the live page, re-sends the port's current speed and flow control, changes only the state, then verifies. Refuses a protected port (PROTECTED_PORT). Requires both write gates; otherwise no network call. Honours EASYSMART_DRY_RUN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes
enabledYes
confirm_writeNoMust be the JSON boolean true to authorise this mutating write. A string such as "true"/"1"/"yes" does NOT count and the write is refused with no network call; re-send with the boolean confirm_write=true after confirming the change with the operator.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the read-modify-write sequence, that speed and flow control are re-sent unchanged, that only state changes, that the result is verified afterwards, the PROTECTED_PORT refusal, the two-write-gate precondition, and EASYSMART_DRY_RUN support. These are exactly the traits an agent needs to predict side effects and failure modes.

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-loads the mutation and its scope, then sequences behaviour, refusals and gates in short clauses with no filler. Slightly telegraphic phrasing such as 'write gates' is undefined, but nothing is wasted.

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 mutation tool with no annotations and no output schema, it covers side effects, safety gates, refusal codes and dry-run behaviour. The main omission is not identifying what the second write gate is and not describing port-argument formats, but an agent could call this correctly from the description alone.

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

Parameters3/5

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

Schema coverage is only 33%: port and enabled carry no descriptions, and the description does not explain accepted port formats (integer vs string) or what enabled=false means operationally beyond 'disable the link'. The mention of 'both write gates' and dry-run partially compensates by signalling the confirm_write gate, but the gap is only partly closed.

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 specific verb (MUTATES) plus the exact resource and scope: one port's admin state, i.e. enable/disable the link. This cleanly separates it from switch_set_poe, switch_poe_cycle and the read-only switch_get_* siblings without needing their schemas.

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?

Gives clear conditions for use (toggling a port's admin state) and for refusal (protected port returns PROTECTED_PORT; missing write gates means no network call), plus dry-run behaviour. It stops short of explicitly naming alternative sibling tools, so it is clear context without exclusions.

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