Skip to main content
Glama

USB Hub Port Power

uhubctl_power
Destructive

Power a USB hub port on or off to reset or isolate attached Meshtastic devices, targeting it by location/port or device role; turning off requires confirmation.

Instructions

Power a USB hub port on or off (uhubctl -a on|off, or vhfilter --switch-port on Windows).

Target the port by either (location, port), e.g. location="1-1.3", port=2 as uhubctl_list reports it, OR by role, never both. action="off" requires confirm=True, or the user's answer when the client can ask: the attached device disappears from the OS at once. on never asks.

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "uhubctl_power"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoThe port number on that hub.
roleNoA device role ("nrf52", "esp32s3"). Role lookup honors `MESHTASTIC_UHUBCTL_LOCATION_<ROLE>` + `_PORT_<ROLE>` env vars first, then falls back to VID auto-detection.
actionYes`on` or `off`.
confirmNo`True` once the user agreed; omitted, a client that can ask prompts the human. Only `off` asks.
locationNoThe hub location from `uhubctl_list`: uhubctl notation, or a PnP device path on Windows.

Output Schema

NameRequiredDescriptionDefault

No arguments

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?

Annotations already flag destructiveHint=true and non-idempotent, and the description goes beyond them by naming the real consequence: "the attached device disappears from the OS at once." It also discloses the asymmetric gating between `off` (requires confirm or user answer) and `on` ("never asks"), plus the returned fields, which is exactly the behavioral context an agent needs before a destructive call.

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 core action, then targeting rules, then the safety gate, then the return shape — a sensible ordering for an agent. Dense but every sentence carries information; the inline `vhfilter --switch-port` platform note is slightly incidental detail.

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 destructive 5-parameter tool with an output schema, coverage is strong: action semantics, targeting modes, confirmation flow, and side effects are all present. What is missing is failure behavior (e.g. role not resolvable, port not found) and any contrast with the cycle sibling.

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 description coverage is 100%, so the schema carries the per-field definitions and the baseline would be 3. The description adds a genuine cross-parameter constraint the schema cannot express: (location, port) and role are mutually exclusive targeting modes. It also notes role resolution honors MESHTASTIC_UHUBCTL_LOCATION_<ROLE> env vars before VID auto-detection, though the schema repeats part of that.

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 and resource ("Power a USB hub port on or off") and even names the underlying command and its on/off actions. It references `uhubctl_list` for the location format but never distinguishes this from the `uhubctl_cycle` sibling, so an agent must infer the boundary between a single power change and a power cycle.

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 concrete targeting rules: use either (location, port) or role, "never both", and points at `uhubctl_list` for locating the port. The confirm/asking prerequisite for `action="off"` is spelled out with the exact condition under which the user is prompted. The only gap is that it does not state when to prefer this over `uhubctl_cycle`.

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