batch_run_paragraph
Run multiple notebook paragraphs in one call, in the order you specify, so dependent setup cells execute before later cells and parameters can be swept per paragraph.
Instructions
Run several paragraphs one after another in the given order, in a single call. Use this instead of many run_paragraph calls when you need a specific sequence of cells run — e.g. setup cells before the cells that depend on them. Paragraphs run sequentially (not in parallel) because cells typically share interpreter state, and this collapses N round-trips into one.
Each run item may carry its own dynamic form params. The top-level params dict is a shared
default merged under per-item params (the item wins on key conflicts). The same paragraph_id
may appear multiple times with different params — a parameter sweep in one call.
By default table output is limited to 50 rows and HTML output is omitted to save tokens.
Args:
notebook_id: The notebook ID containing the paragraphs
runs: Paragraphs to run in execution order, each {paragraph_id, params?}. Example:
[{"paragraph_id": "p1"}, {"paragraph_id": "p2", "params": {"city": "Seoul"}}]
params: Optional shared dynamic form values applied to every item, e.g. {"env": "prod"}.
Per-item params override these per key.
max_rows: Maximum data rows per table output (default 50, 0 = unlimited). Header row always included.
include_html: If True, include HTML output converted to plain text. Default False.
stop_on_error: If True (default), stop at the first paragraph that errors and report the
remaining ones as skipped. If False, run every paragraph regardless of failures.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runs | Yes | ||
| params | No | ||
| max_rows | No | ||
| notebook_id | Yes | ||
| include_html | No | ||
| stop_on_error | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |