Skip to main content
Glama

session_run

Run a multi-file program in a session workspace, resolving relative imports and data files, and get stdout, stderr, and verdict.

Instructions

Run a multi-file program in a session: execute entry_file, which may import other files already in the session workspace (helper.py, data/...).

Runs as a fresh process in the session workdir (not the REPL worker), so relative imports and data files resolve. Returns stdout/stderr/verdict plus the entry file's path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stdinNo
timeoutNo
languageNo
entry_fileYes
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that it runs as a fresh process (not REPL), returns stdout/stderr/verdict plus entry path, which is helpful. It doesn't mention timeout behavior or potential side effects, but the disclosed traits are substantial.

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?

Two concise sentences, front-loaded with purpose, then behavioral details. Each sentence adds distinct value with no redundancy.

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 5-parameter tool with output schema and no annotations, the description covers the core purpose, process model, import resolution, and return payload. It lacks details on timeout behavior and stdin, but the presence of an output schema and common parameter names mitigates the gap.

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?

Schema description coverage is 0%, so the description is the only source for parameter semantics. It explains entry_file as the program to execute and the session workspace context, but doesn't clarify stdin, timeout, or language handling. It adds some meaning but leaves most params to their names.

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 opens with 'Run a multi-file program in a session: execute `entry_file`', clearly identifying the action (run/execute), the resource (entry_file in a session), and the multi-file scope. It distinguishes from siblings like execute_code by emphasizing fresh process and relative imports.

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 explains that execution runs in a fresh process in the session workdir, not the REPL worker, which tells the agent when relative imports are needed. However, it doesn't explicitly name alternative tools or state when not to use this tool, so it's clear context but no exclusions.

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/The-40-Thieves/codecalc'

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