Skip to main content
Glama

undo_edit

Destructive

Undo a previous edit_transaction or bulk_edit_transactions by reverting the affected transactions to their prior state. Returns the undo's own undoBulkEditId — itself a handle you can undo again to REDO the change. When the user asks to undo, revert, or take back an edit you just made. Pass the bulkEditId returned by the edit being undone (forward it verbatim — never invent one); to redo, pass the undoBulkEditId from a prior undo_edit. Not for deleting a manually-added transaction (that's a different mechanism), and not for changing data — only for reverting a prior edit or bulk-edit. The bulkEditId parameter is the undo handle from a prior edit_transaction / bulk_edit_transactions result, or the undoBulkEditId from a prior undo_edit (to redo). Forward it verbatim; never invent one. If nothing matches the id (already undone, or stale), narrate "nothing to undo" rather than treating it as an error. Applying this triggers a recalculation of the user's data.

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": {
      "bulkEditId": "<bulkEditId>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "undo_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextYesWrite one short, abstract, third-person sentence about the task. Refer to the requester only as "the user". Refer to any selected customer, client profile, business, portfolio, account, or data source only as "the client". Never copy, abbreviate, initialize, quote, or paraphrase a user or client name from the conversation, request, or tool data. Never put a name, initials, label, possessive name, business name, email, account name, or identifier before or after "the user" or "the client". Rewrite every named reference to exactly "the user" or "the client". For example, rewrite "User wants to know the inventory method for the client Alex R" as "The user wants to know the inventory method for the client." Do not include wallet names, wallet addresses, transaction hashes, amounts, balances, prices, dates, tax identifiers, account identifiers, or other personal or financial values. Use only generic data categories such as "transactions", "accounts", "wallets", or "tax settings". If a safe abstract summary is not possible, write exactly "the request contains sensitive details".
clientIdNoThe client this call acts for — its ID comes from list_clients. Accountants and collaborators: set it on every client-scoped call to operate on that client's data. Only accountant/collaborator accounts have clients; individual accounts omit it.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
bulkEditIdYesThe undo handle from a prior edit_transaction / bulk_edit_transactions result (its `Bulk Edit ID`), or the undoBulkEditId from a prior undo_edit (to redo). Forward it verbatim; never invent one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses that the call returns an undoBulkEditId usable as a redo handle, that a no-match id should be narrated as 'nothing to undo' rather than raised as an error, and that applying it triggers a recalculation of the user's data. The destructiveHint=true annotation is consistent with the described reverting behavior. It stops short of stating permission requirements or whether the undo is itself reversible beyond one level.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and trigger are front-loaded, but the bulkEditId provenance/verbatim rule is stated three separate times (in the flow sentence, in the dedicated paragraph, and again in the schema). The description is longer than it needs to be for a four-parameter tool with full schema coverage.

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?

Covers everything an agent needs for a mutation tool with no output schema: what it reverts, the returned undo handle, the redo path, the no-match behavior, and the recalculation side effect. Nothing material is missing relative to its complexity.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds the outcome semantics that the schema lacks: a stale or already-undone id means 'nothing to undo' rather than an error, and the same parameter doubles as the redo handle. The 'forward it verbatim; never invent one' instruction largely restates the schema, which limits the added value.

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?

Opens with a specific verb+resource pair ('Undo a previous edit_transaction or bulk_edit_transactions') and states the effect on affected records. It also distinguishes the inverse operation (redo via undoBulkEditId), so an agent can separate this from edit_transaction and bulk_edit_transactions without opening any schema.

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?

Gives an explicit trigger ('When the user asks to undo, revert, or take back an edit you just made') and explicit exclusions ('Not for deleting a manually-added transaction... and not for changing data'). It also specifies the redo path, so the agent knows how to reverse its own reversal.

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