MCP Tools
Plans & Playbooks

get_document_update

Read one document update proposal in full, including `base_hash`, proposed body, current body, diff, and evidence.

Parameters

NameTypeRequiredDefaultDescription
team_idintegerYes—Team id to act in (from initialize instructions or get_current_user_info). Required on external MCP; optional in bound sessions.
update_idstring (uuid)Yes—Document update proposal UUID from list_document_updates or get_generation_status.

Input Schema

{
  "type": "object",
  "required": [
    "team_id",
    "update_id"
  ],
  "properties": {
    "team_id": {
      "type": "integer",
      "minimum": 1,
      "description": "Team id to act in (from initialize instructions or get_current_user_info). Required on external MCP; optional in bound sessions."
    },
    "update_id": {
      "type": "string",
      "format": "uuid",
      "description": "Document update proposal UUID from list_document_updates or get_generation_status."
    }
  }
}

Output Schema

{
  "type": "object",
  "required": [
    "update_id",
    "source_kind",
    "kind",
    "mode",
    "state",
    "summary",
    "base_hash",
    "current_hash",
    "target_content_id",
    "target_link_url",
    "applied_content_id",
    "applied_link_url",
    "stale",
    "created_at",
    "decision_at",
    "error_code",
    "can_approve",
    "proposed_body",
    "current_body",
    "diff",
    "evidence"
  ],
  "properties": {
    "diff": {
      "type": "object",
      "required": [
        "added",
        "removed",
        "truncated",
        "hunks"
      ],
      "properties": {
        "added": {
          "type": "integer"
        },
        "hunks": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "before_start",
              "after_start",
              "removed",
              "added"
            ],
            "properties": {
              "added": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "removed": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "after_start": {
                "type": "integer"
              },
              "before_start": {
                "type": "integer"
              }
            }
          }
        },
        "removed": {
          "type": "integer"
        },
        "truncated": {
          "type": "boolean"
        }
      }
    },
    "kind": {
      "enum": [
        "update",
        "create"
      ],
      "type": "string"
    },
    "mode": {
      "enum": [
        "approval",
        "direct"
      ],
      "type": "string"
    },
    "stale": {
      "type": "boolean"
    },
    "state": {
      "enum": [
        "pending",
        "no_changes",
        "applying",
        "applied",
        "rejected",
        "conflict",
        "superseded",
        "failed"
      ],
      "type": "string"
    },
    "run_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "summary": {
      "type": "string"
    },
    "evidence": {
      "type": "object",
      "required": [
        "summary",
        "warnings",
        "changes"
      ],
      "properties": {
        "changes": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "target_id",
              "check_id",
              "before",
              "after",
              "evidence_url"
            ],
            "properties": {
              "after": {
                "type": "string"
              },
              "before": {
                "type": "string"
              },
              "check_id": {
                "type": "string"
              },
              "target_id": {
                "type": "string"
              },
              "evidence_url": {
                "type": "string"
              }
            }
          }
        },
        "summary": {
          "type": "string"
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "item_key": {
      "type": "string"
    },
    "run_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "base_body": {
      "type": [
        "string",
        "null"
      ]
    },
    "base_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "item_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "plan_uuid": {
      "type": "string",
      "format": "uuid"
    },
    "update_id": {
      "type": "string",
      "format": "uuid"
    },
    "created_at": {
      "type": "integer"
    },
    "error_code": {
      "type": [
        "string",
        "null"
      ]
    },
    "step_title": {
      "type": "string"
    },
    "can_approve": {
      "type": "boolean"
    },
    "decision_at": {
      "type": [
        "integer",
        "null"
      ]
    },
    "root_run_id": {
      "type": "string",
      "format": "uuid"
    },
    "source_kind": {
      "enum": [
        "plan",
        "workflow"
      ],
      "type": "string"
    },
    "workflow_id": {
      "type": "string",
      "format": "uuid"
    },
    "current_body": {
      "type": [
        "string",
        "null"
      ]
    },
    "current_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "document_key": {
      "type": "string"
    },
    "target_title": {
      "type": [
        "string",
        "null"
      ]
    },
    "proposed_body": {
      "type": "string"
    },
    "stale_edited_at": {
      "type": [
        "integer",
        "null"
      ]
    },
    "target_link_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "applied_link_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "decision_user_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "target_content_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "applied_content_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "decision_user_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "stale_edited_by_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "sibling_pending_count": {
      "type": "integer"
    }
  }
}

Instructions

Reads one document update proposal (content plan, playbook step, or workflow) by update_id (from list_document_updates or get_generation_status). Read-only. Unreadable targets return 404.

Output: update_id, source_kind, plan_uuid, step_title, run_id, run_name, kind, mode, state, summary, base_hash, current_hash, target_content_id, target_title, target_link_url, applied_content_id, applied_link_url, stale, stale_edited_at, stale_edited_by_name, sibling_pending_count, created_at, decision_at, decision_user_id, decision_user_name, error_code, can_approve, proposed_body, current_body, diff, evidence.

  • Workflow updates also include workflow_id, item_key, item_name, document_key, root_run_id, and base_body.

When to use

Call before approve_document_update to review the diff and obtain base_hash (passed as expected_base_hash).