Skip to main content
Glama

kernel_restart

Destructive

Restart a notebook kernel to clear in-memory state like variables and imports while preserving saved cell outputs. Optionally switch to a different Python interpreter on restart.

Instructions

Restart the kernel for a notebook. Clears all in-memory state (variables, imports, etc.). Cell outputs saved to the .ipynb file are not affected.

python_path: optionally switch to a different Python interpreter on restart.

  • "" or omitted: keep using the same Python the kernel was started with.

  • Absolute path: e.g. "/home/user/project/.venv/bin/python"

  • Name on PATH: e.g. "python3.11" If python_path differs from the current kernel's Python, the kernel is fully replaced rather than just restarted in-place.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
python_pathNo
Behavior4/5

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

The description discloses that the tool clears in-memory state (aligning with destructiveHint=true) and explains the behavior when python_path differs. Annotations already provide basic hints, but the description adds valuable context beyond them.

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 well-structured, starting with the main action, then effects, then parameter details. Every sentence adds value without unnecessary verbosity.

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?

The description covers the main action, effects, and python_path parameter in detail. The only gap is the missing explanation of the 'name' parameter. Overall, it is fairly complete for a tool of this complexity.

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 description provides rich detail for python_path (three cases and implications) but does not explain the required 'name' parameter, which is critical for correct usage. Schema coverage is 0%, so the description should cover both.

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 action ('Restart the kernel for a notebook') and the resource. It distinguishes from siblings like kernel_interrupt and kernel_start by explaining what is reset and what is preserved.

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 context on when to use the python_path parameter and the behavior of restart vs full replacement. However, it does not explicitly address when to use this tool over alternatives like kernel_interrupt or kernel_start.

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/Try3D/JupyterMCP'

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