Skip to main content
Glama

agent_cancel

Stop a running agent or Deep Research task by interaction ID to halt further billing.

Instructions

Stop a running agent or Deep Research task (stops further billing).

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": {
      "interaction_id": "<interaction_id>"
    },
    "name": "agent_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
interaction_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv6.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the key side effect, that billing stops, but says nothing about irreversibility, whether partial results are retained, idempotency when the task already ended, or the nature of the response.

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?

A single parenthetical sentence with zero waste; the primary action is front-loaded and the billing consequence is attached directly to it.

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

Completeness3/5

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

For a one-parameter mutation tool with no annotations and no output schema, the description covers what it does and the main consequence. It leaves out the linkage between the parameter and the run/research tools, and post-cancellation state, which matter for correct invocation.

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?

Schema coverage is 0% and the sole parameter, interaction_id, is never mentioned in the description. An agent must infer that the id comes from agent_run or deep_research_start and that it identifies the specific task to stop, so the description adds no meaning beyond the bare property name.

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 (stop) and the resources affected (a running agent or Deep Research task), which separates it from agent_run and deep_research_start. It stops short of naming a sibling or clarifying how it differs from agent_status/check_job, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

"Stops further billing" implies the motivating scenario (abandoning a run to cut cost), which gives usable context. There is no explicit when-not guidance, no mention of where interaction_id must come from, and no note about what to do if the task has already finished.

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