Skip to main content
Glama

agent_run_cancel

Destructive

Stop an existing agent run. The runner receives an abort command.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "runId": "<runId>"
    },
    "name": "agent_run_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation risk is known. The description adds genuine mechanism detail beyond that with 'the runner receives an abort command,' implying cooperative, possibly asynchronous cancellation rather than a hard kill. It stops short of stating idempotency, whether partial output is retained, or what happens to an already-completed run.

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?

Two short sentences with the action front-loaded and zero filler. Nothing is redundant or padded; the only issue is that it is brief rather than that it is bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with no output schema and a completely undocumented required parameter, the description omits too much: no success/failure semantics, no idempotency note, no precondition on run state, and no hint about what the caller sees after the abort command is issued.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter runId has 0% schema description coverage, so the description carries the full burden and adds nothing — it does not clarify that runId identifies the run to abort, nor reference the uuid format, nor where a runId is obtained (e.g., agent_run_list).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Stop an existing agent run.' The verbs in the sibling set (agent_run_start, agent_run_get, agent_run_list, agent_run_message) make the distinct role of this tool obvious by contrast. It loses the fifth point only because it never explicitly contrasts itself with those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus agent_run_message (which may also influence a run) or when cancellation is appropriate. Nothing about preconditions such as whether the run must still be active, or what happens if the run already finished, so the agent must guess.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.