Skip to main content
Glama

use_notebook

Destructive

Activate a Jupyter notebook for executing code cells and managing content within JupyterLab environments through the Model Context Protocol.

Instructions

Use a notebook and activate it for following cell operations. All cell operations will be performed on the currently activated notebook. Activate new notebook will deactivate the previously activated notebook. Reactivate previously activated notebook using same notebook_name and notebook_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notebook_nameYesUnique identifier for the notebook
notebook_pathYesPath to the notebook file, relative to the Jupyter server root (e.g. 'notebook.ipynb')
modeNoNotebook operation mode: 'connect' to connect to existing and activate it, 'create' to create new and activate itconnect
kernel_idNoSpecific kernel ID to use (will create new if skipped)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesSuccess message with notebook information
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide destructiveHint=true, indicating mutation. The description adds valuable context beyond this: it explains that activation affects subsequent cell operations, deactivates previous notebooks, and allows reactivation. It does not mention rate limits or auth needs, but covers key behavioral traits like state management. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with four sentences that are front-loaded (starting with the core purpose) and each adds value: activation, impact on cell operations, deactivation behavior, and reactivation. No wasted words, though it could be slightly more structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (stateful activation with destructive hint), rich schema (100% coverage, 4 parameters), annotations (destructiveHint), and output schema (present), the description is complete enough. It covers activation mechanics and context without needing to detail return values, which are handled by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents parameters like 'notebook_name', 'notebook_path', 'mode', and 'kernel_id'. The description does not add meaning beyond the schema, such as explaining parameter interactions or usage examples. Baseline 3 is appropriate as the schema handles parameter documentation effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Use a notebook and activate it for following cell operations.' It specifies the verb ('use' and 'activate') and resource ('notebook'), and distinguishes it from siblings like 'list_notebooks' or 'read_notebook' by emphasizing activation for subsequent operations. The title 'Use Notebook' reinforces this, though it's in annotations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool: to activate a notebook for cell operations, with details on activation behavior (e.g., deactivating previous notebooks, reactivation). It implicitly distinguishes from siblings like 'list_notebooks' (for listing) or 'unuse_notebook' (for deactivation), but does not explicitly name alternatives or state when not to use it, such as for read-only tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/datalayer/jupyter-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server