Skip to main content
Glama

Cancel governed Agent run

cancel_agent_run
DestructiveIdempotent

Cancel a queued or running agent execution and close its run history. Completed, failed, or already-canceled runs remain unchanged.

Instructions

Stop one queued or running Agent execution and close its durable run history. Completed, failed, stalled, and already-canceled runs keep their terminal truth.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesAgent job ID returned by run_project_agent.
run_idYesAgent run ID returned by run_project_agent.
agent_idYesAgent that owns the run.
project_idYesProject the Agent run belongs to.
Behavior4/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true), the description adds meaningful behavioral detail: it 'close[s] its durable run history' and preserves terminal truth for already-terminal runs. This explains the destructive and idempotent nature more concretely, showing what gets closed and what remains unchanged.

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?

The description is extremely concise: two sentences, with the primary action front-loaded. Every word adds value, covering scope, destination, and edge cases without 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 cancellation tool with no output schema and only four required parameters, this description is fairly complete. It explains what is stopped, what happens to the run history, and which run states are unaffected. It could mention what the caller receives in response, but the absence of an output schema makes that less critical.

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?

All four parameters are fully documented in the schema with descriptions (100% coverage), so the description does not need to add parameter details. The description itself does not elaborate on parameter semantics, but the schema carries that burden, and a baseline of 3 is appropriate.

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 stops a queued or running Agent execution and closes its durable run history. This specific verb-resource pair ('Stop one ... Agent execution') distinguishes it from sibling tools like cancel_build, which targets builds, not agent runs.

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 explicitly scopes usage to 'queued or running' runs and notes that completed, failed, stalled, and already-canceled runs are unaffected, providing clear when-to-use guidance. It does not explicitly name alternative tools like cancel_build, but the context makes the intended use case clear.

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/2ools/mcp-server'

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