Skip to main content
Glama

ipybox

by gradion-ai

execute_ipython_cell

Run Python code interactively in a stateful IPython kernel within a Docker container. Maintain variable state across executions, install packages, and execute asynchronous code directly. Ideal for step-by-step workflow building.

Instructions

Execute Python code in a stateful IPython kernel within a Docker container.

The kernel maintains state across executions - variables, imports, and definitions persist between calls. Each execution builds on the previous one, allowing you to build complex workflows step by step. Use '!pip install package_name' to install packages as needed. The kernel has an active asyncio event loop, so use 'await' directly for async code. DO NOT use asyncio.run() or create new event loops. Executions are sequential (not concurrent) as they share kernel state. Use the reset() tool to clear the kernel state and start fresh. Returns: str: Output text from execution, or empty string if no output.

Input Schema

NameRequiredDescriptionDefault
codeYesPython code to execute in the IPython kernel
timeoutNoMaximum execution time in seconds before the kernel is interrupted

Input Schema (JSON Schema)

{ "properties": { "code": { "description": "Python code to execute in the IPython kernel", "title": "Code", "type": "string" }, "timeout": { "default": 120, "description": "Maximum execution time in seconds before the kernel is interrupted", "title": "Timeout", "type": "number" } }, "required": [ "code" ], "title": "execute_ipython_cellArguments", "type": "object" }
Install Server

Other Tools from ipybox

Related Tools

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