Run a known sequence of UI steps
ui_batchRun many UI steps in one call from a steps list or recipe, instead of one call per click. It stops at the first failure and reports the error with a snapshot.
Instructions
Run many UI steps with one call, from a steps list or a recipe file, instead of one tool call per click. Use it when the sequence is already known; use the single ui_* tools to explore. Unbroken runs of UI steps share one process, so pop-ups stay open between steps and the app is hidden once at the end of the run. Stops at the first failure and reports that step's error with a short snapshot. Optional steps that failed are listed in the status's skipped field: check it before trusting a done run. It runs in the background by default and writes statusFile as JSON with state running, done or failed, so long jobs outlast the 60 s bridge limit: wait for that file's state to change rather than polling with this tool. UI ops: clickMenu {path}; click {id|text|role, exact, within, depth, maxNodes, waitSeconds, requireEnabled}; setValue {id|text|role, value}, which never falls back to typing; stepValue {id|text|role, to, delta}; waitFor {id|text|role, gone, enabled, timeoutSeconds}; assert {id|text|role, value}; keys {key, modifiers}; snapshot; sleep {seconds}; hide; retry {steps, onFail, times}. Other ops: open {file}, which launches hidden; waitFile {path, stableSeconds, timeoutSeconds}; moveFile {from, to}, which never overwrites; requireUnlocked; requireClosed {waitSeconds}; requireAbsent {path}, which stops if a file is already there (put it before a waitFile or moveFile whose file an earlier run may have left). Any step can have a label, and optional: true to carry on if it fails. Write ${name} in strings and pass values in vars. In a large window, give text searches a within, or they can run past the bridge limit. It can't bring an app to the front.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ui_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | App to control. Optional when the recipe names it. | |
| vars | No | Values for ${name} in the steps | |
| steps | No | The steps to run, instead of a recipe | |
| dryRun | No | Check the steps and fill in vars without touching the app | |
| recipe | No | Path to a recipe: JSON with name, app, vars (defaults) and steps | |
| background | No | Return at once and keep running. False waits for the result, so use it only for jobs under 60 s. | |
| statusFile | No | Where to write the status JSON. Default: a new file in the temp folder. |