Skip to content

wait_for_resource_sync_update

Resume one explicitly known RunSync update ID with the retained sync/scope binding, including after MCP restart. Read-only; no refresh, execute, replay or remote cancellation. Validate stable sync ID and RunSync operation on EVERY poll, preserve matching prior evidence on mismatch/read failure, and stop within 1–30 seconds or ten polls. Core history does not record reliable selectors or invocation ownership; retained selection is an expectation, never inferred attribution. Unknown-ID recovery candidates from reconcile_operation remain unconfirmed. Parent completion/batch success does not verify child deployments or workload health; inspect resources and health independently. Raw sync output/errors/TOML are withheld.

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.

binding
Required · Schema ApplyBinding
timeout_seconds
type "integer" · minimum 1 · maximum 30 · default 10
update_id
Required · type "string"
Show input JSON Schema
{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "binding": {
      "$ref": "#/$defs/ApplyBinding"
    },
    "timeout_seconds": {
      "default": 10,
      "format": "uint8",
      "maximum": 30,
      "minimum": 1,
      "type": "integer"
    },
    "update_id": {
      "type": "string"
    }
  },
  "required": [
    "binding",
    "update_id"
  ],
  "$defs": {
    "ApplyBinding": {
      "additionalProperties": false,
      "properties": {
        "selection": {
          "$ref": "#/$defs/ExecutionScope"
        },
        "sync_id": {
          "type": "string"
        }
      },
      "required": [
        "sync_id",
        "selection"
      ],
      "type": "object"
    },
    "ExecutionScope": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "whole_sync",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "resource_type",
              "type": "string"
            },
            "resource_type": {
              "$ref": "#/$defs/Kind"
            }
          },
          "required": [
            "kind",
            "resource_type"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "resources",
              "type": "string"
            },
            "resource_type": {
              "$ref": "#/$defs/Kind"
            },
            "targets": {
              "items": {
                "$ref": "#/$defs/ResolvedTarget"
              },
              "type": "array"
            }
          },
          "required": [
            "kind",
            "resource_type",
            "targets"
          ],
          "type": "object"
        }
      ]
    },
    "Kind": {
      "enum": [
        "server",
        "swarm",
        "stack",
        "deployment",
        "build",
        "repo",
        "builder",
        "alerter",
        "procedure",
        "action",
        "resource_sync"
      ],
      "type": "string"
    },
    "ResolvedTarget": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "const": "existing",
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "id",
            "name"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "create",
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "type": "object"
        }
      ]
    }
  }
}

Output

The registered output schema covers structured results and tool errors.

FollowResult
automatic_resubmission, binding, caller_attribution, evidence_limit, selection_verified_by_core_history, sync_and_operation_verified, wait
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/FollowResult"
    },
    {
      "$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"
    },
    "ApplyBinding": {
      "additionalProperties": false,
      "properties": {
        "selection": {
          "$ref": "#/$defs/ExecutionScope"
        },
        "sync_id": {
          "type": "string"
        }
      },
      "required": [
        "sync_id",
        "selection"
      ],
      "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"
    },
    "ExecutionScope": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "whole_sync",
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "resource_type",
              "type": "string"
            },
            "resource_type": {
              "$ref": "#/$defs/Kind"
            }
          },
          "required": [
            "kind",
            "resource_type"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "resources",
              "type": "string"
            },
            "resource_type": {
              "$ref": "#/$defs/Kind"
            },
            "targets": {
              "items": {
                "$ref": "#/$defs/ResolvedTarget"
              },
              "type": "array"
            }
          },
          "required": [
            "kind",
            "resource_type",
            "targets"
          ],
          "type": "object"
        }
      ]
    },
    "FollowResult": {
      "properties": {
        "automatic_resubmission": {
          "type": "boolean"
        },
        "binding": {
          "$ref": "#/$defs/ApplyBinding"
        },
        "caller_attribution": {
          "type": "string"
        },
        "evidence_limit": {
          "type": "string"
        },
        "selection_verified_by_core_history": {
          "type": "boolean"
        },
        "sync_and_operation_verified": {
          "type": "boolean"
        },
        "wait": {
          "$ref": "#/$defs/WaitResult"
        }
      },
      "required": [
        "binding",
        "wait",
        "sync_and_operation_verified",
        "selection_verified_by_core_history",
        "caller_attribution",
        "automatic_resubmission",
        "evidence_limit"
      ],
      "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"
    },
    "Kind": {
      "enum": [
        "server",
        "swarm",
        "stack",
        "deployment",
        "build",
        "repo",
        "builder",
        "alerter",
        "procedure",
        "action",
        "resource_sync"
      ],
      "type": "string"
    },
    "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"
    },
    "ResolvedTarget": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "kind": {
              "const": "existing",
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "id",
            "name"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "create",
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "name"
          ],
          "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