# NotebookEdit Tool

> The tool that changes one cell in a notebook.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** NotebookEdit, Jupyter notebook edit, cell_id

## Think of it like

It is like fixing one box on a page. The rest stays the same.

## Definition

The NotebookEdit tool changes a Jupyter notebook one cell at a time. It finds a cell by its id. It can replace a cell, add a new cell after it, or delete it. When it replaces a code cell, the saved output of that cell is cleared, so you run the cell again to see it. Its permission rules use the same path form as Edit.

## Example

Emma asks Claude to fix a chart in her notebook. It replaces that one cell, and she runs it again to see the new chart.

## Example code

```json
{"permissions": {"allow": ["Edit(notebooks/**)"]}}
```

An Edit rule covers notebook edits too.

## Why it matters

Notebooks are not plain text files, so they need a tool that knows about cells.

## Common mistake

Expecting the old output to stay. A replaced code cell loses its saved output until you run it again.

## Three principles

- **One cell.** By its id.
- **Three moves.** Replace, insert, delete.
- **Output cleared.** Run it again.

## Related terms

- [Edit Tool](https://learn.benibix.com/term/ai/edit-tool)
- [Read Tool](https://learn.benibix.com/term/ai/read-tool)
- [Write Tool](https://learn.benibix.com/term/ai/write-tool)

## Taught in

- [Claude Code File Tools](https://learn.benibix.com/learn/ai-claude-code/claude-code-file-tools): Claude Code, 9/16

![Glob finds files by name, Grep finds lines inside them, Read opens one, then Edit changes a part or Write replaces it all.](https://learn.benibix.com/diagrams/ct-file-tools.svg)

---

Source: https://learn.benibix.com/term/ai/notebook-edit-tool
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
