Skip to main content
Glama

sb_undo

Destructive

Revert a management API write made through sb_api_call. Restores replaced settings, products, or forms temporarily within the process; pages use platform history instead.

Instructions

Put back what a PUT through sb_api_call replaced — settings, a product, a form, anything with a shape. IN THIS PROCESS ONLY, capped, and gone when it exits. For a PAGE the platform keeps its own: GET .../pages/{pageId}/history lists the autosave checkpoint it writes on every draft save, versions lists the labelled snapshots, and either restores. That one survives everything and is the better answer whenever the thing to recover is a page. No argument lists what is undoable here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo1 is the most recent write
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, openWorldHint=true, so the safety profile is covered. The description adds genuinely non-structured traits: the undo stack is IN THIS PROCESS ONLY, is capped, and disappears when the process exits. It also warns there is no enumerable list of undoable items, which is important agent-facing behavior.

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?

Front-loaded with the core action and scope before the caveats, and the page-detour is functional routing rather than filler. Some prose is showy ('anything with a shape', 'That one survives everything') and could be trimmed, but no sentence is wasted.

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?

For a 2-parameter tool with no output schema, the description covers session scope, capping, ephemerality, and the page alternative well. Missing details are the meaning of dry_run and behavior when index is out of range, which leaves a small gap.

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?

The description gives no meaning for either parameter. The schema documents only 'index' (1 = most recent write) and leaves 'dry_run' entirely undescribed at 50% coverage, so the description fails to compensate for the gap. 'No argument lists what is undoable here' gestures at the parameterization but adds no usable semantics.

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 concrete verb and resource: it restores what a PUT made through sb_api_call replaced (settings, products, forms). The name sb_api_call is called out as the writer being reversed, which separates it from read/create siblings. 'Anything with a shape' is a bit loose but the core purpose is unambiguous.

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 routes the agent: use this for non-page objects, but for a PAGE the platform history endpoints (GET .../pages/{pageId}/history or versions) are 'the better answer whenever the thing to recover is a page'. That is a real when-to-use/when-not-to-use split. It stops short of stating prerequisites for invoking undo here (e.g., that a prior sb_api_call write must exist in the same session), so it is not a full 5.

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