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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_execution_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of past runs to return, most recent first. Default 20. Values below 1 are treated as 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |