Skip to main content
Glama

undo_notebook_edit

Restore a .ntop notebook from its latest or named snapshot, saving the current state first so the undo is reversible. Use it to roll back notebook edits safely.

Instructions

Restore an .ntop notebook from its latest (or named) snapshot in .ntop_history/.

Saves the current state as a before_undo snapshot first so undo is itself reversible.

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": {
      "notebook_path": "<notebook_path>"
    },
    "name": "undo_notebook_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
notebook_pathYes
snapshot_nameNo
auto_reload_guiNo
force_if_unsavedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add real behavioral value by disclosing that the current state is saved as a `before_undo` snapshot, making the operation reversible, and that snapshots live under `.ntop_history/`. It says nothing about behavior when the notebook has unsaved changes, whether the GUI is refreshed, or what happens if no snapshot exists.

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?

Two short sentences with the core action front-loaded and the reversibility guarantee immediately after. Nothing is redundant and every clause adds information.

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

Completeness3/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 no explanation, and the undo semantics are covered. However, for a 4-parameter restore tool with zero schema descriptions, the absence of any mention of `force_if_unsaved` or `auto_reload_gui` leaves an agent unable to reason about the risky paths.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it only partially does: it explains that a named snapshot may be used versus the latest, which covers `snapshot_name` contextually. The two behaviorally significant flags, `auto_reload_gui` and `force_if_unsaved`, are never mentioned, leaving their effects entirely undocumented.

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: restore an .ntop notebook from a snapshot in `.ntop_history/`, with the latest-or-named scope made explicit. It is clearly distinguishable from a generic edit tool, though it does not name the sibling (list_notebook_snapshots) that would help an agent pick between inspecting and restoring.

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 only implied: the tool is the recovery path after an edit, and the description hints at that by naming the undo snapshot. There is no explicit guidance on when to use this versus re-editing the notebook, and no mention of the unsaved-changes condition that the `force_if_unsaved` parameter implies.

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