Skip to main content
Glama

sb_undo

Destructive

Restores content replaced by a page or form write or an API PUT, letting you revert edits made in this process. Refuses pages changed by someone else since the save.

Instructions

Put back what a write replaced — a page or form edit made here (sb_add, sb_set, sb_duplicate …), or a PUT through sb_api_call. An undo records what IT replaced, so the newest entry right after one is its redo. A page is refused if anyone else saved it since. IN THIS PROCESS ONLY, capped; the platform's own page history (GET .../pages/{pageId}/history) survives a restart. No argument lists what is undoable.

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": "sb_undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoEvery page, not just the open one
indexNo1 is the most recent write
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.103.0
    • addedInput schema / properties / all
      Added value: +{
      +  "description": "Every page, not just the open one",
      +  "type": "boolean"
      +}
  2. Addedv0.12.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the destructiveHint/openWorldHint annotations, it discloses that an undo itself becomes a redoable entry, that it is process-scoped and capped while platform history survives restart, and that concurrent edits cause refusal. This is exactly the non-obvious behavior an agent needs before calling a destructive tool.

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?

The core action and its sources are front-loaded and dense with useful information, but the trailing sentence about arguments is somewhat disjointed and the dry_run gap makes the parameter story feel incomplete rather than tight.

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 no output schema and no required parameters, the description supplies most needed context: concurrency refusal, scope limits, and redo semantics. The unexplained dry_run behavior and lack of any hint about what the call returns keep it short of complete.

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 67%: `all` and `index` are documented in the schema, and the description adds that no argument enumerates undoable items. However, `dry_run` is left completely unexplained in both schema and description, leaving a meaningful gap for a destructive operation.

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 states a specific verb and resource ('Put back what a write replaced') and enumerates the write sources it reverses (sb_add, sb_set, sb_duplicate, PUT via sb_api_call), which lets an agent distinguish it from siblings like sb_page_version or sb_page_repair.

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?

It gives clear conditions for use and one exclusion (a page is refused if someone else saved it since) and implicitly routes persistent history lookups to the platform's page history endpoint. It lacks an explicit 'use X instead when you need Y' framing for the process-vs-restart tradeoff, so not a 5.

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