Skip to main content
Glama

cancel_generation

Cancels a generation task by requestId, then checks until a final state is reached; tasks already in a terminal state remain unchanged.

Instructions

按 requestId 取消任务;取消后查询至终态,终态任务保持不变

Input Schema

NameRequiredDescriptionDefault
requestIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 does disclose two useful behaviors: cancellation is followed by polling to a terminal state, and already-terminal tasks are left unchanged (idempotent/no-op). It omits what happens on an unknown requestId, whether cancellation is reversible, and what the call returns, so disclosure is partial.

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?

A single compact sentence with the action front-loaded and the follow-up polling behavior attached after the semicolon. Nothing is wasted, though the phrasing is dense enough that the post-cancellation polling instruction could be missed.

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 the action, the post-cancel state check, and idempotency on terminal tasks. It still leaves the agent unsure about failure modes (invalid/completed requestId) and return value, which matters more here because no structured fields fill that gap.

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 coverage is 0% for the single parameter, so the description must compensate. '按 requestId' tells the agent the id identifies the task to cancel, which is the essential meaning, but gives no format, source (where to obtain the requestId), or error behavior for an invalid id.

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 names a specific verb and resource — cancel a task — and the keying parameter (requestId), which separates it cleanly from generate, submit_generation and get_generation. It stops short of explicitly contrasting itself with a sibling (e.g. get_generation for polling), 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?

'取消后查询至终态' implies the agent should poll for a terminal state after cancelling, and '终态任务保持不变' implicitly tells the agent that cancelling a finished task is a no-op. However it never names the polling tool (status/get_generation) or states explicit preconditions such as which task states are cancellable, so usage is only implied.

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