Skip to main content
Glama

drag

Simulate a left-button press at (x1,y1), move to (x2,y2), and release on a virtual screen, optionally returning a screenshot.

Instructions

Press the left button at (x1,y1), move to (x2,y2) and release.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "drag"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
screenNoscreen name; optional when the session owns exactly one screen
settle_msNodelay before that screenshot, default 150
duration_msNotime between press and release, default 250
screenshot_afterNoreturn a screenshot after the action (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden, and it does explain the exact input sequence (press, move, release) rather than just naming the gesture. However, it says nothing about coordinate reference frame, failure behavior, or the timing/screenshot side effects controlled by duration_ms, settle_ms, and screenshot_after, leaving meaningful behavioral gaps for a mutating input tool.

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?

A single sentence that front-loads the action and encodes the coordinate roles in order, with no filler or repetition. Nothing in it could be removed without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations and no output schema, the description covers only the core gesture mechanic. It omits the timing knobs, the optional screenshot return, the screen-targeting fallback, and what a caller gets back, so an agent would still need the schema to invoke it confidently.

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 50%, and the four undocumented required parameters are exactly the ones the description disambiguates: x1/y1 as the press point and x2/y2 as the release point. The optional parameters already have schema descriptions, so the description fills the actual semantic gap, though it never states that the values are pixel coordinates.

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?

The description names a specific composite action — press at (x1,y1), move, release at (x2,y2) — which is more precise than a bare 'drag' label and lets an agent distinguish it from a plain press or move. It does not explicitly contrast with the similarly named 'move' or 'click' siblings, so it stops short of full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no mention of prerequisites (such as needing a target screen), and no reference to alternatives like move/click for cases where a button hold is not required. The agent must infer the use case entirely from the gesture description.

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