Skip to main content
Glama

rlm_execute

Execute Python code in a persistent sandbox session. Control response payload with detail_level (compact, usage, full).

Instructions

Execute Python in the session sandbox. detail_level controls response payload size (compact, usage, or full).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID from rlm_start
codeYesPython code to execute. IMPORTANT: Batch multiple related operations into each call. A good call does: grep -> read top matches -> extract patterns -> print summary. A bad call does just one grep or one read_file. Variables persist between calls.
detail_levelNoResponse payload level: compact=stdout+error, usage=add usage metrics, full=add variable detailscompact
max_new_variablesNoWhen detail_level=full, cap returned new_variables list to this size

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries full burden. The main description only mentions execution and detail_level. The code parameter description adds that variables persist between calls, which is crucial. Still missing details like sandbox limitations, timeouts, or security restrictions.

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 main description is two concise sentences with no redundancy. Parameter descriptions are structured and informative. Every sentence serves a purpose, making the definition efficient.

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?

With output schema existing and full parameter coverage, the description still lacks high-level context about the sandbox environment, Python version, allowed modules, and error handling. The usage advice in code parameter is good but not exhaustive.

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?

Schema coverage is 100%, giving a baseline of 3. The description adds value beyond schema by explaining the detail_level options and providing usage guidance in the code parameter (batching, persistence), enriching the agent's understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute Python in the session sandbox,' providing a specific verb and resource. It distinguishes from siblings (rlm_start, rlm_end) implicitly, but could be more explicit about the sandbox context.

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 main description lacks usage guidance, but the code parameter description offers explicit advice on batching operations and variable persistence, helping the agent use the tool effectively. No direct comparison to alternatives is given, but the sibling tools make the execution purpose clear.

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/stefanoshea/rlm-tools'

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