sn_undo_plan
Reverts changes made by an applied ServiceNow plan, restoring prior field values or deleting newly created records while refusing to overwrite later edits.
Instructions
Undo a plan that sn_apply_plan wrote. For a changed record it puts back the values the planned fields had before. For a new record it deletes that record. It refuses if someone changed those fields (or the new record) after the plan was applied, so it never overwrites later work. Fields the plan did not touch are left alone. This is a write tool. It refuses to run unless the server was started with SN_ALLOW_WRITE=1 or SN_ALLOW_WRITE=plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plan_id": "<plan_id>"
},
"name": "sn_undo_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | The plan_id that sn_plan_change returned. Example: 20261016-101500-1a2b3c4d. |