Skip to main content
Glama

esp_button

Press and hold or release a mouse button on the ESP32 HID device, enabling multi-step drags via repeated move calls until the button is released.

Instructions

Press and hold (down) or release (up) a mouse button, e.g. for a drag made of several esp_move calls. The device releases it after 30 s; held_input_released or user_interrupt on a later call means it was released: start over. Other tools refuse a button held this way (button_held).

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": {
      "button": "<button>",
      "state": "<state>",
      "control_id": "<control_id>"
    },
    "name": "esp_button"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateYesdown = press and keep holding, up = release.
buttonYes
control_idYesFrom esp_control begin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.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 30-second firmware auto-release, the held_input_released and user_interrupt signals that mean the hold was dropped and you must start over, and the button_held refusal other tools return while a button is held. These are exactly the non-obvious failure modes an agent needs.

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?

Three compact sentences, front-loaded with the action, then the drag use case, then the error/recovery contract. Dense with colons and parentheticals but no filler sentences.

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 three-parameter mutation tool with no annotations and no output schema, it covers lifetime, recovery and cross-tool interference well. It stops short of stating that esp_control begin must precede the call or what a successful return looks like, which are minor remaining gaps.

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 67%, and the schema already defines down = press and keep holding, up = release, and control_id as coming from esp_control begin. The description's 'press and hold (down) or release (up)' restates that rather than adding new meaning, so it is adequate but adds little beyond the structured fields.

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?

Names a specific verb pair and resource: press/hold (down) or release (up) a mouse button. It also scopes the tool's role by tying it to a drag composed of several esp_move calls, which separates it from one-shot click tools like esp_click.

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 concrete when-to-use case (multi-step drag built from esp_move calls) and implies you should not use it for simple clicks, but never names esp_click or esp_drag as the alternatives, so the routing decision rests on inference from sibling names.

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