Skip to main content
Glama
block

Jupyter MCP Server

by block

setup_notebook

Initialize a Jupyter notebook by creating it if needed and connecting to a specified server URL. Must be called before any other notebook operations.

Instructions

Prepare notebook for use and connect to the kernel on the user-provided server. Will create a new empty Jupyter notebook if needed on the server.

CALL THIS FIRST - This tool must be called before using other notebook tools to establish the server URL connection. All subsequent notebook operations will use the server URL stored by this tool.

This tool creates an empty notebook. To add content, use the modify_notebook_cells tool after creation:

Example usage: # Step 1: REQUIRED - Setup notebook with correct server URL setup_notebook("demo", server_url="http://localhost:9999")

# Step 2: Add cells (these now use the stored server URL automatically)
modify_notebook_cells("demo", "add_markdown", "# Title\\n\\nDescription")
modify_notebook_cells("demo", "add_code", "print('Hello World')")

This tool assumes a Jupyter server is already running and accessible at the specified server_url. It connects to this existing server to manage the notebook.

Note that notebook_path must be relative to the Jupyter server root, not an absolute filesystem path.

Args: notebook_path: Path to the notebook, relative to the Jupyter server root. server_url: Jupyter server URL (HIGHLY RECOMMENDED to specify explicitly). This URL will be stored and used for subsequent interactions with this notebook. If not provided, defaults to http://localhost:8888 which may not be correct for your setup. Common values: http://localhost:8888, http://localhost:9999, etc.

Returns

dict: Information about the notebook and status message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notebook_pathYes
server_urlNo
Behavior4/5

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

Discloses that it connects to an existing server, stores the server URL for subsequent calls, and creates an empty notebook if needed. Does not mention overwriting behavior or authentication, but covers core behavioral traits. Annotations are absent, so description carries the burden.

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 well-structured with bold emphasis on key points, an example, and bullet-style parameter explanations. It is somewhat lengthy but each part adds value; slight redundancy in storage explanation could be trimmed.

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 no output schema, the description sufficiently explains the return value as a dict with status. It covers the tool's role in the workflow, parameter details, environmental assumption, and positioning relative to siblings. Complete for a setup tool with two parameters.

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

Parameters5/5

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

With 0% schema description coverage, the description compensates fully: explains notebook_path as relative to Jupyter server root, and server_url with explicit recommendation, default, common values, and storage behavior. This provides essential meaning beyond the schema.

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 prepares a notebook and connects to a kernel, with specific actions: 'Prepare notebook for use and connect to the kernel' and 'Will create a new empty Jupyter notebook if needed'. This distinguishes it from sibling tools like modify_notebook_cells and execute_notebook_code.

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

Usage Guidelines5/5

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

Explicitly declares 'CALL THIS FIRST' and states it must be called before other notebook tools. Provides example usage showing the correct sequence and mentions alternatives like modify_notebook_cells for adding content. Also notes the required prerequisite of a running Jupyter server.

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

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