Skip to main content
Glama

Cancel agent

agents_cancel
Destructive

Stops the agent's current turn: cancels its unfinished tool calls and open interactions, stops processes whose run_command hasn't returned yet, and discards pending steering messages. The agent stays active and keeps its queued messages, and processes whose run_command already returned keep running. Returns affected false and changes nothing when no turn is in progress.

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": {
      "agentID": "<agentID>",
      "orgID": "<orgID>",
      "projectID": "<projectID>"
    },
    "name": "agents_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
actorNoExternal actor to attribute this cancelation to, upserted by (provider_tenant_id, provider_user_id) atomically with the cancelation; a rejected request writes no actor. Only allowed for non-user principals; requests authenticated as a user must omit it and are attributed to the user's omnara actor.
orgIDYesOrganization ID (org_...).
agentIDYesAgent ID (agt_...).
projectIDYesProject ID (proj_...).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / actor / description
      Previous value: -"Identity and attributes of an external actor. Actors are upserted by (provider_tenant_id, provider_user_id) with the external provider. Omitted attributes keep their stored values; provided attributes are overwritten, including empty values. omnara actors are implicit and hosted integrations own their own actor identities."New value: +"External actor to attribute this cancelation to, upserted by (provider_tenant_id, provider_user_id) atomically with the cancelation; a rejected request writes no actor. Only allowed for non-user principals; requests authenticated as a user must omit it and are attributed to the user's omnara actor."
  2. Changed3 schema fields changed
    • addedInput schema / properties / agentID / description
      Added value: +"Agent ID (agt_...)."
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / projectID / description
      Added value: +"Project ID (proj_...)."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Far exceeds the annotations: it names exactly what is destroyed (tool calls, interactions, pending steering, still-running processes) and exactly what survives (the agent, its queue, already-returned processes). The no-op return contract gives the agent a way to detect that nothing happened, which is behavioral detail annotations cannot convey.

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?

Four sentences, front-loaded with the action and its scope, then the exceptions, then the no-op contract. Every clause carries distinct information; nothing is restated from the title or annotations.

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

Completeness5/5

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

For a destructive, non-idempotent mutation with no output schema, the description covers the blast radius, the preserved state, and the sentinel return value. An agent has everything it needs to decide whether calling is safe.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds no meaning about the four parameters, notably 'actor' and its non-user-principal restriction, which the schema already documents in detail.

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?

Opens with a specific verb and scope: 'Stops the agent's current turn,' then enumerates exactly what that means (unfinished tool calls, open interactions, in-flight run_command processes, pending steering). The clause 'The agent stays active and keeps its queued messages' implicitly separates it from the sibling agents_archive, so an agent can pick correctly without opening a schema.

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?

It gives a clear condition for the no-op case ('Returns affected false and changes nothing when no turn is in progress') and defines the boundary of what is cancelled versus preserved. It never names an alternative tool (e.g. agents_archive) for when the intent is to stop the agent entirely, so the routing guidance is contextual rather than explicit.

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.