Skip to main content
Glama

Add or remove an approved label

label
Destructive

Applies or removes a user-approved tag on selected messages after preview approval, using a single-use token and optional per-call limit; returns undo IDs and continuation state.

Instructions

Add the approved label to the approved messages, or remove it; only call after the user explicitly approved the preview.

Use it only with an add_label (op="add") or remove_label (op="remove") token from preview_action that the user approved, or the continuation_token of that approval; the wrong op refuses before the form. The token pins the label, so this takes no label argument. Unless the operator turned it off, the user then confirms the exact change in the client's form. limit caps the messages this call processes.

Returns log_ids (a list even for zero or one chunk), counts, run/continuation state and message IDs; verbose=true adds full rows. Pass each log_id to undo_action. Any untouched remainder gets a continuation, redeemed with the same op; a continuation reports a changed row in blocked_ids and leaves it untouched. An expired, used or unknown token refuses: preview again.

Input Schema

NameRequiredDescriptionDefault
opYesadd redeems an add_label preview and remove a remove_label preview. The other value refuses without consuming the token.
limitNoMessages to process in this call, 1 to 200. A value above the approved total refuses and keeps the token.
tokenYesSingle-use token from the preview the user approved, or the continuation_token of an earlier partial run of that approval.
verboseNotrue adds messages and replaces blocked_ids, missing_ids and mismatched_ids with full blocked, missing and mismatched rows.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, but the description goes well beyond them: token single-use and expiry semantics, refusal-before-mutation on wrong op, an operator-configurable client confirmation form, continuation handoff for untouched remainders, and blocked_ids behavior for changed rows. It stops short of stating permission requirements or rate limits, which keeps it off a 5.

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-loads the gating precondition before any mechanics, which is the right order for a destructive tool. It is dense and mostly earns its sentences, though the return-value sentence ('Returns log_ids ... counts, run/continuation state and message IDs') repeats what the output schema already provides.

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?

This is a destructive, token-gated mutation with continuations, and the description covers the full lifecycle: obtain approval, redeem, partial-run continuation, blocked rows, expiry recovery, and undo linkage. Nothing an agent needs in order to call it safely is missing, even though the return shapes are also documented by the output schema.

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 the baseline is 3, and the schema already explains op, limit, token and verbose in comparable detail. The description adds one genuinely new fact ('The token pins the label, so this takes no label argument') and a light restatement of limit and verbose, but largely duplicates structured data rather than extending it.

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 precise verb and resource ('Add the approved label to the approved messages, or remove it') and immediately scopes it against the sibling that produces its input ('only call after the user explicitly approved the preview', 'preview_action'). An agent can separate this from preview_action and undo_action 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 explicit when-to-use ('only with an add_label (op="add") or remove_label (op="remove") token ... that the user approved') and when-not ('the wrong op refuses before the form'), plus the recovery path ('An expired, used or unknown token refuses: preview again'). The alternative tools (preview_action to obtain a token, undo_action to reverse) are named in context.

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