Skip to main content
Glama

cancel_job

Cancel a pending or running agent job. Sets the job status to "cancelled". Use when the user asks to stop / abort / kill an in-progress job (e.g. "stop generating", "cancel the video render"). Resolve the jobId from list_running_jobs first if the user didn't supply one. Already-completed or already-failed jobs cannot be cancelled — the call returns an error in that case. CHARGE RULE for scene videos: once a render or one of its parts is charged its credits are spent, and cancelling does NOT refund them. In that case the first call never cancels: it answers needsConfirmation with the credits at stake and the parts already made (they stay). In the Promvie studio chat the server shows the user this question in its own words and does it only on their plain yes: never ask it yourself, never say it was done, and never call again with the confirm flag there. Through the API, tell your user exactly what is lost and, only after they agree in a later message, call again with the confirm flag and the confirmId it gave. A job nothing was charged for yet is cancelled at once. Never cancel a scene video merely to change its length or shots; let it finish, then regenerate.

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": {
      "movieId": "<movieId>",
      "jobId": "<jobId>"
    },
    "name": "cancel_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobIdYesagent_jobs.id of the job to cancel.
movieIdYesThe movie id (uuid) this call operates on. Get it from create_movie or list_movies.
confirmIdNoThrough the API: the confirmId from the needsConfirmation answer, sent back with confirmChargedRender. It confirms that one question, once.
confirmChargedRenderNoThrough the API only. Leave unset on the first call. Set true ONLY after this tool answered needsConfirmation (the render is already paid for) and your user agreed to lose those credits in a later message, in a separate later call that also sends the confirmId. In the studio chat the server answers the question itself: never set it there.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/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: it discloses the terminal state, the error case, the credit-charge/refund rule for scene video parts, and the two-call needsConfirmation protocol. It even differentiates behavior between the studio chat (server asks the user) and the API (agent must ask and re-call with confirmId) — context an agent could not infer from the schema alone.

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 trigger phrases, then the exception and charge rules. It is long but nearly every sentence is load-bearing; the only waste is partial duplication of the confirm-flag instructions already present in the schema descriptions for confirmId and confirmChargedRender.

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 side-effecting, no-annotation, no-output-schema mutation, everything an agent needs is present: preconditions, failure mode, cost consequences, confirmation protocol, and channel-specific behavior. Nothing material is left for the agent to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; however the description adds real meaning by telling the agent how to obtain jobId (list_running_jobs) and by explaining the sequencing of confirmChargedRender — first call unset, second call only after user agreement in a later message with the returned confirmId. That sequencing constraint exceeds what the per-field schema text conveys.

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 and resource ('Cancel a pending or running agent job') and the resulting state change ('sets the job status to "cancelled"'). It does not explicitly distinguish itself from the sibling cancel_render, which is the nearest alternative for an agent to confuse it with, so it stops just short of a 5.

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?

Explicit triggers are given ('user asks to stop / abort / kill an in-progress job'), plus the prerequisite resolution step via list_running_jobs when no jobId is supplied. It also names the when-not: completed/failed jobs error out, and a scene video should never be cancelled merely to change length or shots.

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.

Resources