Skip to main content
Glama

computer

Destructive

Use raw keyboard and mouse actions to click, type, scroll, drag, press keys, and capture screenshots when named accessibility targets are unavailable.

Instructions

Raw keyboard and mouse: type, keys, scroll, drag. To click a button, field or menu use accessibility invoke or smart_click, not this tool; click x,y and screenshot are the last resort, for a target with no name and no visible text. Pick an action: click, double_click, right_click, middle_click, triple_click, hover, move, mouse_move, move_relative, scroll, scroll_horizontal, drag, drag_path, mouse_down, mouse_up, type, key, key_press, key_down, key_up, wait, screenshot, screenshot_region, zoom. Coordinates default to image-space pixels of the latest screenshot; pass space:"screen" for a position reported by accessibility or ocr.

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": "computer"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoX position. From a screenshot: as read off the image. From accessibility or ocr: pass space:"screen".
yNoY position. From a screenshot: as read off the image. From accessibility or ocr: pass space:"screen".
dxNoX offset in image-space pixels
dyNoY offset in image-space pixels
keyNoAlias for combo: the key or chord to press.
endXNoEnd X in image-space
endYNoEnd Y in image-space
pathNoArray of {"x":n,"y":n} points (same space as x,y). click: clicks each point in turn (pen points: one call), interval_ms apart. drag_path: drags through them, min 2.
shotNoOptional, image-space pointer actions: the id of the screenshot the coordinates were read off (each screenshot reply names it, e.g. "s3"). Refused when it is not the latest screenshot.
textNoThe text to type
comboNoKey/combo to press (e.g. "Return", "mod+s"). Space-separate for a sequence.
countNo1=single (default), 2=double, 3=triple
spaceNoCoordinate space. Omit (default) → image-space coords from the latest screenshot (the tool scales them to the screen). Pass "screen" → the positions an accessibility tree / find reports (@x,y), passed as reported, unscaled: physical pixels on Windows and Linux, POINTS on macOS (a Retina screenshot's "real" size is twice the point size).
widthNoWidth in image-space pixels
actionYesWhich sub-action to perform. See this tool's description for the enum of valid values. Required: double_click/right_click/middle_click/triple_click/hover/move/mouse_move: x, y; move_relative: dx, dy; scroll: direction; scroll_horizontal: x, y, direction; drag_path: path; type: text; key_down/key_up: combo; wait: seconds; screenshot_region/zoom: x, y, width, height.
amountNoWheel ticks (default 3)
buttonNoMouse button: "left" (default), "right" or "middle".
expectNoChecks run after the action; a failed check returns DEVIATION. Example: [{"type":"window_title_contains","value":"Inbox"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed.
heightNoHeight in image-space pixels
repeatNoPress it this many times (default 1).
startXNoStart X in image-space
startYNoStart Y in image-space
displayNoMonitor to capture (index from window list_displays). Default: the monitor clawdcursor last worked on, else the primary.
secondsNoDuration to wait (0.1 to 30)
max_edgeNoLongest edge of the returned image in px (64–1280, default 1280). Smaller costs fewer image tokens; small text may become unreadable.
directionNoScroll direction
interval_msNoWith path: milliseconds between clicks (default 100, max 5000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.0
    • changedInput schema / properties / count / description
      Previous value: -"1=single, 2=double"New value: +"1=single (default), 2=double, 3=triple"
  2. Changed11 schema fields changedv2.0.0
    • changedInput schema / properties / action / description
      Previous value: -"Which sub-action to perform. See this tool's description for the enum of valid values. Required: screenshot_region/zoom: x, y, width, height; click/double_click/right_click/middle_click/triple_click/hover/move: x, y; move_relative: dx, dy; scroll: direction; scroll_horizontal: x, y, direction; drag_path: path; type: text; key_down/key_up: combo; wait: seconds."New value: +"Which sub-action to perform. See this tool's description for the enum of valid values. Required: double_click/right_click/middle_click/triple_click/hover/move/mouse_move: x, y; move_relative: dx, dy; scroll: direction; scroll_horizontal: x, y, direction; drag_path: path; type: text; key_down/key_up: combo; wait: seconds; screenshot_region/zoom: x, y, width, height."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "screenshot",
      -  "screenshot_region",
      -  "zoom",
      -  "click",
      -  "double_click",
      -  "right_click",
      -  "middle_click",
      -  "triple_click",
      -  "hover",
      -  "move",
      -  "move_relative",
      -  "scroll",
      -  "scroll_horizontal",
      -  "drag",
      -  "drag_path",
      -  "mouse_down",
      -  "mouse_up",
      -  "type",
      -  "key",
      -  "key_press",
      -  "key_down",
      -  "key_up",
      -  "wait"
      -]New value: +[
      +  "click",
      +  "double_click",
      +  "right_click",
      +  "middle_click",
      +  "triple_click",
      +  "hover",
      +  "move",
      +  "mouse_move",
      +  "move_relative",
      +  "scroll",
      +  "scroll_horizontal",
      +  "drag",
      +  "drag_path",
      +  "mouse_down",
      +  "mouse_up",
      +  "type",
      +  "key",
      +  "key_press",
      +  "key_down",
      +  "key_up",
      +  "wait",
      +  "screenshot",
      +  "screenshot_region",
      +  "zoom"
      +]
    • changedInput schema / properties / button / description
      Previous value: -"Mouse button to click: \"left\" (default) or \"right\""New value: +"Mouse button: \"left\" (default), \"right\" or \"middle\"."
    • changedInput schema / properties / expect / description
      Previous value: -"Optional post-conditions to verify after this action (same assertion types as the verify tool: window_title_contains, app_running, element_exists, element_value_contains, clipboard_contains, file_exists, file_contains, ocr_contains, file_changed_since_start). If any FAIL the action returns a DEVIATION and you must adapt. State an OUTCOME you can observe (a window title, a rendered element/chip, a status) — NOT the raw text you typed."New value: +"Checks run after the action; a failed check returns DEVIATION. Example: [{\"type\":\"window_title_contains\",\"value\":\"Inbox\"}]. Fields: value for *_contains; name for app_running and element_exists; name+value for element_value_contains; path for file_*. State an outcome you can observe, not the text you typed."
    • addedInput schema / properties / interval_ms
      Added value: +{
      +  "description": "With path: milliseconds between clicks (default 100, max 5000).",
      +  "type": "number"
      +}
    • changedInput schema / properties / key / description
      Previous value: -"Alias for \"combo\". Alias for combo — accepted for MCP/compound backward-compatibility."New value: +"Alias for combo: the key or chord to press."
    • addedInput schema / properties / max_edge
      Added value: +{
      +  "description": "Longest edge of the returned image in px (64–1280, default 1280). Smaller costs fewer image tokens; small text may become unreadable.",
      +  "type": "number"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"Stepped drag path: array of {x,y} points (min 2). When given, startX/startY/endX/endY are ignored. Press at first point, release at last."New value: +"Array of {\"x\":n,\"y\":n} points (same space as x,y). click: clicks each point in turn (pen points: one call), interval_ms apart. drag_path: drags through them, min 2."
    • addedInput schema / properties / repeat
      Added value: +{
      +  "description": "Press it this many times (default 1).",
      +  "type": "number"
      +}
    • changedInput schema / properties / x / description
      Previous value: -"Left edge X in image-space coordinates"New value: +"X position. From a screenshot: as read off the image. From accessibility or ocr: pass space:\"screen\"."
    • changedInput schema / properties / y / description
      Previous value: -"Top edge Y in image-space coordinates"New value: +"Y position. From a screenshot: as read off the image. From accessibility or ocr: pass space:\"screen\"."
  3. Changed1 schema field changedv1.5.24
    • changedInput schema / properties / action / description
      Previous value: -"Which sub-action to perform. See this tool's description for the enum of valid values."New value: +"Which sub-action to perform. See this tool's description for the enum of valid values. Required: screenshot_region/zoom: x, y, width, height; click/double_click/right_click/middle_click/triple_click/hover/move: x, y; move_relative: dx, dy; scroll: direction; scroll_horizontal: x, y, direction; drag_path: path; type: text; key_down/key_up: combo; wait: seconds."
  4. Changed1 schema field changedv1.5.23
    • addedInput schema / properties / shot
      Added value: +{
      +  "description": "Optional, image-space pointer actions: the id of the screenshot the coordinates were read off (each screenshot reply names it, e.g. \"s3\"). Refused when it is not the latest screenshot.",
      +  "type": "string"
      +}
  5. Changed1 schema field changedv1.5.21
    • changedInput schema / properties / space / description
      Previous value: -"Coordinate space. Omit (default) → image-space coords from the latest screenshot (scaled to physical pixels). Pass \"screen\" → a11y-snapshot coords (already physical, not scaled)."New value: +"Coordinate space. Omit (default) → image-space coords from the latest screenshot (the tool scales them to the screen). Pass \"screen\" → the positions an accessibility tree / find reports (@x,y), passed as reported, unscaled: physical pixels on Windows and Linux, POINTS on macOS (a Retina screenshot's \"real\" size is twice the point size)."
  6. First observedv1.5.16

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and non-idempotency, so the safety bar is partly covered. The description adds real operational context beyond that: coordinates default to scaled image-space, the shot id is refused when it is not the latest screenshot, and smaller max_edge reduces image token cost at the risk of unreadable text. It does not spell out the consequences of a mistyped keystroke into the wrong window, so it is strong but not exhaustive.

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 purpose and the routing rule before the mechanics, so the most decision-relevant content comes first. The enumeration of all 24 action names largely duplicates the action enum in the schema and costs tokens, but it functions as a quick reference and is not padded elsewhere.

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 27-parameter, multi-mode interaction tool with no output schema, the description covers the ambiguous parts an agent would otherwise get wrong: coordinate space, screenshot ids, and target selection. It leans on the schema for per-action parameter requirements and does not describe what a screenshot reply looks like beyond naming its id, which is a minor remaining gap.

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 baseline would be 3, but the description adds meaning the schema alone does not make salient: the distinction between image-space and screen-space coordinates, including that macOS screen coordinates are points, not physical pixels. That is exactly the kind of cross-parameter clarification that prevents silent mis-clicks.

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?

Opens with a specific verb-and-resource framing ('Raw keyboard and mouse: type, keys, scroll, drag') and immediately distinguishes itself from sibling tools by naming accessibility invoke and smart_click as the preferred path for named targets. An agent can tell this apart from accessibility or browser without opening a schema.

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?

Explicit when-to-use routing: use accessibility invoke or smart_click for a button, field, or menu; reserve this tool for targets with no name and no visible text, where click x,y and screenshot are a last resort. That is a genuine decision rule with alternatives named, not an implied one.

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

Deploy Server

Other Tools