Skip to main content
Glama

USB Hub Port Cycle

uhubctl_cycle
Destructive

Power-cycles a USB hub port off then on after a set delay to hard reset a board with a wedged USB serial connection.

Instructions

Power a USB hub port off, wait delay_s seconds, then on.

The hard reset for a board whose USB serial has wedged (calls to it fail with "Power-cycle it (uhubctl_cycle)"). One call instead of off+on, with the timing handled in-process. Target by (location, port) from uhubctl_list, or by role (see uhubctl_power). Requires confirm=True, or the user's answer when the client can ask.

Returns {action, location, port, delay_s, duration_s, ...}.

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

Input Schema

NameRequiredDescriptionDefault
portNoThe port number on that hub.
roleNoA device role, resolved as in `uhubctl_power`; not with `location`/`port`.
confirmNo`True` once the user agreed; omitted, a client that can ask prompts the human.
delay_sNoSeconds the port stays off, 0..60.
locationNoThe hub location from `uhubctl_list`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false; the description adds real context beyond them: a confirmation gate (confirm=True or the client's human prompt), the in-process timing that bounds how long the port stays down, and the delay_s 0..60 limit. It does not spell out the consequence for the attached device (dropped connection, possible data loss), which is the main behavioral gap for a destructive tool.

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 core action in one sentence, then layers the use case, targeting, and confirmation. Everything earns its place, though the quoted error string and the "handled in-process" remark are slightly redundant with each other.

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?

Covers action, use case, targeting options, the confirmation prerequisite, and the timing bound, and an output schema exists so the return shape needs no elaboration. Nothing an agent needs to invoke this correctly for a destructive power cycle is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds relational meaning: location and port come from uhubctl_list, role is resolved as in uhubctl_power and is mutually exclusive with location/port, and confirm is tied to user consent. That exceeds what the schema alone conveys.

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 concrete verb and resource with exact semantics: power a hub port off, wait delay_s, then on. The added framing ("the hard reset for a board whose USB serial has wedged") makes it distinguishable from the sibling uhubctl_power, which does a single power action.

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 a clear triggering condition (a wedged USB serial that fails with "Power-cycle it") and explicitly contrasts one call against the off+on alternative, and points to uhubctl_power for role-based targeting. It stops short of an explicit when-not statement, so it is strong but not exhaustive.

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