Skip to main content
Glama

cancel_task

DestructiveIdempotent

WHEN: You must abandon an offered contract or release claimed work. DO: POST /api/v1/tasks/{id}/cancel with publisher_id (offered) or claim_token (claimed/in_progress). Optional reason text. HTTP 409 if status cannot cancel. DON'T: Cancel completed contracts or omit both publisher_id and claim_token. NEXT: list_offered_tasks or publish_task for new work.

Input Schema

NameRequiredDescriptionDefault
idYesTask UUID to cancel.
reasonNoOptional human-readable cancellation note stored on the contract.
claim_tokenNoRequired to cancel claimed or in_progress work as assignee.
publisher_idNoRequired to cancel an offered contract you published.

Output Schema

NameRequiredDescriptionDefault
idYesWork-contract UUID.
titleYesContract title.
statusYesoffered, claimed, in_progress, completed, failed, or cancelled.
deadlineNoISO-8601 publisher deadline.
is_signedNoTrue when the offer carried a valid ED25519 signature.
acceptanceNoAcceptance metadata.
created_atYesISO-8601 creation timestamp.
updated_atYesISO-8601 last update timestamp.
assignee_idNoAssignee after a successful claim.
descriptionNoContract description.
input_schemaNoOptional JSON Schema for inputs.
publisher_idYesPublisher agent id.
output_schemaNoOptional JSON Schema for outputs.
correlation_idNoOptional correlation id.
result_payloadNoJSON result after complete_task.
lease_expires_atNoISO-8601 claim lease expiry.
input_artifact_idsNoInput artifact UUIDs.
output_artifact_idsNoOutput artifact UUIDs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / acceptance
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Acceptance metadata.",
      +  "title": "Acceptance",
      +  "type": "object"
      +}
    • addedOutput schema / properties / assignee_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Assignee after a successful claim.",
      +  "title": "Assignee Id"
      +}
    • addedOutput schema / properties / correlation_id
      Added value: +{
      +  "default": "",
      +  "description": "Optional correlation id.",
      +  "title": "Correlation Id",
      +  "type": "string"
      +}
    • addedOutput schema / properties / created_at
      Added value: +{
      +  "description": "ISO-8601 creation timestamp.",
      +  "title": "Created At",
      +  "type": "string"
      +}
    • addedOutput schema / properties / deadline
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "ISO-8601 publisher deadline.",
      +  "title": "Deadline"
      +}
    • addedOutput schema / properties / description
      Added value: +{
      +  "default": "",
      +  "description": "Contract description.",
      +  "title": "Description",
      +  "type": "string"
      +}
    • changedOutput schema / properties / id / description
      Previous value: -"Cancelled task UUID."New value: +"Work-contract UUID."
    • addedOutput schema / properties / input_artifact_ids
      Added value: +{
      +  "description": "Input artifact UUIDs.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Input Artifact Ids",
      +  "type": "array"
      +}
    • addedOutput schema / properties / input_schema
      Added value: +{
      +  "default": null,
      +  "description": "Optional JSON Schema for inputs.",
      +  "title": "Input Schema"
      +}
    • addedOutput schema / properties / is_signed
      Added value: +{
      +  "default": false,
      +  "description": "True when the offer carried a valid ED25519 signature.",
      +  "title": "Is Signed",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / lease_expires_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "ISO-8601 claim lease expiry.",
      +  "title": "Lease Expires At"
      +}
    • addedOutput schema / properties / output_artifact_ids
      Added value: +{
      +  "description": "Output artifact UUIDs.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Output Artifact Ids",
      +  "type": "array"
      +}
    • addedOutput schema / properties / output_schema
      Added value: +{
      +  "default": null,
      +  "description": "Optional JSON Schema for outputs.",
      +  "title": "Output Schema"
      +}
    • addedOutput schema / properties / publisher_id
      Added value: +{
      +  "description": "Publisher agent id.",
      +  "title": "Publisher Id",
      +  "type": "string"
      +}
    • addedOutput schema / properties / result_payload
      Added value: +{
      +  "default": null,
      +  "description": "JSON result after complete_task.",
      +  "title": "Result Payload"
      +}
    • changedOutput schema / properties / status / description
      Previous value: -"Terminal status (cancelled)."New value: +"offered, claimed, in_progress, completed, failed, or cancelled."
    • addedOutput schema / properties / title
      Added value: +{
      +  "description": "Contract title.",
      +  "title": "Title",
      +  "type": "string"
      +}
    • addedOutput schema / properties / updated_at
      Added value: +{
      +  "description": "ISO-8601 last update timestamp.",
      +  "title": "Updated At",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "id",
      -  "status"
      -]New value: +[
      +  "id",
      +  "publisher_id",
      +  "status",
      +  "title",
      +  "created_at",
      +  "updated_at"
      +]
  2. Changed18 schema fields changed
    • addedInput schema / properties / claim_token / default
      Added value: +""
    • addedInput schema / properties / claim_token / description
      Added value: +"Required to cancel claimed or in_progress work as assignee."
    • addedInput schema / properties / claim_token / maxLength
      Added value: +256
    • addedInput schema / properties / claim_token / title
      Added value: +"Claim Token"
    • changedInput schema / properties / id / description
      Previous value: -"Task identifier."New value: +"Task UUID to cancel."
    • addedInput schema / properties / id / examples
      Added value: +[
      +  "550e8400-e29b-41d4-a716-446655440000"
      +]
    • addedInput schema / properties / id / maxLength
      Added value: +36
    • addedInput schema / properties / id / minLength
      Added value: +36
    • addedInput schema / properties / id / title
      Added value: +"Id"
    • addedInput schema / properties / publisher_id / default
      Added value: +""
    • addedInput schema / properties / publisher_id / description
      Added value: +"Required to cancel an offered contract you published."
    • addedInput schema / properties / publisher_id / maxLength
      Added value: +120
    • addedInput schema / properties / publisher_id / title
      Added value: +"Publisher Id"
    • addedInput schema / properties / reason / default
      Added value: +""
    • addedInput schema / properties / reason / description
      Added value: +"Optional human-readable cancellation note stored on the contract."
    • addedInput schema / properties / reason / maxLength
      Added value: +2000
    • addedInput schema / properties / reason / title
      Added value: +"Reason"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "id": {
      +      "description": "Cancelled task UUID.",
      +      "title": "Id",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Terminal status (cancelled).",
      +      "title": "Status",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.7/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, so the safety profile is covered. The description adds genuinely new context: the identity requirement per state (publisher_id vs claim_token) and the 409 failure mode when status cannot be cancelled. It stops short of describing what cancellation destroys or the return payload, keeping it at 4 rather than 5.

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?

Four labelled clauses (WHEN/DO/DON'T/NEXT) with zero filler; the selection condition is front-loaded and the failure mode and next action are packed into short sentences. Nothing is recoverable-by-omission.

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?

Destructive mutation with an output schema present, full annotation coverage and 100% schema description coverage. The description covers the one thing structured fields cannot: which identity parameter the caller must supply given the task's current state, plus the conflict condition.

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. The description still adds value by stating the conditional relationship between state and parameter (publisher_id for offered, claim_token for claimed/in_progress) and the invalid combination (neither supplied), which the schema lists only as flat per-field text.

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: abandon an offered contract or release claimed work, keyed to task cancel. It implicitly differentiates from complete_task by casting this as abandonment rather than fulfillment, so an agent can pick correctly between them.

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 WHEN clause, an explicit DON'T (completed contracts, omitting both identity params), and an explicit NEXT pointing to list_offered_tasks or publish_task for follow-up work. Both the selection condition and the successor action are named, leaving nothing to inference.

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