Skip to main content
Glama

undo_bulk_modify

DestructiveIdempotent

Revert a bulk label change exactly by applying the undo plan returned from bulk_modify, restoring labels messages lost and removing labels they gained.

Instructions

Revert a bulk_modify exactly, from the undo plan it returned (bulk_modify with undo:true). Pass steps unchanged: each step adds back the labels its messages lost and takes off the labels they gained, so a message that was already in the target state before the bulk change is left alone. Steps name labels by id, as the plan does; a label name is refused, because an unknown name would be created rather than restored. The plan restores the state read just before the bulk change. A label changed by hand since then is changed again by the undo, and a label deleted since then makes its step fail — reported in failed, the other steps still run. A label the bulk change created stays in the mailbox, empty. Set verify:true to read the labels back afterwards — one read per affected thread, however many steps name it. USE WHEN: the user wants a bulk change taken back, and the bulk_modify result carried undo. DO NOT USE: without a plan from bulk_modify (use bulk_modify or modify_labels), or to change labels in a new way — this applies exactly the steps it is given. SIDE EFFECTS: label changes on the listed messages; reversible again by the inverse.

Input Schema

NameRequiredDescriptionDefault
stepsYes
verifyNo

Output Schema

NameRequiredDescriptionDefault
failedYes
verifiedNo
submittedMessagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.23.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructive/idempotent/not-readOnly. The description goes well beyond: hand-changed labels get re-changed, deleted labels cause a step to fail but other steps still run, a label created by the original change is left empty, and verify:true costs one read per affected thread. This is rich pre-call behavioral disclosure.

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?

Purpose is front-loaded and the USE WHEN / DO NOT USE / SIDE EFFECTS blocks are scannable. It is long, but given a no-coverage schema and complex semantics almost every sentence carries load; still on the verbose side of tight.

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?

An output schema exists, so return values need not be enumerated, yet the description still flags the `failed` field. For a destructive, plan-driven mutation tool with a zero-coverage schema, the description covers everything an agent needs to invoke it correctly.

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 description coverage is 0%, so the description must carry parameter meaning, and it largely does: `steps` must be passed unchanged, labels are named by id (names are refused and would be created instead of restored), and `verify` triggers a read-back. It does not explicitly clarify the messageIds-vs-threadIds split, a minor remaining gap.

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?

States a specific verb and resource ('Revert a bulk_modify exactly') and immediately ties it to the artifact it consumes (the `undo` plan). It explicitly distinguishes itself from bulk_modify and modify_labels, so the agent can route without opening another 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?

Explicit USE WHEN ('the user wants a bulk change taken back, and the bulk_modify result carried `undo`') and DO NOT USE ('without a plan from bulk_modify, use bulk_modify or modify_labels', or 'to change labels in a new way'). Alternatives and the selecting condition are named outright.

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