Skip to main content
Glama

connect_notebook

Establish a connection to a Jupyter notebook and its kernel. Required as the initial step before executing any notebook operations.

Instructions

Connect to a notebook and corresponding kernel. It is the FIRST STEP before ANY subsequent operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo`connect`: connect to an existing notebook; `create`: create a new notebook (not exist) and connect; `reconnect`: reconnect to an existing notebookconnect
tokenYesJupyter authentication token
server_urlYesJupyter server URL (e.g., http://localhost:8888)
notebook_nameYesUnique identifier, used to reference this notebook in subsequent operations
notebook_pathYesPath to the notebook file relative to Jupyter server root (e.g., './analysis.ipynb')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must bear the full burden. It states the tool connects to a notebook and kernel but does not disclose behavioral details such as whether it establishes a session, overwrites previous connections, requires authentication (beyond token in schema), or what happens on failure. With no annotations, a score of 3 is appropriate as the description provides basic purpose but lacks deeper behavioral context.

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

Conciseness5/5

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

The description is extremely concise with two sentences. The first sentence states the action, and the second emphasizes its importance as a prerequisite. No extraneous words or repetition. Every sentence earns its place.

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

Completeness4/5

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

Given the tool has 5 parameters, an output schema, and 11 sibling tools, the description adequately covers the core purpose and usage sequence. However, it could be more complete by explaining the lifecycle of connections (e.g., can only one notebook be connected at a time?) and the semantics of the three modes (connect/create/reconnect) beyond what is in the schema. The output schema exists, so return values need not be described. Score 4 because it is mostly complete but misses some behavioral context.

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?

The input schema has 100% description coverage, so each parameter is already clearly documented. The description adds no additional semantic information beyond what the schema provides. The baseline of 3 is appropriate as the description does not need to repeat schema information.

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 connects to a notebook and kernel. It also distinguishes itself from siblings by explicitly labeling this as the 'FIRST STEP' before any subsequent operations, which are all listed as sibling tools (e.g., execute_cell, delete_cell). This provides clear differentiation.

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 explicitly states this is the first step before any subsequent operations, providing clear usage context. However, it does not specify when NOT to use this tool or what alternatives exist (though siblings are all after-connection steps). The input schema details mode options (connect/create/reconnect) but the description could be more explicit about when each mode is appropriate.

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

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