Skip to main content
Glama

Cancel Generation Job

generation_jobs_cancel
DestructiveIdempotent

Request cancellation of the identified queued or running generation. Work already performed can consume credits; cancellation does not establish a refund.

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

Input Schema

NameRequiredDescriptionDefault
jobIdYesJob ID returned by any generation_*_create tool.
workspaceIdNoOptional workspace ID. Defaults to the user's default workspace. UUID string.

Output Schema

NameRequiredDescriptionDefault
jobYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / job / properties / app_url
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed4 schema fields changed
    • addedOutput schema / properties / job / properties / audio_recovery
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "attempt": {
      +          "maximum": 16,
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "mode": {
      +          "const": "saved_audio_only",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "attempt",
      +        "mode"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / job / properties / content_direction
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "current": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "brandContentHash": {
      +              "type": "string"
      +            },
      +            "brandRevision": {
      +              "maximum": 9007199254740991,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "seriesContentHash": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "seriesRevision": {
      +              "anyOf": [
      +                {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "brandRevision",
      +            "brandContentHash",
      +            "seriesRevision",
      +            "seriesContentHash"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "snapshot": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "brand": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "contentHash": {
      +                  "type": "string"
      +                },
      +                "documentId": {
      +                  "anyOf": [
      +                    {
      +                      "format": "uuid",
      +                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "markdown": {
      +                  "type": "string"
      +                },
      +                "path": {
      +                  "type": "string"
      +                },
      +                "revision": {
      +                  "maximum": 9007199254740991,
      +                  "minimum": 0,
      +                  "type": "integer"
      +                },
      +                "sources": {
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "title": {
      +                        "maxLength": 240,
      +                        "type": "string"
      +                      },
      +                      "url": {
      +                        "format": "uri",
      +                        "maxLength": 2048,
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "url",
      +                      "title"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "title": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "title",
      +                "sources",
      +                "path",
      +                "documentId",
      +                "revision",
      +                "markdown",
      +                "contentHash"
      +              ],
      +              "type": "object"
      +            },
      +            "capturedAt": {
      +              "type": "string"
      +            },
      +            "scope": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "kind": {
      +                  "enum": [
      +                    "brand",
      +                    "series"
      +                  ],
      +                  "type": "string"
      +                },
      +                "name": {
      +                  "type": "string"
      +                },
      +                "seriesId": {
      +                  "anyOf": [
      +                    {
      +                      "format": "uuid",
      +                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "kind",
      +                "seriesId",
      +                "name"
      +              ],
      +              "type": "object"
      +            },
      +            "series": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "contentHash": {
      +                      "type": "string"
      +                    },
      +                    "documentId": {
      +                      "anyOf": [
      +                        {
      +                          "format": "uuid",
      +                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                          "type": "string"
      +                        },
      +                        {
      +                          "type": "null"
      +                        }
      +                      ]
      +                    },
      +                    "markdown": {
      +                      "type": "string"
      +                    },
      +                    "path": {
      +                      "type": "string"
      +                    },
      +                    "revision": {
      +                      "maximum": 9007199254740991,
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "sources": {
      +                      "items": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "title": {
      +                            "maxLength": 240,
      +                            "type": "string"
      +                          },
      +                          "url": {
      +                            "format": "uri",
      +                            "maxLength": 2048,
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "url",
      +                          "title"
      +                        ],
      +                        "type": "object"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "title": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "title",
      +                    "sources",
      +                    "path",
      +                    "documentId",
      +                    "revision",
      +                    "markdown",
      +                    "contentHash"
      +                  ],
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ]
      +            }
      +          },
      +          "required": [
      +            "capturedAt",
      +            "scope",
      +            "brand",
      +            "series"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "enum": [
      +        "current",
      +        "changed",
      +        "unavailable",
      +        "unrecorded"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "snapshot",
      +    "status",
      +    "current"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / job / properties / recovery
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "actions": {
      +          "items": {
      +            "enum": [
      +              "review_prompt",
      +              "choose_model",
      +              "request_review"
      +            ],
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "alternatives": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "acceptance": {
      +                "const": "unverified",
      +                "type": "string"
      +              },
      +              "aspectRatio": {
      +                "type": "string"
      +              },
      +              "estimatedCredits": {
      +                "type": "number"
      +              },
      +              "generateAudio": {
      +                "type": "boolean"
      +              },
      +              "label": {
      +                "type": "string"
      +              },
      +              "model": {
      +                "type": "string"
      +              },
      +              "outputResolution": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "requiresAssembly": {
      +                "type": "boolean"
      +              },
      +              "resolution": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "segments": {
      +                "items": {
      +                  "type": "number"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "model",
      +              "label",
      +              "segments",
      +              "estimatedCredits",
      +              "resolution",
      +              "outputResolution",
      +              "aspectRatio",
      +              "generateAudio",
      +              "requiresAssembly",
      +              "acceptance"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "credits": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "charged": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "net": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "refunded": {
      +              "type": [
      +                "number",
      +                "null"
      +              ]
      +            },
      +            "status": {
      +              "enum": [
      +                "not_charged",
      +                "charged",
      +                "refunded",
      +                "pending",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "status",
      +            "charged",
      +            "refunded",
      +            "net"
      +          ],
      +          "type": "object"
      +        },
      +        "failure": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "category": {
      +              "enum": [
      +                "copyright",
      +                "content_policy",
      +                "reference",
      +                "invalid_input",
      +                "temporary",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            },
      +            "message": {
      +              "type": "string"
      +            },
      +            "model": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "provider": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "retryable": {
      +              "type": "boolean"
      +            },
      +            "stage": {
      +              "enum": [
      +                "input",
      +                "output",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "category",
      +            "message",
      +            "stage",
      +            "retryable",
      +            "model",
      +            "provider"
      +          ],
      +          "type": "object"
      +        },
      +        "history": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "authoredPrompt": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "enhancementApplied": {
      +              "type": "boolean"
      +            },
      +            "originalRequest": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "previews": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "after": {
      +                    "type": "string"
      +                  },
      +                  "approach": {
      +                    "enum": [
      +                      "clarify",
      +                      "original_character"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "before": {
      +                    "type": "string"
      +                  },
      +                  "createdAt": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "before",
      +                  "after",
      +                  "approach",
      +                  "createdAt"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "previousJobId": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "providerRequests": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "id": {
      +                    "type": "string"
      +                  },
      +                  "provider": {
      +                    "type": "string"
      +                  },
      +                  "status": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "id",
      +                  "provider",
      +                  "status"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "references": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "settings": {
      +              "additionalProperties": {},
      +              "propertyNames": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "submittedPrompt": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "originalRequest",
      +            "authoredPrompt",
      +            "submittedPrompt",
      +            "enhancementApplied",
      +            "previousJobId",
      +            "previews",
      +            "settings",
      +            "references",
      +            "providerRequests"
      +          ],
      +          "type": "object"
      +        },
      +        "jobId": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "reviewUrl": {
      +          "type": "string"
      +        },
      +        "runId": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "jobId",
      +        "runId",
      +        "failure",
      +        "credits",
      +        "history",
      +        "alternatives",
      +        "actions",
      +        "reviewUrl"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / job / required
      Previous value: -[
      -  "job_id",
      -  "kind",
      -  "status",
      -  "progress"
      -]New value: +[
      +  "job_id",
      +  "kind",
      +  "status",
      +  "progress",
      +  "content_direction"
      +]
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds genuinely new consequences: work already performed can consume credits and cancellation does not imply a refund, which an agent cannot infer from structured fields. It does not describe whether cancellation is immediate or eventual beyond the word 'Request'.

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?

Two tight sentences with zero filler, leading with the action and following with the cost/refund caveat. Every clause carries information an agent needs.

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?

For a single-parameter mutation with an output schema and full annotation coverage, the definition covers purpose, cost implications, and refund expectations. The only gap is post-cancellation state behavior (immediate vs. eventual effect), which the output schema presumably handles.

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%, with jobId and workspaceId both documented, so the baseline is 3. The description adds no meaning about the parameters beyond 'the identified' job, leaving the schema to carry parameter semantics entirely.

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 ('Request cancellation of the identified ... generation') and narrows scope to 'queued or running' jobs. It is clearly distinguishable from generation_jobs_get, though it does not name any sibling or alternative path explicitly.

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?

Usage is implied rather than stated: the 'queued or running' phrasing tells the agent the job must still be in flight, and the schema note that jobId comes from generation_*_create implies the workflow. There is no explicit when-not guidance (e.g., what to do if the job already completed) or named alternative.

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