Skip to main content
Glama
sweetrb

apple-mail-mcp

by sweetrb

batch-unflag-messages

Clear flag markings from many email messages in a single operation by providing up to 100 IDs, with a summary of successes and failures.

Instructions

Use when: removing flags from multiple messages (1–100 ids) in one call. Returns: counts of how many were unflagged and how many failed. Do not use when: unflagging just one (use unflag-message) or adding flags (use batch-flag-messages). Get the ids from search-messages or list-messages first. Pass sourceMailbox/sourceAccount (the mailbox you listed the ids from) so each numeric id is pinned to that mailbox; an id that matches in several mailboxes is refused, not guessed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes
sourceAccountNoAccount the numeric ids were listed from. Required when sourceMailbox is supplied; on its own it pins nothing.
sourceMailboxNoMailbox the numeric ids were listed from (e.g. 'INBOX'). Must be paired with sourceAccount to form an unambiguous scope. Ignored for imap: ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
errorsNo
failedNo
mailboxNo
successNo
errorsTruncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / sourceAccount
      Added value: +{
      +  "description": "Account the numeric ids were listed from. Required when sourceMailbox is supplied; on its own it pins nothing.",
      +  "type": "string"
      +}
    • addedInput schema / properties / sourceMailbox
      Added value: +{
      +  "description": "Mailbox the numeric ids were listed from (e.g. 'INBOX'). Must be paired with sourceAccount to form an unambiguous scope. Ignored for imap: ids.",
      +  "type": "string"
      +}
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / errors
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / errorsTruncated
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  3. Addedv2.9.0
  4. Removedv2.8.10
  5. First observedv2.6.1

TDQS

A4.9/5.0
Behavior5/5

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

No annotations exist, so the description carries full burden. It discloses return counts (unflagged and failed), the requirement for sourceMailbox/sourceAccount to pin numeric ids, and that ambiguous ids are refused rather than guessed. This is rich behavioral context beyond what the schema provides.

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?

The description is concise, front-loaded with the primary use case, and each sentence earns its place. No redundancy or filler.

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 batch mutation tool with an output schema, the description covers usage, alternatives, parameter disambiguation, and return behavior. It is sufficiently complete for an agent to select and invoke the tool 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 coverage is 67%, with sourceAccount and sourceMailbox already described. The description adds crucial semantics for these parameters (pinning, refusal behavior) and clarifies the ids use case (1-100 messages). While it doesn't detail id format, the schema's pattern handles that.

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?

Clearly states the tool removes flags from multiple messages (1-100 ids) in one call, with a specific verb and resource. Explicitly distinguishes from siblings by naming unflag-message for single and batch-flag-messages for adding flags.

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?

Provides explicit 'Use when' and 'Do not use when' guidance with alternative tool names. Also instructs to get ids from search-messages or list-messages beforehand, giving clear prerequisites.

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