Skip to main content
Glama

取消尚未执行的任务

cancel_job
Idempotent

Atomically cancels queued jobs only, returning a conflict for already-started jobs and safely handling repeated cancellation requests.

Instructions

只原子取消QUEUED任务。已经开始的任务返回冲突,不发送任何上游取消或重试。重复取消原任务安全。

Input Schema

NameRequiredDescriptionDefault
jobIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantive behavior beyond the annotations: atomicity, a conflict result for started jobs, and the crucial fact that no upstream cancel or retry is dispatched. These are non-obvious side-effect guarantees that annotations (idempotentHint/destructiveHint) cannot convey, and the idempotency claim is consistent with idempotentHint=true.

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?

Three short sentences, front-loaded with the scoping constraint, then failure behavior, then idempotency. No wasted text.

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 one-parameter mutation tool with no output schema, it covers the important semantics (scope, conflict case, no upstream effects). It leaves the success response shape unstated, which an agent may want before calling.

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?

One parameter with 0% schema description coverage; the description only implies the job identity via '原任务' and adds no format details, while the schema supplies just a hex pattern. Adequate but does not compensate meaningfully for the missing description.

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 (cancel) and a tightly scoped resource ('只原子取消QUEUED任务'), so an agent can distinguish it from list_jobs/get_job/submit_job by scope alone. It does not name a sibling alternative explicitly, which keeps it just below the top mark.

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?

Gives clear conditions: works on QUEUED jobs, returns conflict for already-started jobs, and is safe to repeat. No explicit 'check with get_job first' guidance or naming of alternatives, so it stops short of full when/when-not/alternatives coverage.

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