Skip to main content
Glama

Desktop mouse and keyboard

computer_action
Destructive

Control the graphical desktop in the sandbox: move, click and drag the mouse, scroll, type text and press keys – a batch of up to 50 actions run in order, by default followed by a screenshot. Coordinates are screen pixels (0,0 = top left). Use it for apps that have no command line or API, e.g. a desktop program or a web page in a visible browser. Needs a sandbox created from the 'desktop' template; Desktop & Computer Use must be enabled for your account (paid plans, or after topping up at least US$15). Without sandbox_id the last sandbox of this conversation is used – these tools never create one. Refused while a person controls the desktop from the portal; try again later.

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": {
      "actions": "<actions>"
    },
    "name": "computer_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsYesActions in order, e.g. [{"type":"click","x":200,"y":120},{"type":"type","text":"hello"},{"type":"key","keys":"Return"}]. At most 50.
max_widthNoWidth limit of that screenshot in pixels (default 1280).
sandbox_idNoSandbox ID (sb_…). If omitted, the current sandbox of this session is used. A sandbox_id you pass becomes the current sandbox for later calls without sandbox_id.
screenshotNoReturn a screenshot after the actions (default true).

Output Schema

NameRequiredDescriptionDefault
okYesAll actions were done.
errorNoWhich action failed and why (only when ok is false).
resultsYesResult of each action that was run, in order.
sandbox_idYesSandbox ID.
screenshotNoSize of the screenshot returned as an image after the actions.
failed_indexNoIndex of the failed action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive=true, openWorld=true and readOnly=false, so the risk profile is known; the description adds substantial context beyond that: actions run in order up to 50, a screenshot follows by default, it reuses the last sandbox of the conversation and never creates one, and it is refused while a human controls the desktop. The only meaningful omission is what happens to the batch when an individual action fails partway through.

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-loads the purpose, then coordinates, then usage, then prerequisites and sandbox reuse, then the concurrency caveat — a sensible ordering. It is a dense single paragraph with several semicolon-joined clauses, so an agent must read all of it, but almost every clause carries operational weight.

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 high-risk, open-world desktop-control tool with an output schema, this covers the full set of things an agent must know before calling: actions and their ordering, coordinate convention, sandbox selection and non-creation, entitlement gating, screenshot default, and the human-in-control refusal. Nothing essential is left to inference.

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%, including per-action-field descriptions, so the baseline would be 3. The description still earns credit by pinning down the coordinate frame ('screen pixels, 0,0 = top left'), the ordering and 50-action cap on the batch, and the default screenshot behavior with its width limit — details that the schema only partially conveys.

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+resource ('Control the graphical desktop in the sandbox') and enumerates exactly which primitives are covered (move, click, drag, scroll, type, key) plus the batch cap. It also carves out a clear boundary against run_command/run_code by scoping itself to 'apps that have no command line or API,' so an agent can distinguish it without opening any 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?

Gives an explicit when-to-use condition ('apps that have no command line or API, e.g. a desktop program or a web page in a visible browser') and states the implicit alternative path. Adds the preconditions that gate a successful call: sandbox must come from the 'desktop' template, Desktop & Computer Use must be enabled, and the paid/top-up entitlement requirement.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources