Skip to main content
Glama

Cancel a job

hydracept_cancel_job
DestructiveIdempotent

Request cancellation of one job. Use only when the user explicitly asks to cancel the job itself; stopping a local polling loop is not a cancellation. Returns whether the request was accepted, whether the job is already terminal, and the next action. Never promise that upstream provider work stopped or that already-incurred cost is refunded. Safe to retry: a terminal job reports its terminal state. Requires bearer key. Returns: Cancellation outcome envelope with job status, terminal flag, and next action. Errors: WORKSPACE_KEY_REQUIRED, NOT_FOUND, INVALID_ARGUMENT.

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

Input Schema

NameRequiredDescriptionDefault
job_idYesRequired job id to cancel. Use hydracept_jobs_find if the id is unknown.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / job_id / description
      Added value: +"Required job id to cancel. Use hydracept_jobs_find if the id is unknown."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description builds on that rather than repeating it: it clarifies that this is a cancellation *request* that may not be accepted, that upstream work and incurred cost cannot be promised back, and that retries are safe because terminal jobs report their state. It also adds auth requirements (bearer key) and concrete error codes.

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?

Front-loaded with purpose and the when-not condition, and most sentences carry distinct information (retry safety, auth, errors). There is mild redundancy between the opening "Returns whether the request was accepted..." and the later "Returns: Cancellation outcome envelope..." line, which repeats return information already covered by the output schema.

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, single-parameter mutation with an output schema, the definition covers everything an agent needs: preconditions, retry behavior, auth requirement, enumerated error codes, and explicit limits on what can be promised to the user about upstream work and refunds.

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% and the single job_id parameter already documents itself, including the pointer to hydracept_jobs_find for unknown ids. The description adds no format, sourcing, or validation detail beyond what the schema provides, so the baseline of 3 applies.

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?

States a specific verb and resource ("Request cancellation of one job") and immediately distinguishes the action from an adjacent concept the agent might confuse it with (stopping a local polling loop). The scope is unmistakable relative to siblings like hydracept_job_status or hydracept_submit_job.

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?

Gives an explicit positive condition (user explicitly asks to cancel the job) and an explicit negative one (stopping a local polling loop is not a cancellation). It also states retry semantics ("Safe to retry: a terminal job reports its terminal state"), which tells the agent how to behave after an ambiguous outcome.

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.