Skip to main content
Glama

imap_bulk_update_flags

DestructiveIdempotent

Update flags on up to 500 IMAP messages in one call, adding or removing flags such as Seen or Flagged for the same mailbox.

Instructions

Update flags on up to 500 messages in one operation

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": {
      "message_ids": "<message_ids>"
    },
    "name": "imap_bulk_update_flags"
  }
}

Input Schema

NameRequiredDescriptionDefault
add_flagsNoFlags to add (e.g., `\\Seen`, `\\Flagged`)
account_idNoAccount identifier (defaults to `"default"`)default
message_idsYesList of stable message identifiers (all must be from the same mailbox)
remove_flagsNoFlags to remove

Output Schema

NameRequiredDescriptionDefault
dataYesTool-specific data payload
metaYesExecution metadata (timestamp, duration)
summaryYesHuman-readable summary of the operation outcome

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.12

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already disclose destructiveHint=true, idempotentHint=true, openWorldHint=true and readOnlyHint=false, so the safety profile is covered. The description adds one genuinely useful behavioral fact, the 500-message batch ceiling, but says nothing about partial-failure behavior, atomicity, or the same-mailbox constraint that the schema mentions.

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

Conciseness5/5

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

A single front-loaded sentence with the operation and its capacity limit; nothing is wasted and nothing important is buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and annotations covering safety, the description only needs to cover intent and operational constraints. It does that minimally, but omits the cross-parameter constraint (all IDs from one mailbox) and any failure semantics for a destructive bulk write, which would matter to an agent deciding whether to chunk requests.

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 every parameter (add_flags, remove_flags, account_id, message_ids) is already documented in structured form, including flag syntax examples and the same-mailbox requirement. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 3 applies.

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?

The description states a specific verb and resource ("Update flags") plus a concrete capacity bound ("up to 500 messages in one operation"), so an agent knows exactly what the tool mutates. It does not differentiate itself from the sibling imap_update_message_flags, which by name appears to be the single-message variant, leaving the batch-vs-single boundary implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to choose this over imap_update_message_flags or over the bulk delete/move siblings. The phrase "up to 500 messages in one operation" weakly implies it is for multi-message work, but no exclusions, prerequisites, or thresholds are stated.

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