Skip to main content
Glama

get_execution_history

Retrieve a log of recent code executions with status, code snippet preview, and run details. Useful for auditing past sandbox activity and checking run outcomes.

Instructions

Retrieve a log of recent code executions performed by run_code, most recent first.

Useful for reviewing what code was run previously, checking whether a
past run succeeded, or auditing recent sandbox activity. Only a preview
(first 500 characters) of each snippet's code is stored, not the full
source, and stdout/stderr are recorded as byte sizes only, not content.

Returns a list of dicts, each with:
- id: unique run identifier
- timestamp: ISO 8601 UTC timestamp of when the run occurred
- language: language that was executed
- code_snippet: first 500 characters of the executed code
- status: "success", "error", "timeout", or "compile_error"
- exit_code: process exit code, or null
- duration_ms: how long the run took, in milliseconds
- stdout_size / stderr_size: byte counts of captured output

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of past runs to return, most recent first. Default 20. Values below 1 are treated as 1.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses that only first 500 characters of code are stored, stdout/stderr recorded as byte sizes only, and order is most recent first. With no annotations, this provides useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and clear structure. The description is well-organized with paragraphs for use cases and return fields, though the return field list is somewhat redundant given the output schema.

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?

Given one parameter and existence of output schema, the description covers key aspects: what data is stored, what is omitted (full code, output content), and use cases. Minor omissions like pagination but overall 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?

Schema description coverage is 100%, so the schema already documents the limit parameter adequately. The description does not add extra semantics beyond what the schema provides.

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 retrieves a log of recent code executions by run_code, most recent first. It distinguishes itself from siblings run_code (which executes code) and list_supported_languages.

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?

Provides concrete use cases: reviewing past code runs, checking success, auditing. No explicit when-not-to-use, but context makes it clear this is for history retrieval.

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/huzayfaSiddique/sandbox_runner'

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