Skip to content

wait_for_update

Observe one known Core update ID with reads only; available without operate. Wait up to 1..30 seconds (default 10), at most 10 lookups, at least one second after each unfinished response. Return the ID, latest bounded observation and explicit end reason. A local deadline, request cap, read failure or cancelled wait is incomplete observation, not remote operation failure/cancellation. Resume with this tool or get_update in a new session using the same saved ID; never execute again to resume. Core Complete plus its success field determines final outcome; it does not establish workload health. Use fleet_health/stack_diagnose/logs separately. MCP cancellation stops local polling; save the ID before waiting because cancelled requests may have no response.

Availability

Available under the default capability policy

The instance’s tool selection and upstream Core permissions also apply. Some inputs require additional grants.

Effect annotations

  • readOnlyHint — true
  • destructiveHint — false
  • idempotentHint — true

Inputs

The registered schema gives field types, alternatives and declared bounds. The description and operator guides also cover checks applied at runtime.

id
Required · type "string" · pattern "^[0-9a-fA-F]{24}$"
timeout_seconds
Total local observation budget, including Core requests and sleeps. type "integer" · minimum 1 · maximum 30 · default 10
Show input JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "id": {
      "pattern": "^[0-9a-fA-F]{24}$",
      "type": "string"
    },
    "timeout_seconds": {
      "default": 10,
      "description": "Total local observation budget, including Core requests and sleeps.",
      "format": "uint8",
      "maximum": 30,
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "id"
  ],
  "type": "object"
}

Output

The registered output schema covers structured results and tool errors.

WaitResult
elapsed_ms, end, latest_update, observation_error, poll_count, remote_cancellation_requested, update_id
AppError
candidates, correction, field, kind, message, operation, status
Show output JSON Schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "$ref": "#/$defs/WaitResult"
    },
    {
      "$ref": "#/$defs/AppError"
    }
  ],
  "$defs": {
    "ActionObservation": {
      "properties": {
        "cancellation_reported": {
          "type": "boolean"
        },
        "command_stage_found": {
          "type": "boolean"
        },
        "command_success": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "evidence_limit": {
          "type": "string"
        },
        "output_omitted": {
          "type": "boolean"
        },
        "stderr_present": {
          "type": "boolean"
        },
        "stdout_present": {
          "type": "boolean"
        }
      },
      "required": [
        "command_stage_found",
        "command_success",
        "stdout_present",
        "stderr_present",
        "cancellation_reported",
        "output_omitted",
        "evidence_limit"
      ],
      "type": "object"
    },
    "AppError": {
      "additionalProperties": false,
      "description": "Only application-owned messages and selected, nonsensitive metadata survive.",
      "properties": {
        "candidates": {
          "items": {
            "$ref": "#/$defs/Candidate"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "correction": {
          "type": [
            "string",
            "null"
          ]
        },
        "field": {
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "$ref": "#/$defs/ErrorKind"
        },
        "message": {
          "type": "string"
        },
        "operation": {
          "type": "string"
        },
        "status": {
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "message",
        "operation"
      ],
      "type": "object"
    },
    "BuildObservation": {
      "properties": {
        "deployment_result_evidence": {
          "type": "string"
        },
        "evidence_limit": {
          "type": "string"
        },
        "image_evidence_ambiguous": {
          "type": "boolean"
        },
        "image_evidence_incomplete": {
          "type": "boolean"
        },
        "images": {
          "items": {
            "$ref": "#/$defs/ImageObservation"
          },
          "type": "array"
        },
        "registry_push_failure_reported": {
          "type": "boolean"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "version_evidence": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "version_evidence",
        "images",
        "image_evidence_incomplete",
        "image_evidence_ambiguous",
        "registry_push_failure_reported",
        "deployment_result_evidence",
        "evidence_limit"
      ],
      "type": "object"
    },
    "Candidate": {
      "additionalProperties": false,
      "description": "A bounded ambiguity hint, never a raw upstream resource.",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "ErrorKind": {
      "description": "Stable public categories. No variant contains a raw upstream error.",
      "enum": [
        "invalid_arguments",
        "not_found",
        "ambiguous_target",
        "incomplete_resolution",
        "configuration",
        "authentication",
        "permission_denied",
        "timeout",
        "unreachable",
        "upstream",
        "invalid_response",
        "response_too_large",
        "capability_disabled",
        "unsupported_target",
        "stale_preview",
        "invalid_preview"
      ],
      "type": "string"
    },
    "ExecutionEvent": {
      "properties": {
        "event": {
          "type": "string"
        },
        "operation": {
          "type": "string"
        },
        "stage_event_index": {
          "format": "uint",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "terminal_success": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "operation",
        "event",
        "stage_event_index",
        "terminal_success"
      ],
      "type": "object"
    },
    "HistoryTarget": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "description": "Stable resource ID; System uses its literal system identifier.",
          "type": "string"
        },
        "kind": {
          "$ref": "#/$defs/ResourceKind"
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "type": "object"
    },
    "ImageEventKind": {
      "enum": [
        "tagged",
        "manifest_push_reported"
      ],
      "type": "string"
    },
    "ImageObservation": {
      "properties": {
        "digest": {
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "$ref": "#/$defs/ImageEventKind"
        },
        "reference": {
          "type": "string"
        },
        "stage_index": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "stage_success": {
          "type": "boolean"
        }
      },
      "required": [
        "reference",
        "digest",
        "kind",
        "stage_index",
        "stage_success"
      ],
      "type": "object"
    },
    "ProcedureObservation": {
      "properties": {
        "cancellation_reported": {
          "type": "boolean"
        },
        "child_results_complete": {
          "type": "boolean"
        },
        "evidence_ambiguous": {
          "type": "boolean"
        },
        "evidence_incomplete": {
          "type": "boolean"
        },
        "evidence_limit": {
          "type": "string"
        },
        "executions": {
          "items": {
            "$ref": "#/$defs/ExecutionEvent"
          },
          "type": "array"
        },
        "failed_stage_reported": {
          "type": [
            "string",
            "null"
          ]
        },
        "permission_denial_reported": {
          "type": "boolean"
        },
        "reported_child_update_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "stages": {
          "items": {
            "$ref": "#/$defs/StageEvent"
          },
          "type": "array"
        }
      },
      "required": [
        "stages",
        "executions",
        "reported_child_update_ids",
        "evidence_incomplete",
        "evidence_ambiguous",
        "cancellation_reported",
        "permission_denial_reported",
        "failed_stage_reported",
        "child_results_complete",
        "evidence_limit"
      ],
      "type": "object"
    },
    "ResourceKind": {
      "enum": [
        "system",
        "swarm",
        "server",
        "stack",
        "deployment",
        "build",
        "repo",
        "procedure",
        "action",
        "builder",
        "alerter",
        "resource_sync"
      ],
      "type": "string"
    },
    "RevisionObservation": {
      "properties": {
        "evidence": {
          "description": "update_commit_hash or the pinned Repo Latest Commit stage. Never inferred\nfrom a configured branch or the resource's mutable current cache.",
          "type": "string"
        },
        "revision": {
          "type": "string"
        }
      },
      "required": [
        "revision",
        "evidence"
      ],
      "type": "object"
    },
    "StageEvent": {
      "properties": {
        "event": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "event"
      ],
      "type": "object"
    },
    "SyncBatchReport": {
      "properties": {
        "phase": {
          "type": "string"
        },
        "stage": {
          "type": "string"
        },
        "success_reported": {
          "type": "boolean"
        }
      },
      "required": [
        "stage",
        "phase",
        "success_reported"
      ],
      "type": "object"
    },
    "SyncObservation": {
      "properties": {
        "batches": {
          "items": {
            "$ref": "#/$defs/SyncBatchReport"
          },
          "type": "array"
        },
        "child_deployment_success_verified": {
          "type": "boolean"
        },
        "deployment_batches_failed": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "evidence_incomplete": {
          "type": "boolean"
        },
        "evidence_limit": {
          "type": "string"
        },
        "no_changes_reported": {
          "type": "boolean"
        },
        "partial_changes_possible": {
          "type": "boolean"
        },
        "raw_output_omitted": {
          "type": "boolean"
        },
        "resource_batches_failed": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "workload_health_verified": {
          "type": "boolean"
        }
      },
      "required": [
        "batches",
        "resource_batches_failed",
        "deployment_batches_failed",
        "no_changes_reported",
        "evidence_incomplete",
        "raw_output_omitted",
        "partial_changes_possible",
        "child_deployment_success_verified",
        "workload_health_verified",
        "evidence_limit"
      ],
      "type": "object"
    },
    "TestObservation": {
      "properties": {
        "core_report": {
          "type": "string"
        },
        "evidence_limit": {
          "type": "string"
        },
        "independently_observed_receipt": {
          "type": "string"
        },
        "provider_attempt": {
          "type": "string"
        }
      },
      "required": [
        "core_report",
        "provider_attempt",
        "independently_observed_receipt",
        "evidence_limit"
      ],
      "type": "object"
    },
    "UpdateDetail": {
      "additionalProperties": false,
      "properties": {
        "end_ts": {
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "observed_action_result": {
          "anyOf": [
            {
              "$ref": "#/$defs/ActionObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_alerter_test": {
          "anyOf": [
            {
              "$ref": "#/$defs/TestObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_build_result": {
          "anyOf": [
            {
              "$ref": "#/$defs/BuildObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_procedure_result": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProcedureObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_revision": {
          "anyOf": [
            {
              "$ref": "#/$defs/RevisionObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_sync_result": {
          "anyOf": [
            {
              "$ref": "#/$defs/SyncObservation"
            },
            {
              "type": "null"
            }
          ]
        },
        "operation": {
          "type": "string"
        },
        "outcome": {
          "$ref": "#/$defs/UpdateOutcome"
        },
        "stages": {
          "description": "At most 20 stages, failures first, preserving original index/order within each group.",
          "items": {
            "$ref": "#/$defs/UpdateStage"
          },
          "type": "array"
        },
        "stages_truncated": {
          "type": "boolean"
        },
        "start_ts": {
          "description": "Unix milliseconds.",
          "format": "int64",
          "type": "integer"
        },
        "status": {
          "$ref": "#/$defs/UpdateStatus"
        },
        "target": {
          "$ref": "#/$defs/HistoryTarget"
        }
      },
      "required": [
        "id",
        "operation",
        "start_ts",
        "target",
        "status",
        "outcome",
        "end_ts",
        "stages",
        "stages_truncated"
      ],
      "type": "object"
    },
    "UpdateOutcome": {
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed"
      ],
      "type": "string"
    },
    "UpdateStage": {
      "additionalProperties": false,
      "properties": {
        "end_ts": {
          "format": "int64",
          "type": "integer"
        },
        "index": {
          "description": "Original zero-based index, even when failed stages are prioritized.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "stage": {
          "type": "string"
        },
        "stage_truncated": {
          "type": "boolean"
        },
        "start_ts": {
          "format": "int64",
          "type": "integer"
        },
        "stderr": {
          "description": "Bounded redacted stderr only; command and stdout are never returned.",
          "type": "string"
        },
        "stderr_truncated": {
          "type": "boolean"
        },
        "success": {
          "type": "boolean"
        }
      },
      "required": [
        "index",
        "stage",
        "stage_truncated",
        "success",
        "start_ts",
        "end_ts",
        "stderr",
        "stderr_truncated"
      ],
      "type": "object"
    },
    "UpdateStatus": {
      "enum": [
        "queued",
        "running",
        "complete"
      ],
      "type": "string"
    },
    "WaitEnd": {
      "oneOf": [
        {
          "enum": [
            "deadline",
            "poll_limit",
            "cancelled",
            "observation_failed"
          ],
          "type": "string"
        },
        {
          "const": "complete",
          "description": "Core reported Complete. Use latest_update.outcome for success or failure.",
          "type": "string"
        }
      ]
    },
    "WaitResult": {
      "additionalProperties": false,
      "properties": {
        "elapsed_ms": {
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "end": {
          "$ref": "#/$defs/WaitEnd"
        },
        "latest_update": {
          "anyOf": [
            {
              "$ref": "#/$defs/UpdateDetail"
            },
            {
              "type": "null"
            }
          ],
          "description": "Preserved across a later timeout, cancellation or read failure."
        },
        "observation_error": {
          "anyOf": [
            {
              "$ref": "#/$defs/AppError"
            },
            {
              "type": "null"
            }
          ],
          "description": "A gap in local observation, not evidence of remote execution failure."
        },
        "poll_count": {
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "remote_cancellation_requested": {
          "type": "boolean"
        },
        "update_id": {
          "type": "string"
        }
      },
      "required": [
        "update_id",
        "end",
        "poll_count",
        "elapsed_ms",
        "latest_update",
        "observation_error",
        "remote_cancellation_requested"
      ],
      "type": "object"
    }
  }
}

Operator guides

All built-in tools