Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Cancel App Build

Use this to cancel an accepted app build before it publishes.

MCP name: cancel_app_build

Tool contract

{
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": true,
    "openWorldHint": false,
    "readOnlyHint": false,
    "title": "Cancel App Build"
  },
  "description": "Use this to cancel an accepted app build before it publishes. Repeating cancellation returns the same terminal status. Cancellation leaves accepted desired source editable and keeps the last active app running.",
  "execution": {
    "taskSupport": "forbidden"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
      "build_id": {
        "description": "Build ID returned by create_app or update_app.",
        "type": "string"
      }
    },
    "required": [
      "build_id"
    ],
    "type": "object"
  },
  "name": "cancel_app_build",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "acceptedAt": {
        "type": "string"
      },
      "activeRevision": {
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "appId": {
        "description": "Existing target app ID, or the created app ID after publication.",
        "type": "string"
      },
      "attempts": {
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "buildId": {
        "description": "Durable build ID. Use get_app_build to inspect progress or source.",
        "type": "string"
      },
      "deadline": {
        "type": "string"
      },
      "desiredRevision": {
        "maximum": 9007199254740991,
        "minimum": 0,
        "type": "integer"
      },
      "elapsedMs": {
        "minimum": 0,
        "type": "number"
      },
      "error": {
        "additionalProperties": false,
        "properties": {
          "column": {
            "description": "The 1-based column in `line`.",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          "details": {
            "anyOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "execution": {
                    "enum": [
                      "not_started",
                      "may_have_run"
                    ],
                    "type": "string"
                  },
                  "operationId": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "reservationId": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "execution",
                  "operationId"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "execution": {
                    "const": "may_have_run",
                    "type": "string"
                  }
                },
                "required": [
                  "execution"
                ],
                "type": "object"
              }
            ]
          },
          "kind": {
            "type": "string"
          },
          "line": {
            "description": "The 1-based line in `path`.",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "path": {
            "description": "The App file the failure points at, relative to the package root, when it points at one of the App's own files.",
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "specifier": {
            "type": "string"
          },
          "stage": {
            "description": "A stage only when the author's package caused the failure. `source`: the package was refused (its files, imports, or package.json, a size cap, a refused `connect-src` origin, a package name another App holds or that differs from the App's, or accepted source the current contract refuses); fix what the message names, in the file `path` names when given. `dependencies`: npm could not resolve or install the declared dependencies, or the tree has more packages than the limit; fix the package `specifier` names when given, its range in package.json, or trim the dependencies. `compile`: the compiler, or the check of the built server module, refused the App's code; fix the file and position named when given. Every other failure has no stage, because nothing in the package would fix it: a build sandbox, provider, executor, or database failing, a busy host, a cancellation, lost authority, an expired build or one that used up its attempts, an input Charming could not load, or a copy whose requested manifest id was taken. Save again.",
            "enum": [
              "source",
              "dependencies",
              "compile"
            ],
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "message",
          "retryable"
        ],
        "type": "object"
      },
      "finishedAt": {
        "type": [
          "string",
          "null"
        ]
      },
      "idempotencyExpiresAt": {
        "type": [
          "string",
          "null"
        ]
      },
      "inputDigest": {
        "type": "string"
      },
      "inspectionExpiresAt": {
        "type": [
          "string",
          "null"
        ]
      },
      "intent": {
        "description": "The accepted operation: create, update, migrate, restore, or copy.",
        "type": "string"
      },
      "lockDigest": {
        "type": "string"
      },
      "lockState": {
        "enum": [
          "locked",
          "unresolved"
        ],
        "type": "string"
      },
      "ok": {
        "const": true,
        "type": "boolean"
      },
      "queueDeadline": {
        "type": "string"
      },
      "resolvedDependencies": {
        "additionalProperties": {
          "type": "string"
        },
        "description": "Exact package versions the build resolved for the declared dependencies.",
        "propertyNames": {
          "type": "string"
        },
        "type": "object"
      },
      "retryAfterSeconds": {
        "description": "Wait at least this many seconds before polling again.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "revision": {
        "description": "Published app source revision.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      },
      "source": {
        "additionalProperties": false,
        "description": "Exact accepted source, returned only when include_source is true.",
        "properties": {
          "files": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "The accepted file tree: package.json, server.js, and any other files.",
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "files"
        ],
        "type": "object"
      },
      "sourceEtag": {
        "description": "The quoted ETag of the revision this build saved once an App exists; an HTTP save passes it as If-Match. It doesn't change after a later save; get_app_source returns the current revision. Before a creation publishes, the digest of the accepted input.",
        "type": "string"
      },
      "state": {
        "enum": [
          "queued",
          "resolving",
          "building",
          "validating",
          "published",
          "failed",
          "superseded",
          "canceled",
          "expired"
        ],
        "type": "string"
      },
      "statusUrl": {
        "description": "Authenticated HTTP status URL for this build.",
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "url": {
        "description": "App URL. Present only after successful publication.",
        "type": "string"
      }
    },
    "required": [
      "ok",
      "buildId",
      "intent",
      "state",
      "sourceEtag",
      "statusUrl",
      "attempts",
      "acceptedAt",
      "updatedAt",
      "finishedAt",
      "queueDeadline",
      "deadline",
      "inspectionExpiresAt",
      "idempotencyExpiresAt",
      "elapsedMs",
      "lockState",
      "inputDigest"
    ],
    "type": "object"
  }
}

Was this page helpful?