Skip to main content
Glama

Undo Item Batch

item.undo_batch
DestructiveIdempotent

Undo a whole batch written by item.create_many, item.update_many or item.update_where, in one step, naming the batchId it returned and the sheetId it wrote: a create batch deletes the rows it created that still exist; an update batch restores each field's previous value unless it was changed since (those are reported as conflicts and kept). Only the user who ran the batch (or the org owner) can undo it, once, within 7 days. Use it when the user asks to undo a bulk change. Effects workflows already had (emails, external calls) are not reverted.

Input Schema

NameRequiredDescriptionDefault
batchIdYesThe batchId item.create_many or item.update_many returned
sheetIdYesThe sheet the batch wrote, as that call returned it

Output Schema

NameRequiredDescriptionDefault
noteYesWhat undo does not revert; tell the user
statusYesundone, or why nothing was changed
revertedYesRows deleted (create batch) or restored (update batch)
conflictsYesRows with fields changed since the batch; those fields were kept, not restored
alreadyGoneYesRows of the batch deleted since; nothing to undo for them

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / sheetId
      Added value: +{
      +  "description": "The sheet the batch wrote, as that call returned it",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "batchId"
      -]New value: +[
      +  "batchId",
      +  "sheetId"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: it explains that create batches delete surviving rows while update batches restore prior field values, that fields changed since the batch are reported as conflicts and left intact, that side effects of fired workflows are NOT reverted, and that the call is single-use inside a 7-day window. That is exactly the destructive/reversibility context an agent needs. The 'once' limit sits slightly awkwardly against idempotentHint=true, but the state outcome is consistent, so this is a nuance rather than a contradiction.

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?

Dense but well ordered: what it undoes, how each batch type behaves, then the permission/time constraints, then the workflow caveat. Slightly long single-sentence core, but every clause carries decision-relevant information.

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 destructive, irreversible-in-part mutation this covers the authorization, retry limit, time window, conflict handling, and non-reverted side effects. An output schema exists, so return-value explanation is correctly omitted.

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 description coverage is 100%, so both parameters are already documented. The description reinforces that batchId and sheetId must be the values the original batch call returned (they are a matched pair, not independent lookups), which is mildly useful but adds little beyond 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?

Starts with a specific verb and resource ("Undo a whole batch") and immediately scopes it to the three sibling tools that produce a batch (item.create_many, item.update_many, item.update_where). An agent can distinguish this from any other item/update tool without reading further.

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?

Gives an explicit trigger ("Use it when the user asks to undo a bulk change") plus hard preconditions: only the batch runner or org owner, only once, only within 7 days. It does not name a fallback tool for the expired/conflict cases (e.g. manual item.update_humanized), so the routing guidance is clear but not fully closed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources