Skip to main content

Tools

The server currently offers 12 tools:

1. append_execute_code_cell

  • Append at the end of the notebook a code cell with the provided source and execute it.
  • Input:
    • cell_source(string): Code source.
  • Returns: List of outputs from the executed cell.

2. append_markdown_cell

  • Append at the end of the notebook a markdown cell with the provided source.
  • Input:
    • cell_source(string): Markdown source.
  • Returns: Success message.

3. insert_execute_code_cell

  • Insert a code cell at a specific index in the notebook and execute it.
  • Input:
    • cell_index(int): Index where the cell should be inserted (0-based).
    • cell_source(string): Code to be executed.
  • Returns: Cell output.

4. insert_markdown_cell

  • Insert a markdown cell at a specific index in the notebook.
  • Input:
    • cell_index(int): Index where the cell should be inserted (0-based).
    • cell_source(string): Markdown source.
  • Returns: Success message.

5. delete_cell

  • Delete a specific cell from the notebook.
  • Input:
    • cell_index(int): Index of the cell to delete (0-based).
  • Returns: Success message.

6. get_notebook_info

  • Get basic information about the notebook.
  • Returns: Dictionary with notebook path, total cells, and cell type counts.

7. read_cell

  • Read a specific cell from the notebook.
  • Input:
    • cell_index(int): Index of the cell to read (0-based).
  • Returns: Dictionary with cell index, type, source, and outputs (for code cells).

8. read_all_cells

  • Read all cells from the notebook.
  • Returns: List of cell information including index, type, source, and outputs (for code cells).

9. overwrite_cell_source

  • Overwrite the source of an existing cell.
  • Input:
    • cell_index(int): Index of the cell to overwrite (0-based).
    • cell_source(string): New cell source - must match existing cell type.
  • Returns: Success message.

10. execute_cell_streaming

  • Execute cell with streaming progress updates. To be used for long-running cells.
  • Input:
    • cell_index: Index of the cell to execute (0-based)
    • timeout_seconds: Maximum time to wait for execution (default: 300s)
    • progress_interval: Seconds between progress updates (default: 5s)
  • Returns:
    • list[str]: List of outputs including progress updates

11. execute_cell_simple_timeout

  • Execute a cell with simple timeout (no forced real-time sync). To be used for short-running cells. This won't force real-time updates but will work reliably.
  • Input:
    • cell_index: Index of the cell to execute (0-based)
    • timeout_seconds: Maximum time to wait for execution (default: 300s)
  • Returns:
    • list[str]: List of outputs from the executed cell

12. execute_cell_with_progress

  • Execute a specific cell with timeout and progress monitoring.
  • Input:
    • cell_index: Index of the cell to execute (0-based)
    • timeout_seconds: Maximum time to wait for execution (default: 300s)
  • Returns:
    • list[str]: List of outputs from the executed cell