Skip to main content
Glama

Scene Rollback

scene_rollback

Restore a Maya scene by opening a saved checkpoint and pointing it back to its original file path; saves current state first unless discarding is enabled.

Instructions

Open a checkpoint file and point the scene at its original path (S2).

Boundary: Disambiguated from scene_checkpoint (save a checkpoint from the current scene) and scene_checkpoint_list (list the ones already written) — scene_rollback is the read-back half.

Before opening, the current scene is saved to a file first (auto_before_rollback); if that fails, the read-back aborts — pass discard_current_state=True to escape (the result reports safety_snapshot="skipped_by_user"). The scene points back only when it has a file path at read-back time; otherwise it stays on the checkpoint path (S1) and scene_rebound_to is null.

The checkpoint file carries no undo history — call scene_snapshot afterwards to rebuild context.

The result also says scene_modified_before: whether the scene still had changes that were never saved at the moment this call read the flag — a read of its own, just before the rollback request and before any file is opened. It is the same Maya flag scene_snapshot reports; after the open, that flag describes the checkpoint, not the scene being replaced. The value never changes what this tool does: a changed scene and a clean scene take the same path, and the copy written before the switch behaves exactly as before (safety_snapshot reports "skipped_by_user" only when discard_current_state lets a failed save through). The one new failure is Maya refusing to answer that question: the call then errors, with nothing opened yet, instead of printing a made-up "clean".

That read is its own round trip, so it is worth saying what it covers when calls overlap: two scene_rollback calls for one session can each run their own read and their own switch. The value then describes the scene as it was at that read, which may be a scene the other call has already replaced. Nothing is gated by that difference, and scene_name_before still names the scene the rollback itself read (empty when the scene was never saved).

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": {
      "filename": "<filename>"
    },
    "name": "scene_rollback"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesCheckpoint filename from scene_checkpoint_list (cp_*.ma or prev_*.ma).
session_keyNoMaya session key.
discard_current_stateNoEscape hatch — proceed even if saving the current scene fails.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / discard_current_state / description
      Previous value: -"Escape hatch — proceed even if the\nsafety snapshot fails."New value: +"Escape hatch — proceed even if saving\nthe current scene fails."
  2. First observedv0.4.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare the read/write and idempotency profile; the description adds substantial behaviour beyond that — an automatic pre-rollback save, abort-on-failed-save, the skipped_by_user escape path, the null scene_rebound_to condition, loss of undo history, and the new failure mode when Maya refuses to report the dirty flag. It loses a point only for the very long detour into overlapping-call semantics of a flag it simultaneously says never affects behaviour.

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

Conciseness3/5

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

Purpose and boundary are correctly front-loaded, but the middle and final paragraphs are sprawling. A long passage explains a reported flag, concedes it 'never changes what this tool does', and then speculates about concurrent calls — detail that does not help an agent decide or invoke.

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?

For a mutating, state-replacing tool this covers the full picture: what is written first, what happens on failure, how to bypass, what the result fields mean, and what the caller must do afterwards. Output-schema fields are explained rather than required, which is a bonus given the output schema already exists.

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%, so baseline is 3, but the description genuinely extends meaning for discard_current_state by tying it to the reported safety_snapshot value and to the abort path. filename and session_key are left entirely to the schema.

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 concrete verb and resource: 'Open a checkpoint file and point the scene at its original path (S2).' It then explicitly names the siblings it is not (scene_checkpoint, scene_checkpoint_list) and characterises itself as 'the read-back half', so an agent can select it without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit routing guidance against named alternatives, plus a follow-up recommendation ('call scene_snapshot afterwards to rebuild context') and the condition that selects the discard_current_state escape hatch. When-to-use and when-to-use-something-else are both stated.

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