cancel_job_run #

View this page as Markdown

On this page

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://tzcloud.turnzero.ai/v1/cancel_job_run, with a bearer credential and the action's payload as the JSON body. An MCP connection lists this action as the tool tzcloud_cancel_job_run.

OAuth access tokens and minted tokens, including the turnzero command's computer token, are bearer credentials. The action determines which kinds, scopes and grants it accepts (Sign-in, sessions, and tokens).

Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

Contract description #

Cancel your job run. The service records an unfinished run as cancelled. If the run has already ended, the response shows its recorded outcome.

More about this action #

If a database size change or restore cannot start while a job runs, wait for the run to finish. A run that succeeds or fails with the provider's execution recorded stops blocking the database request when it ends. Cancelling a run before its timeout does not shorten this wait and can lengthen it. Cancel only if the owner authorizes it.

cancelled records the result in Turn Zero. The provider may still be stopping the container. If the provider stop fails, a later pass tries again. Read the run's outcome and check any data it may have written before repeating the work.

A run that Cloud began starting can still block the database request if it was cancelled, timed out or ended without a recorded provider execution. The block lasts until more than the run's timeout plus 90 seconds have passed since Cloud began starting it. For a retry estimate, add the job's timeout for that run plus three minutes to requested_at. Follow the database action's approval instructions.

Access and action metadata #

{
  "name": "cancel_job_run",
  "resource": "application",
  "tier": "reversible",
  "surface": "tzcloud",
  "addresses": [
    "tzcloud"
  ],
  "product": "cloud",
  "summary": "Cancel one unfinished job run. If the run has already ended, the response returns its current record. Use `read_job_runs` to check the recorded outcome. The service can record cancellation before the provider confirms the stop.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": true
  }
}

MCP catalog entry #

{
  "name": "cancel_job_run",
  "title": "Cancel a job run",
  "tier": "reversible",
  "scenario": "CHI-L0-09",
  "summary": "Cancel your job run. The service records an unfinished run as `cancelled`. If the run has already ended, the response shows its recorded outcome.",
  "owners": [
    "JOB-L0-05",
    "MAPI-04"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["application","run"]
/properties/application The application ID from list_applications.

Type: string
/properties/run A run ID from run_job or read_job_runs.

Type: string

response #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","run","detail"]
/properties/contract_version Required value: 1
/properties/reference The ten-character call reference. Include it if you report a problem.

Type: string
Pattern: ^[0-9a-f]{10}$
/properties/run $ref: #/shapes/job_run
/properties/detail A short explanation of the result.

Type: string

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "application",
      "run"
    ],
    "properties": {
      "application": {
        "type": "string",
        "description": "The application ID from `list_applications`."
      },
      "run": {
        "type": "string",
        "description": "A run ID from `run_job` or `read_job_runs`."
      }
    }
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "run",
      "detail"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "reference": {
        "type": "string",
        "pattern": "^[0-9a-f]{10}$",
        "description": "The ten-character call reference. Include it if you report a problem."
      },
      "run": {
        "$ref": "#/shapes/job_run"
      },
      "detail": {
        "type": "string",
        "description": "A short explanation of the result."
      }
    }
  }
}

Shared contracts #