read_cells
Read cells from a Jupyter notebook by index or stable ID to retrieve source code, outputs, and execution metadata without running the notebook.
Instructions
Read one or more cells at once, addressed by indices OR ids.
Pass exactly one of indices (0-based) or ids (stable cell.id from
list_cells). Ids don't shift when cells move, so prefer them once listed.
Prefer a single call with several targets over many single reads. Returns,
per cell, its id and source plus (for code cells) execution_count,
outputs_text (rendered stdout/results, with errors and [image/*]
placeholders), has_error, and output_types. All targets are validated first:
if any is invalid (bad index, unknown/duplicate id) the whole call errors.
Never executes code; only reads stored outputs.
Large results are bounded: each cell's source is windowed (~8000 chars) and
the response total is capped (~20000 chars). A windowed cell carries
source_truncated/source_length/source_offset — page it by re-reading that
target with a larger offset. Cells past the total budget come back as
{index, id, type, source_length, content_omitted: true}; read them separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | ||
| path | Yes | ||
| offset | No | ||
| indices | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |