ghost_run
Run a declarative step-by-step desktop automation flow in a single round-trip. Each step is an operation; results can chain into later steps, with automatic retries and element-based waits.
Instructions
Execute a declarative step-by-step flow in one round-trip. Each step: {op, ...params}. Op is any lean verb or legacy tool name. Retries each step on failure (max_retries). CHAINING: a param value of "${steps.N.path}" is replaced with a field from step N's result before dispatch - e.g. {op:'find',name:'Save'} then {op:'ghost_click_at', x:'${steps.0.center.x}', y:'${steps.0.center.y}'}. A whole-string ref keeps its type (number stays number). SPEED: name the window once; later steps can omit window= because the anchor follows that window by handle through title changes (a stale title still resolves and the response carries title_drift). Wait with {op:'ghost_wait', for:'element'|'value'|'navigate'} rather than for=ms - a fixed sleep costs its full length on every run.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Array of {op, ...params} steps (direct) | |
| script | No | YAML or JSON string of steps array (YAML tried first) | |
| json_flow | No | JSON-encoded steps array string | |
| max_retries | No | ||
| stop_on_error | No |