Skip to main content
Glama

Cancel Gemini Job

gemini-cancel
DestructiveIdempotent

Cancels an in-flight Gemini job by sending SIGTERM to its subprocess; returns an already-finished status when no cancellation is needed.

Instructions

Cancel an in-flight Gemini job. Sends SIGTERM to the subprocess. Idempotent: if the job is already done, returns { cancelled: false, alreadyDone: true }.

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": {
      "jobId": "<jobId>"
    },
    "name": "gemini-cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesJob ID returned by ask-gemini or gemini-reply

Output Schema

NameRequiredDescriptionDefault
cancelledYes
alreadyDoneYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false; the description goes beyond them by naming the mechanism (SIGTERM to the subprocess) and the exact already-done response shape. What it omits is the fate of any output produced before cancellation, which matters for a destructive operation.

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, each earning its place: purpose first, mechanism second, edge case third. Nothing is padded or restated.

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?

With an output schema present, the description need not enumerate return values, yet it usefully documents the already-done case. It stops just short of covering what happens to cancelled job output or the response for an invalid jobId, which are minor gaps for a one-parameter tool.

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 a single parameter with 100% schema description coverage that already explains jobId originates from ask-gemini or gemini-reply. The description adds no further meaning about the ID's format, lifetime, or behavior on an unknown ID, so the baseline 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+resource+scope: 'Cancel an in-flight Gemini job.' An agent can immediately tell this terminates a running job rather than querying or creating one, and no sibling tool in the list performs cancellation, so the distinction is unambiguous.

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?

The phrase 'in-flight' implies the usage condition (job still running), and the already-done branch hints at what happens when it isn't. However, it names no alternatives or prerequisites — e.g., whether to poll status first or how to retrieve partial output after cancelling — so guidance is implied rather than explicit.

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