Skip to main content
Glama
LBurny
by LBurny

session_rollback

Roll back the model to a previous step, undoing document transactions and truncating the step log to restore an earlier state.

Instructions

Roll back the model to a previous step.

Undoes the corresponding document transactions in FreeCAD and truncates
the step log. Removed steps go to a redo buffer (session_redo) until a new
cad() operation discards them.

Args:
    to_step: Keep steps 1..to_step; undo everything after (0 = undo all).
    force: Roll back even across non-atomic execute_code steps (risky:
        undo may revert the wrong change).

Returns:
    JSON with undone count, removed step numbers, post-rollback object
    list, and a fingerprint consistency check.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
to_stepYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so admirably. It discloses destructive behavior (undoing transactions, truncating step log), the redo buffer lifecycle, the risk of force across non-atomic steps, and the exact return payload including the fingerprint consistency check.

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?

The description is well-structured with a brief opening sentence, a behavioral summary, and clear Args/Returns sections. Every sentence adds value and there is no repetition or filler. The length is justified by the tool's complexity.

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?

Given the tool's disruptive nature and the absence of annotations, the description is complete. It covers purpose, parameter semantics, side effects, caveats, and return value structure. The presence of a return schema does not make the extra return explanation redundant because it adds meaningful context about the consistency check.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining both parameters: to_step is defined as keeping steps 1..to_step and undoing everything after with 0 meaning undo all, and force is described as a risky override for non-atomic execute_code steps. This goes far beyond the bare 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?

The description opens with a specific verb+resource statement: 'Roll back the model to a previous step.' It then clearly distinguishes the tool's function by explaining it undoes document transactions, truncates the step log, and interacts with session_redo, separating it from sibling tools.

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?

The description provides clear usage context: it explains when rollback is appropriate, how steps moved to the redo buffer relate to session_redo, and that a new cad() operation discards them. It also warns about the risky force option for non-atomic execute_code steps, giving explicit guidance on when extra caution is needed.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LBurny/cadpilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server