notebook-edit
The notebook-edit server provides structural editing of Jupyter notebooks (.ipynb) without executing any code — execution is left to the client/kernel.
list_cells: Get an overview of all cells (index, type, source preview, line count, whether outputs exist).
read_cell: Retrieve the full source of a specific cell by index, along with any existing outputs and execution count (outputs are read-only).
insert_cell: Insert a new cell (
code,markdown, orraw) before a specified index; appends if index equals cell count.edit_cell: Fully replace a cell's entire source by index; clears stale outputs and execution count for code cells.
patch_cell: (Preferred for small changes) Replace a unique substring (
old) with a new string (new) in a cell — errors if the substring matches zero or more than once, keeping diffs minimal.delete_cell: Remove the cell at a specified 0-based index.
move_cell: Reposition a cell from one index to another within the notebook.
The server validates notebook structure on write, performs atomic writes with a single-generation backup (.ipynb.bak), and supports optional expected_rev for concurrency control to prevent overwriting external changes.
Provides tools for editing Jupyter notebooks, including listing cells, reading cell contents with outputs, inserting cells, editing cell source, patching cells with partial replacement, deleting cells, and moving cells.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@notebook-editread cell 2 in my_notebook.ipynb"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
notebook-edit
Jupyter notebook (.ipynb) の構造編集に特化した MCP サーバー兼 CLI。
カーネル実行は行わない(実行は呼び出し側のクライアント/カーネルに任せる)。
コアロジック (core.py) を CLI (cli.py) と MCP サーバー (mcp_server.py) が
薄くラップする構成。ロジックは一箇所だけ。
notebook_edit/
├── core.py # nbformat 操作の実体
├── cli.py # argparse ラッパー
└── mcp_server.py # FastMCP (stdio) ラッパー安全性
書き込み前に
nbformat.validate()を通す(不正なら書かない)一時ファイル →
os.replaceによる atomic write書き込み前に
.ipynb.bakを1世代だけ残すoutputs(実行結果)は読み取り専用。コードセルの source を変更すると、 古い outputs と execution_count はクリアされる(stale な実行結果の混入を防止)
Related MCP server: jupyter-editor-mcp
セットアップ
uv syncCLI
uv run nb-edit --version # バージョン表示
uv run nb-edit notebook-rev foo.ipynb # 現在の rev(並行編集ガード用)
uv run nb-edit patch-cell foo.ipynb "x=1" "x=2" --index 0 --expected-rev <rev> # rev 一致時のみ書く
uv run nb-edit create-notebook foo.ipynb # 空 notebook を新規作成
uv run nb-edit create-notebook foo.ipynb --json '[{"cell_type":"markdown","source":"# Title"}]' # 初期セル付き
uv run nb-edit list-cells foo.ipynb
uv run nb-edit read-cells foo.ipynb 0 2 5 # 複数 index を一括
uv run nb-edit read-cells foo.ipynb --id a1b2c3d4 # id で読む
uv run nb-edit insert-cell foo.ipynb 1 code "print('hi')" --summary "挨拶" # 1セル挿入
uv run nb-edit insert-cells foo.ipynb 1 --json '[{"cell_type":"code","source":"import os"}]' # 一括
uv run nb-edit edit-cell foo.ipynb "x = 42" --index 2 # 全文置換
uv run nb-edit patch-cell foo.ipynb "x = 42" "x = 99" --id a1b2c3d4 # 部分置換(推奨)
uv run nb-edit delete-cell foo.ipynb --index 2
uv run nb-edit move-cell foo.ipynb 3 --from-id a1b2c3d4 # id のセルを 3 番目へインデックスは 0 始まり。負値は不可。
既存セルを指す
edit/patch/delete/move/readは--indexまたは--id(id はlist-cellsが返す安定 ID。insert/delete/move してもズレない)。挿入位置は index のまま。結果は JSON で stdout に出力。エラーは stderr + 終了コード 1。
MCP サーバー
MCP 対応クライアントの stdio サーバー設定に nb-edit-mcp を登録する。設定ファイルの
場所・形式はクライアントによって異なるが、command / args は概ね共通。
ローカルの作業コピーを使う場合:
{
"servers": {
"notebook-edit": {
"command": "uvx",
"args": ["--from", "/path/to/nbedit-mcp", "nb-edit-mcp"]
}
}
}Git から取得する場合は --from を Git URL に差し替える(バージョン固定推奨、@<tag>):
"args": ["--from", "git+https://github.com/tmlksu/nbedit-mcp@v0.8.0", "nb-edit-mcp"]タグを省くと最新の HEAD を取得する。相対パスはサーバーの CWD(通常はクライアントが開いている
プロジェクト)基準で解決される。
注意: パッケージを指すのは
--from(--withではない)。commandはuvx、argsの最後は 実行するコマンド名nb-edit-mcp。
トラブルシューティング: Failed to resolve --with requirement / Git operation failed
これは uv が --from の Git URL を fetch できていないサイン(メッセージ上は --with と出るが実体は
--from の git 解決失敗)。次を確認する:
URL の
owner/repoが正しいか(tmlksu/nbedit-mcp)。README のプレースホルダ<owner>を 置換し忘れると%3Cowner%3Eになって失敗する。指定した
@<tag>が存在するか(例:@v0.8.0)。存在しない ref も同じ失敗になる。private repo・ネットワーク/プロキシで git fetch がブロックされていないか。
手元で切り分けるには --from 単体で実行してみる(成功すれば nb-edit 0.8.0 が出る):
uvx --from git+https://github.com/tmlksu/nbedit-mcp@v0.8.0 nb-edit --version公開ツール
ツール | 引数 | 説明 |
|
| 新規 |
|
| 現在の rev(内容ハッシュ)を返す。並行編集ガード用 |
|
| 全セルの目次( |
|
| 複数セルを一括読み取り( |
|
| index の前に1セル挿入 |
|
| 複数セルを index の前に一括挿入(atomic) |
| `path, source, [index | cell_id], [summary]` |
| `path, old, new, [index | cell_id]` |
| `path, [index | cell_id]` |
| `path, to_index, [from_index | from_id]` |
cell_type は code / markdown / raw。
patch_cell の old はセル内でちょうど1回一致する必要がある
(0回・複数回はエラー → 文脈を足して一意にする)。
並行編集ガード(optional): 変更系(
insert*/edit/patch/delete/move)にexpected_revを 渡すと、read した時点からファイルが外部で変わっていたら書き込みを拒否する(NotebookError)。 rev はnotebook_revで取得(または直前の書き込みの戻り値revを流用)。省略時は無検査(後方互換)。 変更系は書き込み後の新しいrevを返すので、re-read せず連続編集を chain できる。VS Code など外部エディタと 同じファイルを触るときのサイレント上書き事故を防ぐ(ADR-0017)。※本ツール側の上書きを止めるだけで、 外部エディタ側の reload は別責務。セル指定: 既存セルを指すツール(
read/edit/patch/delete/moveの対象)はindex(0始まり)またはid(安定 ID)のどちらか一方。idはlist_cells/read_cellsが返し、 insert/delete/move してもズレないので、一覧後はid指定が安全(stale index 事故を防ぐ)。 見つからない/重複 id は即エラー(index の「静かに別セルを書き換える」を回避)。ADR-0014。 挿入位置(insert*のindex、moveのto_index)は位置概念なので index のまま。 各変更系の戻り値もid(複数はids)を返す。
バージョンの取得
サーバー/CLI のバージョンは notebook_edit/__init__.py の __version__ が唯一の源
(pyproject は hatchling の dynamic version で追従)。クライアント(VS Code 拡張など)からは:
MCP: initialize ハンドシェイクの
serverInfo.version(serverInfo.nameはnotebook-edit)。CLI:
nb-edit --version。配布メタデータ:
importlib.metadata.version("notebook-edit")。
いずれも同じ値を返す(ADR-0016)。
要約規約と出力の扱い
要約:
list_cellsのsummaryは metadata > 先頭#コメント > 先頭行 の優先順位 (最大 3 行 / 各 100 字)。insert_cell/edit_cellのsummary引数で明示指定するとcell.metadata['summary']に保存され、以降の一覧が確実に目次として機能する。出力:
read_cellsは既存の実行結果を整形して返す(outputs_text:stdout/結果を連結、 エラーは強調、画像は[image/png]プレースホルダ、2000 字で truncate)。 セル実行はしない——実行はクライアント/カーネル側に任せ、本ツールは保存済み outputs を読むだけ。サイズ上限:
read_cellsは結果を cap する。各セルのsourceは 8000 字窓 (source_truncated/source_length付き、offsetでページング)、レスポンス総量は 20000 字。 超過分のセルはcontent_omitted: trueで返るので、小さいバッチやoffsetで読み直す。
テスト
uv run pytest -qAvailable Tools
10 toolscreate_notebookA
Create a NEW empty .ipynb notebook at path (optionally with initial cells).
Use this instead of hand-writing notebook JSON. cells (optional) is a list
of {cell_type, source, summary?} — the same shape as insert_cells — seeded in
order; omit it for an empty notebook. Refuses to overwrite an existing file
and requires the parent directory to exist (both error). The notebook is
nbformat 4.5, so every created cell gets a stable id right away. Returns
{"path", "num_cells", "ids"}. cell_type must be one of: code, markdown, raw.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| cells | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes behavioral traits beyond annotations: refuses overwrite, requires parent dir, nbformat 4.5, stable cell IDs, return fields, cell_type constraint. No annotations exist, so full burden is carried.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise yet comprehensive. Uses parentheses and quotes for clarity. Front-loaded with main action, every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete for a 2-parameter tool with no output schema. Covers constraints, return value, related tools, and format details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description fully compensates by explaining path (required) and cells (optional shape, cell_type constraint) beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool creates a new .ipynb notebook at a given path, optionally with initial cells. It distinguishes from sibling tools by saying 'Use this instead of hand-writing notebook JSON.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit guidance on when to use (creating new notebooks) and when not to (refuses to overwrite, parent dir required). Mentions alternatives like insert_cells for seeding cells.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_cellA
Delete a cell, addressed by index (0-based) OR cell_id (exactly one).
Prefer cell_id from list_cells — an id can't drift onto the wrong cell the
way a stale index can. Optionally pass expected_rev to guard against
concurrent external edits. Returns the new rev.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| index | No | ||
| cell_id | No | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It reveals that deletion returns a new rev and mentions concurrency guard, but it omits important behavioral traits such as irreversibility, permission requirements, or error behavior if both index and cell_id are provided or if the cell doesn't exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (three sentences) and well-structured, front-loading the action and key options without extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema or annotations, the description is somewhat incomplete. It lacks details on the irreversible nature of deletion, potential failure modes, and the meaning of the returned rev. The missing path parameter explanation further reduces completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must explain parameters. It effectively describes index, cell_id, and expected_rev, but neglects the required 'path' parameter entirely, which is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool deletes a cell and provides addressing options (index or cell_id). The verb and resource are specific, but it does not explicitly differentiate from sibling tools like edit_cell or move_cell, though the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises preferring cell_id over index due to drift risk, and suggests using expected_rev for concurrency protection. However, it does not specify when not to use this tool or contrast it with alternatives like patch_cell or delete operations for other resources.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_cellA
Replace a cell's ENTIRE source. For small changes prefer patch_cell.
Target the cell by index (0-based) OR cell_id (stable id from list_cells);
pass exactly one. Prefer cell_id after listing — it doesn't shift when other
cells change, avoiding off-by-one edits to the wrong cell. Editing a code cell
clears its outputs and execution_count (they are stale). Optionally pass
summary to set the cell's metadata summary (omit to keep, "" to clear).
Optionally pass expected_rev to refuse the write if the file changed on disk.
Returns the new rev.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| index | No | ||
| source | Yes | ||
| cell_id | No | ||
| summary | No | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description discloses important behaviors: editing code cells clears outputs/execution_count, optional summary handling, concurrent write protection via expected_rev, and return of new rev. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise yet comprehensive: first sentence states action, then guidelines, then parameter details, all in a few sentences without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, usage, parameters, side effects, and return value. Could optionally clarify path format, but overall sufficient for an agent to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description adds meaning to key parameters: index/cell_id usage, source is implicit, summary semantics, expected_rev purpose. Path is not explained but is straightforward. Strong compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it replaces a cell's entire source, distinguishes from patch_cell for small changes, and specifies targeting methods (index or cell_id). This clearly defines the tool's purpose and differentiates it from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance: use for full replacements, prefer patch_cell for small changes, target by cell_id to avoid shifting, and notes on optional parameters like summary and expected_rev. This is comprehensive usage advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insert_cellA
Insert a new cell BEFORE index (index == cell count appends).
cell_type must be one of: code, markdown, raw. Indices are 0-based.
Optionally pass summary: a short description stored in cell metadata that
becomes the cell's summary in list_cells (takes precedence over any leading
# comment). Set it so later list_cells calls stay informative.
Optionally pass expected_rev (from notebook_rev or a prior write) to refuse
the write if the file changed on disk since then. Returns the new rev.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| index | Yes | ||
| source | Yes | ||
| summary | No | ||
| cell_type | Yes | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It explains key behaviors: insertion at index, appending when index equals count, concurrency control via expected_rev, and return value of new rev. However, it omits details like error handling, permissions, or side effects on cell ordering.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four sentences with no filler. First sentence states the primary action, second clarifies index and cell_type, third explains summary utility, fourth covers expected_rev and return. Information density is high and well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with six parameters and no output schema, the description covers insertion logic, parameter details, and return value. Missing are explanations of path and source (possibly obvious), error scenarios, and response format beyond 'rev'. Overall, adequate for typical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains index (0-based, appending), cell_type (enum of three values), summary (purpose and precedence in list_cells), and expected_rev (optimistic locking). No extra info for path or source, but adds significant meaning to four of six parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool inserts a new cell before a given index, with appending at end. It lists valid cell types, distinguishing it from delete or edit tools. However, it does not differentiate from the sibling 'insert_cells' (for multiple cells), missing a clear sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives like 'insert_cells' or 'edit_cell'. It gives parameter advice (e.g., for summary) but lacks contextual usage cues, such as prerequisites or when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insert_cellsA
Insert several cells at once, contiguously BEFORE index (0-based).
Prefer this over many insert_cell calls when adding a block of cells: one
round-trip, no index bookkeeping between inserts. cells is a list of
objects {cell_type, source, summary?} inserted in order (index == cell count
appends). The batch is atomic: all items are validated first, and if any is
invalid nothing is written and the offending items are named — fix those and
resend. Optionally pass expected_rev to guard against concurrent external
edits. Returns {"indices": [...], "ids": [...], "rev": ...}.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| cells | Yes | ||
| index | Yes | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description fully discloses behavioral traits: atomic batch validation, error reporting with offending items named, concurrency guard with 'expected_rev', and the return structure. It accurately portrays the tool as a safe, atomic, and efficient batch operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with about 4-5 sentences, each serving a purpose. It front-loads the core functionality, then provides usage guidance, atomicity details, and return information. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of 4 parameters (3 required) and no output schema, the description covers all essentials: purpose, usage, cell structure, atomicity, error handling, concurrency, and return format. It is complete for an agent to select and invoke correctly, especially compared to siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description adds crucial meaning: explains that 'cells' is a list of objects with {cell_type, source, summary?}, that 'index' is 0-based and appends when equal to cell count, and that 'expected_rev' guards against concurrent edits. This effectively compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool inserts several cells contiguously before a 0-based index. It specifies the verb 'insert', the resource 'cells', and the scope 'at once'. It also distinguishes itself from the sibling tool 'insert_cell' by indicating preference for batch operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool: 'Prefer this over many insert_cell calls' with reasons like one round-trip and no index bookkeeping. It also explains the atomicity of the batch and suggests using 'expected_rev' for concurrent edits, offering clear context for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_cellsA
List every cell as a compact outline (cheap overview).
Returns index, id, type, summary, num_lines, has_outputs, has_error per cell.
id is the cell's stable identifier: unlike index it does NOT shift when
cells are inserted/deleted/moved, so prefer addressing later edits by id.
summary is the cell's leading # comment block (code) or leading lines
(markdown/raw); has_error flags code cells whose outputs contain an error.
Cell indices are 0-based. Call this first to orient before editing.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses important behavioral traits not inferable from schema or annotations: id stability vs. index, summary extraction, has_error meaning, and 0-based indices. No annotations provided, so description carries full burden.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise and well-structured: purpose statement upfront, then list of returned fields, then clarifications on id and summary. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given single parameter and presence of output schema, the description fully explains the return fields and usage context. It covers what the agent needs to know for selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only parameter is 'path', but description adds no meaning beyond the schema. Schema description coverage is 0%, so the description should compensate but does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it lists cells as a compact outline. Specifies return fields, implying a lightweight overview. Does not explicitly contrast with sibling 'read_cells', but the 'cheap overview' phrasing suggests it's a lighter alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit usage guidance: 'Call this first to orient before editing.' However, it does not provide explicit when-not-to-use or alternatives like read_cells.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
move_cellA
Move a cell to to_index (final position, 0-based).
Address the moved cell by from_index OR from_id (stable id; exactly one);
the destination to_index is always positional. Does not clear outputs.
Optionally pass expected_rev to guard against concurrent external edits.
Returns the new rev.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| from_id | No | ||
| to_index | Yes | ||
| from_index | No | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description fully carries the burden. It discloses that outputs are not cleared, the optional expected_rev prevents concurrent edits, and the return value is a new rev. This provides complete transparency for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences long, front-loads the main action, and every sentence adds value. No redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 params, 2 required) and lack of output schema, the description covers essential aspects: methods of addressing, concurrency guard, output behavior, and return value. It does not explain the path parameter or error conditions, but these are minor omissions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description successfully explains the key parameters: from_index/from_id alternatives, to_index required, expected_rev optional. However, the 'path' parameter is not explained, which is a minor gap given it is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Move a cell' with destination index, and distinguishes from sibling tools like insert_cell and delete_cell. The verb and resource are specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use from_index vs from_id and that exactly one must be provided. It does not explicitly exclude other scenarios, but the context from siblings and the description itself is sufficient for an AI agent to decide when to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
notebook_revA
Get the notebook's current revision token: {"path", "rev"}.
rev is a short hash of the file's current on-disk content. Pass it as
expected_rev to a mutating tool to guard against a concurrent external edit
(e.g. the file being saved by an editor between your read and your write): if
the file changed since this rev, the write is refused so you can re-read.
Read-only. Mutating tools also return the new rev, so you can chain edits
without re-reading.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description discloses key behavioral traits: it is read-only, describes what the rev is (a short hash of on-disk content), and explains the concurrency guard mechanism. It also mentions that mutating tools return a new rev. However, it does not cover error cases or behavior when the path does not exist, but for a simple read operation, this is sufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured paragraph that front-loads the main purpose, then provides necessary detail about the rev token and usage. Every sentence adds value; there is no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description is mostly complete: it explains the purpose, the return value, and how to use it in conjunction with other tools. It could mention the data type of rev, but that is implicit. Overall, it covers the essential information needed for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, but the description mentions the only parameter 'path' in the context of returning path and rev. However, it does not elaborate on the parameter's format or constraints beyond that. The parameter name is self-explanatory, so the minimal extra value warrants a score of 3, as it partially compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get the notebook's current revision token.' It specifies the verb ('get'), resource ('revision token'), and the context (for a notebook). It distinguishes from sibling tools, which are about creating, editing, or reading cells, while this tool is uniquely about obtaining a revision token.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly explains when to use the tool: to obtain a revision token for optimistic concurrency control when performing mutations. It details how to pass the rev as 'expected_rev' and notes that mutating tools return a new rev, allowing chaining. This provides clear usage context without needing to reference alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
patch_cellA
Preferred edit tool: replace a unique old substring with new in a cell.
Target the cell by index (0-based) OR cell_id (stable id from list_cells);
pass exactly one. Prefer cell_id when chaining several patches — indices
shift after inserts/deletes/moves, ids don't, so this avoids patching the
wrong cell. old must occur exactly once in the cell; otherwise this errors
and asks for more context. Keeps diffs small. Editing a code cell clears its
outputs. Optionally pass expected_rev (from notebook_rev or a prior write)
to refuse the write if the file changed on disk since. Returns the new rev,
so chained patches can pass it forward without re-reading.
| Name | Required | Description | Default |
|---|---|---|---|
| new | Yes | ||
| old | Yes | ||
| path | Yes | ||
| index | No | ||
| cell_id | No | ||
| expected_rev | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It discloses that editing a code cell clears its outputs, that old must occur exactly once (otherwise errors), and that the tool returns the new rev for chaining. This covers key behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is moderately long but front-loaded with the core action. Each sentence adds distinct value (usage advice, error conditions, output). No wasted words, though it could be slightly tighter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 6 parameters and no output schema, the description covers purpose, parameter semantics, usage guidance, error behavior, and return value. It addresses chaining and concurrency. Could mention that path is required, but overall complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description explains every parameter: index (0-based), cell_id (stable id), old (unique substring), new (replacement), expected_rev (optimistic concurrency). It clarifies that exactly one of index/cell_id must be passed, adding meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with 'replace a unique old substring with new in a cell,' clearly stating the action and resource. It distinguishes from sibling tools like edit_cell and delete_cell by framing itself as a targeted substring replacement tool, not a full cell edit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance: 'Preferred edit tool' for small diffs, advises preferring cell_id when chaining patches because indices shift, and describes error behavior when old occurs multiple times. Does not explicitly list when not to use (e.g., for full cell replacement), but the guidance is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_cellsA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | ||
| path | Yes | ||
| offset | No | ||
| indices | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses critical behaviors: it never executes code, only reads stored outputs; it performs upfront validation of all targets; it truncates large sources and responses, indicating when content is omitted; and it describes output fields including error indicators and image placeholders.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is detailed but well-structured: it starts with the core purpose, then elaborates on addressing, batching, validation, output format, and pagination. Every sentence adds value, though some repetition could be trimmed (e.g., 'Never executes code' is clear from 'only reads stored outputs').
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (multiple parameters, pagination, error handling, varied output), the description is nearly exhaustive. It explains the output shape, windowing behavior, truncation limits, and how to handle both windowed and omitted cells. The presence of an output schema reduces the need for further return-value details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% property coverage, so the description must compensate. It explains the `ids` vs `indices` distinction, that ids are stable, that exactly one of them must be passed (implied by 'Pass exactly one'), and the pagination use of `offset`. The `path` parameter is not explained, but it is a common parameter with a clear purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Read') and resource ('cells'), distinguishes between addressing methods (`indices` or `ids`), and differentiates from sibling tools like `list_cells` or `edit_cell` by specifying read-only behavior and scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description advises preferring `ids` over `indices` for stability, recommends batching multiple reads into one call, explains that validation errors abort the entire call, and gives pagination instructions for large results. It does not explicitly say when not to use this tool, but the context makes it clear it is for reading versus editing/deleting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: create notebook, insert/delete/edit/patch/move cells, list/read cells, and get revision. Overlap between edit_cell and patch_cell is resolved by descriptions favoring patch for small changes.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_notebook, delete_cell, list_cells). No mixing of conventions or vague verbs.
10 tools cover the domain of notebook cell editing thoroughly without bloat. Each tool serves a necessary operation (single/batch insert, edit/patch, move, delete, list/read, revision).
The tool set provides full CRUD for cells and includes batch operations and concurrency support. Missing notebook-level operations like delete or rename, but these may be out of scope for an editing tool.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OAuth-protected, read-only-by-default MCP server for provenance-labeled QuillCaddie project memory.
MCP server for the Inistate platform: module discovery, entry management, and activity submission.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for Product Management
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Control Protocol (MCP) server that enables remote programmatic control of Jupyter notebooks, allowing AI assistants and applications to create, edit, and execute notebook cells via SSE protocol.
- AlicenseAqualityDmaintenanceAn MCP server for programmatically editing Jupyter notebooks, offering 29 tools for reading, modifying, and batch-processing notebooks without requiring a Jupyter server.294MIT
- FlicenseNot gradedqualityCmaintenanceA local MCP server for reading, writing, and executing Jupyter notebooks using jupyter_client for direct kernel communication.
- FlicenseNot gradedqualityDmaintenanceA FastMCP server for loading, editing, searching, and saving Jupyter notebooks (.ipynb) through MCP tools. It maintains a single active notebook session with live cell indices that update as cells are inserted or removed.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tmlksu/nbedit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server