Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

batch-mark-as-unread

Idempotent

Marks 1–100 selected messages as unread in one call, returning success and failure counts. Use it after searching or listing IDs, and pass the source account and mailbox to avoid ambiguous matches.

Instructions

Use when: marking multiple messages (1–100 ids) as unread in one call. Returns: counts of how many were marked unread and how many failed. Do not use when: marking just one (use mark-as-unread) or marking read (use batch-mark-as-read). 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.

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": {
      "ids": "<ids>"
    },
    "name": "batch-mark-as-unread"
  }
}

Input 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

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.7/5.0
Behavior4/5

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

The annotations already declare readOnly=false, destructive=false, and idempotent=true, so the safety profile is covered. The description adds genuine context beyond that: per-id success/failure counts, and the important rule that an id matching in several mailboxes is refused rather than guessed. It does not discuss permissions or what happens to already-unread messages, which keeps it short of 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.

Conciseness5/5

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

The 'Use when / Returns / Do not use when' structure front-loads the selection decision and keeps each sentence doing distinct work. No filler, no restatement of the tool name.

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 3-parameter batch mutation with annotations and an output schema, the description covers everything the agent needs: selection conditions, sibling alternatives, id provenance, the ambiguity-refusal rule, and the scoping parameters. Return values are summarized and backed by the output schema.

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% and the schema descriptions for sourceAccount/sourceMailbox already carry most of the pairing rules, so the description is partly reinforcing structured data. It still adds meaning by framing why the pinning exists — an ambiguous id is refused, not guessed — and by noting the 1–100 id bound as a call-level constraint rather than only a schema limit.

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?

The description leads with a specific verb, resource, and scope: 'marking multiple messages (1–100 ids) as unread in one call.' The batch constraint and id-count bound immediately separate it from the singular mark-as-unread and from batch-mark-as-read, both of which are named explicitly.

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?

It gives an explicit 'Use when' condition, an explicit 'Do not use when' with the two correct alternatives for each off-case, and a prerequisite ('Get the ids from search-messages or list-messages first'). There is nothing left for the agent to infer about tool selection.

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