Batch tool
Run several action tools in one call.
Run several action tools in one call.
Served by cua-driver mcp; see MCP tools for every tool.
run_actions#Run several action tools in ONE call, in order, and stop at the first failure. Use it when you already know the next few actions and do not need to look at the app between them (fill three fields, click, then read the result). Each step is {tool, args} where tool is one of click, double_click, right_click, set_value, type_text, press_key, hotkey, scroll, drag and args are exactly that tool's arguments. Every step goes through the same session, permission and approval checks as a direct call; a batch grants nothing extra. All steps are validated before the first one runs, so a malformed step 4 changes nothing. Element tokens and element_index values come from a get_window_state read before the batch; a step that changes the UI can invalidate later element targets, so put element-targeted actions before the actions that reshuffle the window, or use pixel targets after them.
Returns per-step status (ok or the error message) and, when observe is given, ONE bounded get_window_state read after the last executed step. Without observe nothing is read. The batch uses one session: steps may omit session or repeat the batch's. delay_ms pauses between steps (max 2000). At most 32 steps.
Effect: destructive. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
|---|---|---|---|
delay_ms | integer | Pause between steps in milliseconds (not after the last). Default 0. Range: 0 to 2000. | |
observe | object | Optional end-of-batch observation: arguments for ONE get_window_state call. pid and window_id default to those of the last step that names both. Defaults to include_screenshot=false and max_elements=200 to stay cheap; pass include_screenshot=true or a larger max_elements to widen it. Omit to read nothing. | |
session | string | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. | |
steps | object[] | required | Ordered actions. Execution stops at the first failing step. Items: 1 to 32. |
Example arguments
{"steps":[{"tool":"click"}]}