Skip to main content
Glama

oc_cancel

Cancel a task by its runId to stop a running agent job. Also releases the bridge's session lock, so use it to recover runs stuck in running or blocked by SESSION_BUSY.

Instructions

取消 runId 对应的任务,成功返回 status=aborted。只有用户明确说要停掉/取消时才调用,成功后用一句话确认,不要念底层字段。Gateway 上已无活动任务时视为幂等成功(no-active-run),并释放本桥接的会话锁——因此任务长时间悬挂在 running、或 SESSION_BUSY 挡住新任务时,取消它是最可靠的恢复手段。

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": "oc_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYes任务 runId。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses the success return (status=aborted), idempotent no-active-run behavior, and the side effect of releasing the bridge's session lock. It also prescribes post-call output behavior (confirm briefly, do not read back underlying fields), which is real behavioral context an agent cannot get from structured data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is dense but front-loaded: what it does and returns comes first, then invocation gating, then idempotency and recovery. No sentence is filler, though the clause on not reciting underlying fields is a style instruction that could be trimmed; it is still short enough for one read.

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 single-parameter, non-annotated tool with no output schema, the description covers the return value, idempotent edge case, session-lock side effect, and recovery use cases. Everything an agent needs to call it correctly and to interpret the outcome is present.

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?

There is only one parameter and schema coverage is 100%, so the schema already documents runId. The description restates that runId identifies the task to cancel but adds no syntax, format, or sourcing detail beyond the schema, so the baseline 3 applies.

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?

The description gives a specific verb plus resource: cancel the task identified by runId, with a stated success result (status=aborted). It does not name any sibling tool, so the differentiation from oc_run/oc_wait/oc_last/oc_agents comes only from the described recovery scenarios rather than from an explicit contrast.

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

Usage Guidelines5/5

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

It states a hard invocation gate ('only call when the user explicitly says to stop/cancel') and two concrete situations where the tool is the right choice: a task stuck in running, or SESSION_BUSY blocking new tasks. Both when-to-use and when-not-to-use are explicit, leaving the agent no need to infer them.

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

Deploy Server

Other Tools