Skip to main content
Glama
aazizisoufiane

mcp-python-repl

repl_clear_namespace

DestructiveIdempotent

Clear all variables from a Python REPL session to reset its state. This action permanently removes every variable, providing a clean slate for new code execution.

Instructions

Clear ALL variables from a session. Cannot be undone.

Returns: Confirmation with list of cleared variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explicitly warns 'Cannot be undone,' which reinforces the destructiveHint annotation and discloses irreversibility. It also states the return value (confirmation with list of cleared variables), adding useful behavioral context beyond what annotations provide.

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 two sentences, front-loaded with the core action and a critical warning. There is no filler, and the return value is clearly stated in a structured format.

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 simple destructive tool, the description covers what is cleared, irreversibility, and the return format. It lacks an explicit mention that the operation targets the specified session_id, but this is inferable from the schema and tool name.

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

Parameters2/5

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

The description does not mention session_id or provide any additional parameter-level semantics. The input schema's 'Target session ID' is the only guidance, and with schema description coverage reported as 0%, the description fails to compensate for parameter understanding.

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 uses the specific verb 'Clear' with the resource 'ALL variables from a session,' clearly distinguishing it from sibling tools like repl_delete_variable (single variable) and repl_list_namespace (listing). This is precise and unambiguous.

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

Usage Guidelines3/5

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

The description implies the use case—clearing the entire session namespace—but does not explicitly state when to prefer this tool over alternatives such as repl_delete_variable for individual variables. It also does not mention any exclusions or prerequisites.

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/aazizisoufiane/mcp-python-repl'

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