Skip to main content
Glama

hid.batch

Execute a pre-planned sequence of up to 10 HID actions in one call, with support for click, move, type, key combos, scroll, and button down/up. Actions run sequentially with optional delays, reducing round-trips for known action lists.

Instructions

[Physical HID input — pick this when other automation paths (file APIs, browser automation, OS APIs) cannot accomplish the task, or when the user explicitly requests physical keyboard or mouse input.] Run a SHORT, PRE-PLANNED sequence of HID actions (max 10) in ONE call, in strict order. This is a transport convenience for an action list you ALREADY know — e.g. clicking several fixed coordinates a solver has computed — collapsing N tool round-trips into one. It is NOT an orchestration / control-flow layer: no branching, no reading a result mid-sequence, no looping. For 'act → observe → decide → act' you still issue separate calls (an action that depends on an earlier action's outcome cannot be pre-planned into a batch).

Each op is {type, ...params, delay_ms?}. Types: • click / move — (x, y, relative, button, double, move_ms); identical absolute closed-loop converge and ACK semantics to hid.click / hid.move. • button_down / button_up — (button). • key — (key, modifiers); same 'ctrl+c' shorthand as hid.key. • type — (text). • scroll — (delta). delay_ms pauses AFTER that op (0–2000 ms). Omit it and click/button ops get a small default gap (~50 ms) so the OS doesn't merge or drop back-to-back clicks; non-click ops default to 0. Set delay_ms explicitly (including 0) to override.

Execution: ops run strictly sequentially. With stop_on_error=true (default) the run halts at the first op that fails; if any button/key was pressed before the stop, release_all fires so nothing stays held. Returns {ok (= every op ok), count, failed_index, stopped_early, released_all, results:[per-op dicts carrying the same fields the standalone tool returns — e.g. converged / clicked / chars]}. Held state is NOT auto-released on clean completion, so a batch may intentionally leave a button/key down for a follow-up call.

Capped at 10 ops: this drives real input and a batch cannot be interrupted mid-run (stdio is serial), so a large blind burst is refused at the boundary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opsYesUp to 10 HID actions, executed in array order.
stop_on_errorNoHalt at the first failing op (default). false = run every op, recording failures.
Behavior5/5

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

Despite no annotations, the description fully discloses execution behavior: sequential ops, stop_on_error default with release_all on failure, delay defaults, cap at 10 ops, and no auto-release on clean completion. No contradictions.

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?

Well-structured with sections for usage, ops, delay, execution, return. Every sentence adds value, but could be slightly more concise. No fluff, but length might overwhelm some agents.

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?

Comprehensive: covers all op types, delays, error handling, return structure, and constraints. No output schema needed as return format is clearly described.

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%, but the description adds meaningful context for each op type (e.g., click/move semantics identical to standalone tools, delay_ms defaults). Provides rationale for defaults, enhancing understanding beyond schema.

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 clearly states it runs a short, pre-planned HID sequence, distinguishing from individual HID tools by collapsing multiple calls into one. It specifies the scope (max 10 ops, strict order) and contrasts with orchestration workflows.

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 advises when to use: when other automation paths fail or user requests physical input. Also clarifies what it's NOT for (branching, reading results mid-sequence, looping), guiding the agent away from misuse.

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

Install Server

Other Tools

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/tinqiao-oss/clawtouch-mcp'

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