Skip to main content
Glama
servicenow-mcp

servicenow-mcp

sn_undo_plan

Destructive

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

NameRequiredDescriptionDefault
plan_idYesThe plan_id that sn_plan_change returned. Example: 20261016-101500-1a2b3c4d.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare destructiveHint=true and readOnlyHint=false, and the description reinforces this concern rather than contradicting it by stating outright "This is a write tool." It adds substantive behavior the annotations cannot express: which records are restored vs deleted, the conflict-refusal rule that prevents overwriting later work, that untouched fields are preserved, and the SN_ALLOW_WRITE=1 / SN_ALLOW_WRITE=plan server prerequisite.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the core action and effect, then preconditions. Every sentence carries a distinct fact (restore, delete, refuse-on-conflict, untouched fields, write gate) with no repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter destructive tool with no output schema and full annotation coverage, the description covers effects, safety, and access prerequisites thoroughly. The only gap is what the call returns on success, but with no output schema that need is lower and an agent can still invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the plan_id property already carries a format example, so the schema does most of the work. The description still adds meaning by linking plan_id to the plan that sn_apply_plan wrote, telling the agent the identifier must come from an applied plan rather than an arbitrary one.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Undo a plan that sn_apply_plan wrote" gives a specific verb and resource and ties this tool to the sibling that creates the artifact it consumes. The follow-up sentences spell out the two distinct effects (restore old values, delete created records), so an agent can distinguish it from sn_apply_plan and sn_check_plan immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: it is the inverse of sn_apply_plan and is meant to be run on a previously applied plan. The refusal-on-conflict rule also acts as a de facto precondition. It lacks an explicit "do not use when..." statement or a named alternative for the conflict case, which keeps it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.