Tools
The server currently offers 14 tools organized into 3 categories:
Server Management (2 tools)
1. list_files
- List all files and directories recursively in the Jupyter server's file system.
- Used to explore the file system structure of the Jupyter server or to find specific files or directories.
- Input:
path(string, optional): The starting path to list from (empty string means root directory, default: "")max_depth(int, optional): Maximum depth to recurse into subdirectories (default: 1, max: 3)start_index(int, optional): Starting index for pagination (0-based, default: 0)limit(int, optional): Maximum number of items to return (0 means no limit, default: 25)pattern(string, optional): Glob pattern to filter file paths (default: "")
- Returns: Tab-separated table with columns: Path, Type, Size, Last_Modified. Includes pagination info header showing current range and total count.
- Path: Full path to the file or directory
- Type: File type ("file", "directory", "notebook", or "error" if inaccessible)
- Size: File size formatted as B, KB, or MB (empty for directories)
- Last_Modified: Last modification timestamp in YYYY-MM-DD HH:MM:SS format
2. list_kernels
- List all available kernels in the Jupyter server.
- This tool shows all running and available kernel sessions on the Jupyter server, including their IDs, names, states, connection information, and kernel specifications. Useful for monitoring kernel resources and identifying specific kernels for connection.
- Input: None
- Returns: Tab-separated table with columns: ID, Name, Display_Name, Language, State, Connections, Last_Activity, Environment
- ID: Unique kernel identifier
- Name: Kernel name/type (e.g., "python3", "ir", etc.)
- Display_Name: Human-readable kernel name from kernel spec
- Language: Programming language supported by the kernel
- State: Current execution state ("idle", "busy", "unknown")
- Connections: Number of active connections to this kernel
- Last_Activity: Timestamp of last kernel activity in YYYY-MM-DD HH:MM:SS format
- Environment: Environment variables defined in the kernel spec (truncated if long)
Multi-Notebook (5 tools)
3. use_notebook
- Use a notebook and activate it for following cell operations.
- Input:
notebook_name(string): Unique identifier for the notebooknotebook_path(string): Path to the notebook file, relative to the Jupyter server root (e.g. "notebook.ipynb")mode(string): Notebook operation mode: "connect" to connect to existing and activate it, "create" to create new and activate it (default: "connect")kernel_id(string, optional): Specific kernel ID to use (will create new if skipped)
- Returns: Success message with notebook information including activation status, kernel details, and notebook overview
4. list_notebooks
- List all notebooks that have been used via use_notebook tool.
- Input: None
- Returns: TSV formatted table with notebook information
- Name: Unique identifier for the notebook
- Path: Path to the notebook file
- Kernel_ID: Kernel ID associated with the notebook
- Kernel_Status: Current status of the kernel
- Activate: "✓" if this is the currently active notebook, empty otherwise
5. restart_notebook
- Restart the kernel for a specific notebook.
- Input:
notebook_name(string): Notebook identifier to restart
- Returns: Success message confirming the kernel has been restarted and memory state cleared
6. unuse_notebook
- Unuse from a specific notebook and release its resources.
- Input:
notebook_name(string): Notebook identifier to disconnect
- Returns: Success message confirming the notebook has been disconnected and resources released
7. read_notebook
- Read a notebook and return index, source content, type, execution count of each cell.
- Using brief format to get a quick overview of the notebook structure and it's useful for locating specific cells for operations like delete or insert.
- Using detailed format to get detailed information of the notebook and it's useful for debugging and analysis.
- It is recommended to use brief format with larger limit to get a overview of the notebook structure, then use detailed format with exact index and limit to get the detailed information of some specific cells.
- Input:
notebook_name(string): Notebook identifier to readresponse_format(string): Response format: "brief" will return first line and lines number, "detailed" will return full cell source (default: "brief")start_index(int, optional): Starting index for pagination (0-based, default: 0)limit(int, optional): Maximum number of items to return (0 means no limit, default: 20)
- Returns: Notebook content in the requested format with cell details, metadata, and pagination information
Cell Tools (7 tools)
8. insert_cell
- Insert a cell to specified position from the currently activated notebook.
- Input:
cell_index(int): Target index for insertion (0-based), use -1 to append at endcell_type(string): Type of cell to insert ("code" or "markdown")cell_source(string): Source content for the cell
- Returns: Success message with insertion confirmation and the structure of surrounding cells (up to 5 cells above and below)