getAgentRun
Follow an agent job: its status (queued, running, awaiting_approval, paused, completed, failed or cancelled), progress (steps done, tool calls, the current tool, the budget), the approval level it runs at (approvalMode), the pause reason, its steps (paged with stepsOffset and stepsLimit), its pen...
This record as markdown: /tools/io-stablebaseline-sb/getagentrun.md
What getAgentRun does on Stable Baseline
AI agents call getAgentRun to permanently remove resources in Stable Baseline, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | The run id returned by askAgent or delegateToAgent. |
stepsLimit | number | — | Optional. Steps to return, 1 to 200, default 50. |
stepsOffset | number | — | Optional. Steps to skip, default 0. |
planStepsLimit | number | — | Optional. Plan steps to return, 1 to 200, default 50. |
planStepsOffset | number | — | Optional. Plan steps to skip, default 0. |
Parameters from the server's own tool schema.
Why getAgentRun is rated Critical
An AI agent that decides to call getAgentRun doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Stable Baseline is gone. There is no undo for destructive operations.
Attacks that exploit this kind of access
The rule that runs getAgentRun safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Stable Baseline, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For getAgentRun, this is the rule to start with:
getAgentRun is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Stable Baseline, apply this rule, and every getAgentRun call is checked against it from then on.
Questions about getAgentRun
Follow an agent job: its status (queued, running, awaiting_approval, paused, completed, failed or cancelled), progress (steps done, tool calls, the current tool, the budget), the approval level it runs at (approvalMode), the pause reason, its steps (paged with stepsOffset and stepsLimit), its pending approvals, and once it finished its answer, provenance and receipt. While it works the result says when to look again (pollAfterSeconds). A job in plan mode also returns plan: its status (pending, approved, executing, completed, declined, expired, conflict, superseded), counts by kind, tool fees, digest, approvalId, expiresAt, how many steps ran, and its steps with their previews (paged with planStepsOffset and planStepsLimit). Someone who did not start the job sees its metadata, and its content only for the items they can read themselves. A person's chat with an agent stays theirs alone: its run is not found for anyone else. Through a connection that reaches less than you do (held to chosen places, or to some kinds of item), only a job started through that same connection is found (and continued or undone): one started in Stable Baseline, by a duty or through another connection is followed in the app. undo says whether you may undo the job now (available, and reason when not: not_finished, already_undone, undo_in_progress, nothing_to_undo, irreversible_only, forbidden...), undoRunId for an undo that waits or runs and undoneByRunId once undone; start one with delegateToAgent undoRunId. An undo job's own view carries undoOfRunId, and its plan's undo lists what was skipped and what cannot be undone. It is categorised as a Destructive tool in the Stable Baseline MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
getAgentRun accepts 5 parameters: runId, stepsLimit, stepsOffset, planStepsLimit, planStepsOffset. Required: runId. The full parameter table on this page comes from the server's own tool schema.
Register the Stable Baseline MCP server in PolicyLayer and add a rule for getAgentRun: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Stable Baseline. Nothing to install.
getAgentRun is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the getAgentRun rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for getAgentRun. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
getAgentRun is provided by the Stable Baseline MCP server (https://api.stablebaseline.io/functions/v1/cloud-serve/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Stable Baseline, and thousands of servers like it.
Across the catalogue