Skip to main content
Glama
sharafutdinovdi

Revit Model MCP

Undo Last Action

revit_undo_last
Destructive

Revert the last MCP action in a live Revit model via Revit's own undo command. Returns a refusal reason when the document isn't active or safety conditions aren't met.

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.

Input Schema

NameRequiredDescriptionDefault
documentNoTitle or file name substring of the target open document; needed when several are open.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. Addedv0.7.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, but the description adds non-obvious behavior: the undo only targets entries this session recorded, and failures return a refusal rather than erroring. That scoping constraint is real added value beyond the structured fields.

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

Conciseness4/5

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

A single dense sentence that front-loads the verb and resource before the precondition clause. Efficient, though the clause list is packed and could be marginally easier to scan as separate sentences.

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?

With annotations covering the safety profile and an output schema covering returns, the description supplies the remaining important context: preconditions and refusal semantics. Undo scope limitations are disclosed adequately.

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?

One optional parameter with 100% schema description coverage, so the schema fully documents the document selector. The description adds nothing about parameter usage, which is the expected baseline when the schema does the work.

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?

States a specific verb ('Undo') and resource ('the last MCP action'), plus the mechanism ('through Revit's own undo command'). This is clearly distinguishable from siblings like revit_delete or revit_execute_code, which are not session-scoped single-step reversals.

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?

Explicitly states the conditions under which it runs (active document, no pending command, matching undo entry) and that failures surface a refusal reason, which tells the agent when the call is viable. It stops short of naming an alternative route (e.g. execute_code) when the preconditions fail.

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