Skip to main content
Glama

cancel_job

Stop a running or queued PixInsight job started with async. Running jobs halt at the next processEvents call, and completed changes remain.

Instructions

Stop a job started by run_pjsr or run_pjsr_file with async. A job PixInsight has not started yet is removed and never runs. A running job is stopped at its next processEvents() call, where an error with MCP_CANCELLED ends the script; a native process call (a single long process, a file save) cannot be interrupted, so the stop takes effect after it returns, and what the script already changed stays changed. Without job_id: the running job. job_status reports the outcome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idNoThe id run_pjsr returned. Omit for the running job.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.1

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: a not-yet-started job is removed and never runs, a running job stops at its next processEvents() call with an MCP_CANCELLED error, native process calls cannot be interrupted, and already-applied changes persist. These are exactly the consequences an agent needs before invoking a destructive stop.

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 the action, then layered with the important state-dependent behavior. It is longer than most definitions but nearly every clause conveys a distinct operational fact; the default-target sentence could be folded in more tightly.

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 parameterless-required cancellation tool with no output schema and no annotations, the description covers targeting, timing, interruption limits, and where to read the result. Nothing an agent needs to call it safely is missing.

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 100% and the single parameter's description already states 'Omit for the running job,' which the prose merely restates. Baseline 3 applies since the schema does the work and the description adds no new syntax or format detail.

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 ('Stop a job') and names exactly which tools create such jobs (run_pjsr, run_pjsr_file with async), so the agent can place it precisely among siblings. It also implicitly distinguishes itself from job_status, which reports rather than cancels.

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?

Explains the trigger condition (a job started asynchronously) and the two distinct states it applies to, plus routes the agent to job_status for the outcome. It does not name an explicit when-not-to-use case, but the context is unambiguous for a one-param tool.

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