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)
Behavior4/5

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

With no annotations provided, the description carries full burden and does an excellent job disclosing behavioral traits: it explains what gets cleared (all variables, imports, definitions from memory), what gets preserved (installed packages and files in container filesystem), and the creation of a new kernel instance. The only minor gap is lack of information about potential side effects or error conditions.

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 perfectly structured: a clear opening statement of purpose, followed by specific behavioral details, and ending with usage context. Every sentence earns its place, with no redundant information or wasted words. The information is appropriately front-loaded with the core functionality stated first.

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?

For a zero-parameter tool with no annotations and no output schema, the description provides excellent coverage of what the tool does, its effects, and when to use it. The only minor gap is the lack of information about what the tool returns (though with no output schema, this would be helpful to include). It adequately compensates for the absence of structured metadata.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, maintaining focus on the tool's behavior and purpose without unnecessary detail.

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 specific action ('reset the IPython kernel to a clean state') and distinguishes it from sibling tools (download_file, execute_ipython_cell, upload_file) by focusing on kernel state management rather than file operations or code execution. It provides a precise verb+resource combination with clear scope.

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 when to use this tool ('useful for starting fresh experiments or clearing memory after processing large datasets'), providing clear context for its application. However, it doesn't specify when NOT to use it or mention alternatives among sibling tools, which prevents a perfect score.

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

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