Skip to main content
Glama

cancel_agent

Request cancellation for a running or waiting subagent, then verify termination with get_agent; the request alone does not free its slot.

Instructions

実行・待機中の子へ取消を要求する。取消要求だけで枠を返さず、終了後にget_agentで確定を確認する

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": {
      "job_id": "<job_id>"
    },
    "name": "cancel_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses the one important non-obvious trait: cancellation is asynchronous and does not release the slot by itself; the agent must poll get_agent to confirm termination. That is exactly the kind of context an agent needs to use the tool correctly. It does not say what happens if the target has already terminated, whether the call is idempotent, or whether cancellation is reversible, leaving real gaps.

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, and the most important constraint (it does not free the slot, verify with get_agent afterwards) is placed immediately after the purpose. No filler or restatement of the tool name.

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 single-parameter, non-output-schema tool, the lifecycle semantics and required follow-up are covered well enough to call it correctly. Missing are the terminal-state/edge-case behavior and the return value shape (for example, whether an acknowledgement or a status is returned), which would matter for an agent orchestrating children.

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 0%; job_id is documented only as a UUID pattern with no prose in the schema. The description only implies through 子 that the id refers to a child agent, and it never explains whether it must be a direct child, a job id versus conversation id, or what happens with a non-existent or already-finished id. This is minimal compensation for a fully undocumented parameter.

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 states a specific verb and object of the action: request cancellation of a child that is running or waiting (実行・待機中の子). It scopes the tool precisely to in-progress children, which separates it from lifecycle siblings like start_agent or get_agent. It stops short of naming which sibling would handle an already-finished agent, so it is not a full 5.

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 concrete usage guidance: call this for running/waiting children, and after calling it, confirm the result with get_agent. It explicitly warns that the cancellation request alone does not free the slot (枠を返さず), which tells the agent not to treat a return as completion. It lacks explicit prerequisites (for example, which permissions are needed or whether non-child jobs are allowed), so it is not a 5.

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