Undo an agent change
revert_changeUndoes one agent change (a batchId from apply_ops or compose_diagram) made in the last 7 days. Only changes this app made can be reverted; changes people made by hand and changes by other apps cannot. Works on changes made on behalf of the person you act for; if that person is an organization owner or admin, it also works on this app’s changes made for other people. Fields someone else changed since then are kept and listed in effects.stale (changed, missing, would_cascade, …), and so is everything a later change touched, so a series of changes reverts fully only newest first. batchId is the mcp:… value a write returned (case-sensitive); an id that is not in this diagram’s change log returns not_found with details.reason "batch". reverted: false means nothing was applied, and reason says why: already_reverted (revertedBy says who undid it, with its batchId and seq), stale (later changes, your own included, keep those records: see effects.stale and hint) or nothing_to_revert. On success, summary counts what was undone; long effects lists are cut to the first 20 with a Count. Any other change returns bad_request with details.reason "not_agent_change".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batchId | Yes | ||
| diagramId | Yes | Diagram id (from list_diagrams or create_diagram). |