record_incident

Generated automatically from the published contract sources.

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.

A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/record_incident, with a bearer credential and the action's payload as the JSON body.

Contract description

Open a platform incident, or amend one by its id: close it, reopen it, append an update, or replace a field. Super-admin (platform operator) only. A backfilled closed incident is one call with its instants in the past; a repeated open request answers the row it repeats.

Access and action metadata

{
  "name": "record_incident",
  "resource": "account",
  "tier": "reversible",
  "clients": [
    "bearer",
    "browser_session"
  ],
  "grant": "super_admin",
  "summary": "Super-admin: record a platform incident by hand. With no `incident` member the request opens a row (`title`, `kind`, and `summary` required; `opened_at`, `first_failure_at`, and `closed_at` admitted in the past, so a backfilled closed incident is one call), a repeated open request answering the row it repeats; with `incident` it amends the named row — `closed_at` closes, `closed_at` null reopens, `update` appends, any other member replaces its field — refusing `incident_not_found` for a row the record does not hold and `invalid_request` for instants out of order or in the future, a text past its bound, or an update past the 200-entry bound.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": true,
    "openWorldHint": false
  }
}

MCP catalog entry

{
  "name": "record_incident",
  "tier": "reversible",
  "scenario": "API-L0-12",
  "summary": "Open a platform incident, or amend one by its id: close it, reopen it, append an update, or replace a field. Super-admin (platform operator) only. A backfilled closed incident is one call with its instants in the past; a repeated open request answers the row it repeats.",
  "owners": []
}

request

JSON pointer Description and constraints
"" (root) The open form (no `incident`): title, kind, and summary required, the instants admitted in the past. The amend form (`incident`): every other member replaces its field, closed_at carries the state, update appends; a request with no member but incident is refused. Both forms refuse invalid_request naming the member for a wrong type, an instant that does not parse or lies in the future, closed_at before opened_at, first_failure_at after closed_at, a text past its bound, or an unknown component.

Type: object
Required fields: []
/properties/incident absent opens a row; present amends the row it names, refused incident_not_found where the record does not hold it

Type: string
/properties/title required on the open form; the repeat rule compares it

Type: string
Maximum length: 200
/properties/kind required on the open form

Type: string
Allowed values: ["planned","unplanned"]
/properties/summary required on the open form

Type: string
Maximum length: 4000
/properties/cause Type: ["string","null"]
Maximum length: 4000
/properties/components each a component name the record knows, from the current component list or the sampled record, or a watched subject of the conditions' grammar under a coded condition name. Empty is admitted, and the default on the open form; the first unknown name refuses invalid_request

Type: array
/properties/components/items Type: string
/properties/detection_source `operator` where absent on the open form; `automatic` is the prober's and `condition` the conditions pass's, each refused here, and an amend that would replace a condition incident's source is refused

Type: string
Allowed values: ["operator","backfill"]
/properties/opened_at ISO 8601, in the past; the instant of the call where absent on the open form; the repeat rule compares it where given

Type: string
/properties/first_failure_at ISO 8601, in the past, not after closed_at; null where absent on the open form; the repeat rule compares it

Type: ["string","null"]
/properties/closed_at ISO 8601, in the past, not before opened_at: a value closes the row (a backfilled closed incident is one open call), null reopens it on the amend form. Absent on the open form leaves the row open, and a repeat compares against closed rows only where it is given

Type: ["string","null"]
/properties/update amend form only: appended as an update carrying the operator's account and the instant; refused invalid_request at the 200-entry bound

Type: string
Maximum length: 4000

response

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","incident","outcome","detail"]
Additional properties: false
/properties/contract_version Required value: 1
/properties/incident the row as it stands after the call

Type: object
Required fields: ["id","kind","state","opened_at","first_failure_at","closed_at","duration_ms","title","components","summary","cause","detection_source","author","updates","retirements"]
/properties/incident/properties/id Type: string
/properties/incident/properties/kind Type: string
Allowed values: ["planned","unplanned"]
/properties/incident/properties/state always what closed_at says

Type: string
Allowed values: ["open","closed"]
/properties/incident/properties/opened_at when the incident opened, ISO 8601 in UTC

Type: string
/properties/incident/properties/first_failure_at the first failed minute the incident covers, ISO 8601 in UTC, or null

Type: ["string","null"]
/properties/incident/properties/closed_at when the incident closed, ISO 8601 in UTC, or null

Type: ["string","null"]
/properties/incident/properties/duration_ms closed_at − opened_at; null while open

Type: ["integer","null"]
/properties/incident/properties/title Type: string
/properties/incident/properties/components Type: array
/properties/incident/properties/components/items Type: string
/properties/incident/properties/summary Type: string
/properties/incident/properties/cause Type: ["string","null"]
/properties/incident/properties/detection_source `automatic` is the prober's and `condition` the conditions pass's, one open per watched subject; a hand row is `operator` or `backfill`

Type: string
Allowed values: ["automatic","operator","backfill","condition"]
/properties/incident/properties/author the account that opened the row, or `platform` for the pass's own

Type: string
/properties/incident/properties/updates the appended updates, oldest first, bounded at 200 entries

Type: array
/properties/incident/properties/updates/items Type: object
Required fields: ["at","author","text"]
/properties/incident/properties/updates/items/properties/at the update's instant, ISO 8601 in UTC

Type: string
/properties/incident/properties/updates/items/properties/author Type: string
/properties/incident/properties/updates/items/properties/text Type: string
/properties/incident/properties/retirements component to the instant of the pass that recorded its retirement

Type: object
/properties/incident/properties/retirements/additionalProperties Type: string
/properties/outcome `repeated` answers the row an open request repeats, nothing written

Type: string
Allowed values: ["opened","repeated","amended"]
/properties/detail Type: string

Complete payload contract

{
  "request": {
    "type": "object",
    "required": [],
    "properties": {
      "incident": {
        "type": "string",
        "description": "absent opens a row; present amends the row it names, refused incident_not_found where the record does not hold it"
      },
      "title": {
        "type": "string",
        "maxLength": 200,
        "description": "required on the open form; the repeat rule compares it"
      },
      "kind": {
        "type": "string",
        "enum": [
          "planned",
          "unplanned"
        ],
        "description": "required on the open form"
      },
      "summary": {
        "type": "string",
        "maxLength": 4000,
        "description": "required on the open form"
      },
      "cause": {
        "type": [
          "string",
          "null"
        ],
        "maxLength": 4000
      },
      "components": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "each a component name the record knows, from the current component list or the sampled record, or a watched subject of the conditions' grammar under a coded condition name. Empty is admitted, and the default on the open form; the first unknown name refuses invalid_request"
      },
      "detection_source": {
        "type": "string",
        "enum": [
          "operator",
          "backfill"
        ],
        "description": "`operator` where absent on the open form; `automatic` is the prober's and `condition` the conditions pass's, each refused here, and an amend that would replace a condition incident's source is refused"
      },
      "opened_at": {
        "type": "string",
        "description": "ISO 8601, in the past; the instant of the call where absent on the open form; the repeat rule compares it where given"
      },
      "first_failure_at": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 8601, in the past, not after closed_at; null where absent on the open form; the repeat rule compares it"
      },
      "closed_at": {
        "type": [
          "string",
          "null"
        ],
        "description": "ISO 8601, in the past, not before opened_at: a value closes the row (a backfilled closed incident is one open call), null reopens it on the amend form. Absent on the open form leaves the row open, and a repeat compares against closed rows only where it is given"
      },
      "update": {
        "type": "string",
        "maxLength": 4000,
        "description": "amend form only: appended as an update carrying the operator's account and the instant; refused invalid_request at the 200-entry bound"
      }
    },
    "description": "The open form (no `incident`): title, kind, and summary required, the instants admitted in the past. The amend form (`incident`): every other member replaces its field, closed_at carries the state, update appends; a request with no member but incident is refused. Both forms refuse invalid_request naming the member for a wrong type, an instant that does not parse or lies in the future, closed_at before opened_at, first_failure_at after closed_at, a text past its bound, or an unknown component."
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "incident",
      "outcome",
      "detail"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "incident": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "state",
          "opened_at",
          "first_failure_at",
          "closed_at",
          "duration_ms",
          "title",
          "components",
          "summary",
          "cause",
          "detection_source",
          "author",
          "updates",
          "retirements"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "planned",
              "unplanned"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "open",
              "closed"
            ],
            "description": "always what closed_at says"
          },
          "opened_at": {
            "type": "string",
            "description": "when the incident opened, ISO 8601 in UTC"
          },
          "first_failure_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "the first failed minute the incident covers, ISO 8601 in UTC, or null"
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "when the incident closed, ISO 8601 in UTC, or null"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "closed_at − opened_at; null while open"
          },
          "title": {
            "type": "string"
          },
          "components": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary": {
            "type": "string"
          },
          "cause": {
            "type": [
              "string",
              "null"
            ]
          },
          "detection_source": {
            "type": "string",
            "enum": [
              "automatic",
              "operator",
              "backfill",
              "condition"
            ],
            "description": "`automatic` is the prober's and `condition` the conditions pass's, one open per watched subject; a hand row is `operator` or `backfill`"
          },
          "author": {
            "type": "string",
            "description": "the account that opened the row, or `platform` for the pass's own"
          },
          "updates": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "at",
                "author",
                "text"
              ],
              "properties": {
                "at": {
                  "type": "string",
                  "description": "the update's instant, ISO 8601 in UTC"
                },
                "author": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            },
            "description": "the appended updates, oldest first, bounded at 200 entries"
          },
          "retirements": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "component to the instant of the pass that recorded its retirement"
          }
        },
        "description": "the row as it stands after the call"
      },
      "outcome": {
        "type": "string",
        "enum": [
          "opened",
          "repeated",
          "amended"
        ],
        "description": "`repeated` answers the row an open request repeats, nothing written"
      },
      "detail": {
        "type": "string"
      }
    },
    "additionalProperties": false
  }
}

Shared contracts