MCP server for reading and editing Jupyter notebooks in LLM-friendly format
MCP Server Jupyter Edit provides 7 well-defined notebook manipulation tools with explicit schemas and descriptions. Tool naming follows verb_noun convention consistently (read_notebook, write_notebook, list_cells, get_cell, add_cell, update_cell, delete_cell). Descriptions are present and actionable (average ~80 chars), falling within the 10-1024 character baseline. All parameters have type definitions and descriptions. However, several critical gaps prevent a higher score: (1) Output schemas are not explicitly documented in the visible code, LLMs cannot predict return structure for composition; (2) Error handling is basic (anyhow::bail with messages) without recovery guidance or categorization; (3) No safety confirmations for destructive operations (delete_cell); (4) Parameter validation rules are sparse (e.g., path existence, cell_type enum is validated in code but not schema-declared); (5) STDIO transport limits protocol readiness; (6) No tool annotations (destructiveHint, readOnlyHint, idempotentHint) despite clear operation types. Averaging across 7 tools: 4 read-only tools (read_notebook, list_cells, get_cell, partial list_cells) score ~70 (good naming/descriptions, limited output docs); 3 write/destructive tools (write_notebook, add_cell, update_cell, delete_cell) score ~55 (good input validation in code, but no output schemas, missing safety patterns). Baseline comparison: tool names average 18 chars (rubric p50), server uses 10-20 chars (good); descriptions average 194 chars (rubric p50), server uses 60-120 chars (slightly lean but adequate); 100% of params have descriptions and types (meets baseline).
Add a new cell to notebook
Remove a cell from notebook by its ID
Read a specific cell's source and outputs
List all cells in notebook with their IDs, types, and positions
Read a Jupyter notebook and convert to LLM-friendly markdown format
Update source content of an existing cell
Write a complete Jupyter notebook from LLM-friendly markdown format
Output schemas not explicitly documented. LLMs cannot predict return structure for tool composition. read_notebook, write_notebook, list_cells, get_cell, add_cell, update_cell, delete_cell all return strings or structured objects (CellInfo, AddCellResponse) that are not declared in tool registrations.
No tool annotations for operation safety. delete_cell is destructive, read_notebook is read-only, write_notebook/add_cell/update_cell/delete_cell are write operations, but no destructiveHint, readOnlyHint, or idempotentHint annotations in tool definitions.
Destructive operations lack confirmation or dry-run pattern. delete_cell permanently removes cells with no confirmation step. LLMs can make irreversible mistakes.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 61 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 45 | - | v1 |
Error messages are minimal. Functions use anyhow::bail with plain text (e.g., 'Cell not found with ID: ...'). No recovery guidance, categorization (retryable vs user-fixable), or actionable next steps.
Parameter validation rules not schema-declared. cell_type is validated in code (must be 'code', 'markdown', or 'raw', line 62 in tools.rs) but not declared as an enum in the JSON Schema. LLMs cannot self-correct invalid values.
Path traversal not explicitly mitigated. write_notebook checks parent directory exists (line 42) but does not validate against path traversal (../../etc/passwd). read_notebook, list_cells, get_cell, add_cell, update_cell, delete_cell all accept arbitrary 'path' strings without canonicalization or jail checks.
No pagination support. read_notebook accepts limit and offset, but list_cells and get_cell do not. Large notebooks could return massive responses, exhausting context windows.
Ambiguous parameter relationships in add_cell. Both after_cell_id and after_index can be specified (lines 52-65 in tools.rs); code prioritizes after_index, but this is not documented. No mutual exclusion warning in schema or description.