Cancel Job
Cancel a submitted or running job.
Use this tool to stop work the caller no longer wants, for example a run submitted against the wrong device or with the wrong shot count. Cancelling takes effect immediately from the caller’s point of view; the worker container is stopped in the background.
When to Use:
- Call this when the user asks to stop, abort, or kill a job.
- Call this before resubmitting a corrected job, so the superseded one stops consuming quota.
Constraints:
- Cancelling an already finished job is a no-op that reports the existing terminal status rather than an error.
- Cancellation is not reversible. Use
restart_jobto run the same job again afterwards.
Notes:
- This is a billable-work control, so confirm the job identity with the user before calling it when more than one job is in flight.
Args: job_id: Job identifier returned by a prior MCP submission or listing tool. user: Authenticated user resolved from the API key. db: Active database session.
Returns: The job identifier, its status after the call, and a summary of what changed.
Raises:
HTTPException: Raised with 404 when the job is not available to the
caller.
Authorizations
Path Parameters
Response
Successful Response
Represent the outcome of a job lifecycle action such as cancel or restart.
Attributes: job_id: Identifier of the affected job. status: Job status after the action was applied. context: Summary of what changed and the recommended next step.