Skip to main content
Glama

reset

Clean the IPython kernel by resetting to a fresh state. Clears variables, imports, and definitions from memory while preserving installed packages and files. Ideal for starting fresh experiments or freeing memory after large dataset processing.

Instructions

Reset the IPython kernel to a clean state.

Creates a new kernel instance, clearing all variables, imports, and definitions from memory. Installed packages and files in the container filesystem are preserved. Useful for starting fresh experiments or clearing memory after processing large datasets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'reset' tool. It resets the IPython kernel by disconnecting the current execution client and reconnecting to a new one, clearing all kernel state while preserving installed packages and files.
    async def reset(self): """Reset the IPython kernel to a clean state. Creates a new kernel instance, clearing all variables, imports, and definitions from memory. Installed packages and files in the container filesystem are preserved. Useful for starting fresh experiments or clearing memory after processing large datasets. """ await self.setup_task assert self.container is not None assert self.execution_client is not None async with self.executor_lock: await self.execution_client.disconnect() self.execution_client = ExecutionClient(port=self.container.executor_port) await self.execution_client.connect()
  • Registers the 'reset' method as an MCP tool using FastMCP's tool decorator.
    self.mcp.tool()(self.reset)

Other Tools

Related 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/gradion-ai/ipybox'

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