Skip to main content
Glama

gesture-drag

Mouse-drag in Chromium between normalized points to move sliders, drag-and-drop, select text, or reposition UI elements. Set momentum to false to decelerate and stop exactly at the target.

Instructions

Press the left mouse button at a start point, move to an end point, and release — a desktop mouse drag in a Chromium app. All positions are normalized 0.0–1.0 (fractions of the window, not pixels), same coordinate space as gesture-tap and describe, except that a coordinate of exactly 1.0 lands one pixel inside the window edge (gesture-tap maps it to the edge itself). Interpolates mouse-move events at ~60fps over durationMs for a natural drag (a momentum-free drag samples more finely when durationMs is short, so its ease-out has a curve). Use for slider thumbs, drag-and-drop, text selection, or draggable UI elements. Dragging never scrolls content on desktop — use gesture-scroll for lists/pages. Chromium only — on iOS/Android use gesture-swipe. Pass momentum:false for a momentum-free drag that decelerates into the release, so apps that compute a fling from the pointer stream read ~0 velocity and the drag ends where it was aimed instead of flinging past it (a durationMs under ~100ms is too short for the deceleration to suppress the fling entirely). Returns { dragged: true, timestampMs }. Fails if the Chromium CDP session is not reachable for the given device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toXYesRelease x: normalized 0.0–1.0 (not pixels; same space as tap).
toYYesRelease y: normalized 0.0–1.0 (not pixels; same space as tap).
udidYesTarget Chromium device id from `list-devices` (chromium-cdp-<port>).
fromXYesPress x: normalized 0.0–1.0 (fraction of window width, not pixels).
fromYYesPress y: normalized 0.0–1.0 (fraction of window height, not pixels).
settleNoRetired: renamed to `momentum` with the opposite sense. Pass `momentum: false` for what `settle: true` meant; `settle: false` was the default, so drop the key.
momentumNoWhether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum — use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed.
durationMsNoTotal drag duration in milliseconds (default 300, at most 10000 - the button stays down for exactly this long), interpolated at ~60fps.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv0.24.0
    • changedInput schema / properties / durationMs / description
      Previous value: -"Total drag duration in milliseconds (default 300), interpolated at ~60fps."New value: +"Total drag duration in milliseconds (default 300, at most 10000 - the button stays down for exactly this long), interpolated at ~60fps."
    • addedInput schema / properties / durationMs / maximum
      Added value: +10000
    • addedInput schema / properties / momentum
      Added value: +{
      +  "description": "Whether the drag releases with momentum; default true (a constant-speed drag). Pass false to decelerate into the release point (ease-out) so an app deriving fling from pointer release velocity (carousels, drag libraries) reads ~0 and applies little to no momentum — use it when the drag must stop where it was aimed rather than fling past. Deceleration needs wall clock: under ~100ms the whole drag fits inside the velocity window a page averages over (tens of ms), so some fling survives, and under ~70ms its extra frames cannot dispatch fast enough to fit durationMs. Keep durationMs at its default when the fling must be fully suppressed.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / settle
      Added value: +{
      +  "description": "Retired: renamed to `momentum` with the opposite sense. Pass `momentum: false` for what `settle: true` meant; `settle: false` was the default, so drop the key.",
      +  "not": {}
      +}
  2. First observedv0.15.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the normalized coordinate system, the 1.0 edge-case behavior, the ~60fps interpolation, and the nuanced momentum/deceleration characteristics. It also states the return value and the failure condition when the CDP session is unreachable, leaving little to inference.

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?

The description is dense but every sentence earns its place. It front-loads the core operation, then covers coordinate semantics, use cases, alternatives, momentum behavior, and return/failure conditions in logical order. There is no filler or repetition that does not add value.

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?

For a complex gesture tool with no annotations and no output schema, the description is fully complete. It covers coordinate mapping, edge cases, use cases, alternative tools, momentum semantics, the return value, and a failure mode. An agent has everything needed to select and invoke the tool correctly.

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%, which sets a baseline of 3. The description adds meaningful extra context beyond the schema: the shared coordinate space with gesture-tap and describe, the specific edge case where coordinate 1.0 lands one pixel inside the window, and the interaction between durationMs and momentum:false. While the schema already documents momentum and durationMs in detail, the description's coordinate-space clarifications elevate it above baseline.

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 opens with a precise, actionable definition: 'Press the left mouse button at a start point, move to an end point, and release — a desktop mouse drag in a Chromium app.' It names the exact resource and action, and immediately differentiates from sibling tools like gesture-tap (same coordinate space), gesture-scroll (does not scroll), and gesture-swipe (platform-specific).

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

Usage Guidelines5/5

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

Explicitly states when to use the tool: 'Use for slider thumbs, drag-and-drop, text selection, or draggable UI elements.' It also gives direct alternatives: 'Dragging never scrolls content on desktop — use gesture-scroll for lists/pages' and 'on iOS/Android use gesture-swipe.' The momentum:false guidance adds a clear condition for a specific scenario.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server