Skip to main content
Glama

esp_drag

Drags the mouse between two verified screen positions with a chosen button, duration, modifiers, and tolerance; releases the button if the end point is missed.

Instructions

Drag with a mouse button: moves to the start and verifies it (no press on a miss), presses, moves to the end over duration_ms, verifies the end with the button still down, then releases. A miss at the end still releases and fails with position_mismatch. Physical screen pixels.

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": {
      "from_x": "<from_x>",
      "from_y": "<from_y>",
      "to_x": "<to_x>",
      "to_y": "<to_y>",
      "control_id": "<control_id>"
    },
    "name": "esp_drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
to_xYesEnd X.
to_yYesEnd Y.
buttonNoDefault left.
coordsNo"screen" (default): physical screen pixels. "screenshot": pixels of the image from esp_screenshot named by screenshot_id.
from_xYesStart X (physical screen px). The button is pressed only when the cursor lands there.
from_yYesStart Y.
modifiersNoKeys held during the drag, e.g. ["shift"]; released in the same call.
control_idYesFrom esp_control begin.
request_idNoOptional idempotency key: repeating a call with the same request_id within 5 min returns the first receipt (also an uncertain one) without running the action again.
duration_msNoTime of the movement between the ends, 0..10000 ms (default 300).
tolerance_pxNoAllowed distance from both ends in px per axis (default 1).
screenshot_idNoWith coords "screenshot": the screenshot_id the coordinates refer to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/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 verification at both endpoints, that a start miss means no button press, that an end miss still releases the button, and that the failure surfaces as position_mismatch. It omits what a successful receipt contains and whether an esp_control session must already be active, which keeps it at 4 rather than 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the operation and then the failure semantics; every clause carries information an agent needs. The final fragment is the only near-redundancy and it is one sentence-fragment long.

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 12-parameter, no-annotation, no-output-schema tool, the description covers the mechanics and the two failure modes that matter most. With no output schema it could say more about the return receipt (especially given request_id idempotency in the schema), and it never states the prerequisite that control_id comes from an esp_control session.

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 meaning beyond the schema by explaining that from_x/from_y must be landed on before pressing and that both ends are verified within a tolerance, which gives operational significance to tolerance_px and duration_ms. The trailing "Physical screen pixels" mostly restates the coords field.

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?

The description names a specific verb and resource ("Drag with a mouse button") and lays out the exact sequence: move to start, verify, press, move to end, verify, release. That press-move-release sequence distinguishes it from the sibling click/move tools without needing to name them.

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?

Usage context is implied by the behavioral narrative (press-hold-drag-release with verification), but there is no explicit when-to-use or when-not-to-use guidance relative to esp_click or esp_move. The failure-mode notes ("no press on a miss") help an agent infer preconditions but not selection criteria.

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