script
Execute a chain of browser automation steps in a single request, with per-step authorization and audit. Reference earlier results to build complex sequences without separate calls.
Instructions
Run a sequence of tool calls in one request. Steps execute in order; each step is validated, authorized, and audited exactly as if called individually. Step arguments may reference a prior step's structured result: $prev.field for the previous step, $N.field for step N (1-indexed), with .0-style numeric segments indexing arrays (example: $prev.results.0.ref after find). Write $$ for a literal leading $. Only tools with structured results (find, tabs_context, tabs_create, navigate, wait_for) can be referenced. Steps may not include script itself. Use wait_for between navigate and reads on dynamic pages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | Ordered tool calls to execute sequentially. | |
| tabId | No | Tab ID the steps run against. Steps inherit this tabId when their own args omit it. Use tabs_context first if you don't have a valid tab ID. | |
| dry_run | No | When true, run every step through the real governance decision (registry, schema, sacred, authorize) but do not dispatch. Each step reports would_allow or would_deny with the reason a live run would produce; no mutations, no step audit records. | |
| onError | No | "stop" (default) halts the chain on the first non-ok step; "continue" runs remaining steps. A held step always stops the chain regardless. | |
| budget_ms | No | Total wall-clock budget for the whole script in milliseconds. Lowers (never raises) the configured ceiling; remaining steps report not_run on exhaustion. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | ||
| summary | Yes | ||
| provenance | No | ||
| duration_ms | Yes |