get_results
Returns the last results of a terminal.
History keeps up to 20 entries per terminal. Code is stored cut to 500 characters.
- Tool name
- get_results
- Group
- Terminal and Python sandbox
- Risk
- none
- Needs approval
- never
- Approval rule
- Read only.
- Allowed in scheduled jobs
- No
- Default
- on
Parameters
| Name | Type | Required | Default | Meaning | Limits |
|---|---|---|---|---|---|
| terminal_id | string | Yes | Id of a terminal session. Omit to use the first one. | ||
| last_n | integer | No | 5 | How many recent results to return. |
Returns
JSON list.
Example (made up for this page)
{
"terminal_id": "demo"
}[{"code": "print(6*7)", "result": {...}}]Side effects
- none
How it can fail
| When | What the agent sees |
|---|---|
| Unknown terminal | Terminal t9 not found |
See also:Terminal and Python sandbox tools
Checked against the source at commit f4fd89f on 29 Oct 2026. Everything here is merged on the main branch; no release has been tagged yet. The source is private, so these pages are the public description.