Skip to main content
Glama
Model MCP

Model MCP

Undo Last Action

revit_undo_last
Destructive

Revert the last MCP-driven change in Autodesk Revit using Revit's own undo command, refusing safely when the document is inactive or the undo entry does not match.

Instructions

Undo the last MCP action through Revit's own undo command. Runs only when the target document is active, no command is pending and Revit's last undo entry is the one this session recorded; otherwise the result carries a refusal reason.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "revit_undo_last"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentNoOpen document title/file substring; required when ambiguous.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.0
    • changedInput schema / properties / document / description
      Previous value: -"Title or file name substring of the target open document; needed when several are open."New value: +"Open document title/file substring; required when ambiguous."
  2. Changed4 schema fields changedv0.10.0
    • changedInput schema / properties / document / description
      Previous value: -"Case-insensitive substring of the target open document's title or file name. Required to disambiguate when the Revit process has more than one document open; omit only when a single document is open (the active document is used). An unknown or ambiguous reference is rejected before any change."New value: +"Title or file name substring of the target open document; needed when several are open."
    • removedInput schema / properties / document / title
      Removed value: -"Document"
    • removedInput schema / title
      Removed value: -"revit_undo_lastArguments"
    • removedOutput schema / title
      Removed value: -"revit_undo_lastDictOutput"
  3. Addedv0.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already disclose destructiveHint=true, readOnlyHint=false and idempotentHint=false, and the description adds genuinely new context: three hard preconditions (active document, no pending command, matching undo entry) and the fact that failure surfaces as a refusal reason rather than an exception or silent no-op. This is meaningful safety detail beyond the annotations, though it does not say what is left in place when the tool refuses or whether callers can retry safely.

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?

One sentence, front-loaded with the action and mechanism, followed immediately by the gating conditions and the failure mode. No filler and nothing repeated from the schema or annotations.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and the description still covers the mechanism, the preconditions, and the shape of failure. For a single-parameter, single-purpose undo tool that is everything an agent needs to call it correctly or recognize a refusal.

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

Parameters3/5

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

Schema coverage is 100% and the single 'document' parameter is fully documented in the schema, so the baseline of 3 applies. The description's mention that it 'runs only when the target document is active' loosely reinforces the document parameter but adds no new format or disambiguation guidance.

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

Purpose4/5

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

States a specific verb and resource ('Undo the last MCP action') plus the mechanism ('through Revit's own undo command'), which tells an agent this is a real Revit undo rather than a session-level rollback. It does not name a sibling it must be distinguished from, but the scope is narrow enough that no differentiation is required.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the description says it 'Runs only when the target document is active, no command is pending and Revit's last undo entry is the one this session recorded,' which effectively defines the conditions under which it is callable. There is no explicit when-to-use versus what-to-do-otherwise guidance (e.g., what to do after a refusal).

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

Deploy Server

Other Tools