Skip to main content
Glama

execute

Execute Python code in a persistent IPython environment, preserving variables and state across runs for iterative coding tasks.

Instructions

Execute Python source in the persistent IPython namespace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
resultNo
statusYes
stderrNo
stdoutNo
runtimeNo
truncatedNo
display_dataNo
execution_countNo
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses a key behavioral trait (persistent IPython namespace), but does not mention potential side effects, safety concerns (e.g., arbitrary code execution risks), or error handling behavior. The added namespace context provides some value beyond the bare schema.

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 a single, front-loaded sentence with no filler or repeated information. Every word adds value, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and an output schema, the description is moderately complete. It covers the core behavior but omits usage context and potential risks, which are important for an execution tool. Without annotations, the burden is higher, so it falls short of being fully complete.

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 schema has one parameter 'code' with no description (0% coverage), so the description must compensate. It does by clarifying that the input is 'Python source', adding meaning beyond the generic string type. However, it lacks format details or examples, so it only partially compensates.

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's action ('Execute Python source') and its scope ('in the persistent IPython namespace'). It distinguishes itself from siblings like 'call_function' by focusing on arbitrary Python code execution rather than specific function calls.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or situations where other tools would be preferred. The persistent namespace hints at a use case, but this is not made explicit.

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/husams/ipython-mcp'

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