Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

list-attachments

Read-only

Enumerate a message's attachments by ID to view filenames, MIME types, and sizes before fetching or saving them.

Instructions

Use when: enumerating a message's attachments (by id) to discover their names, MIME types, and sizes — typically before saving or fetching one. Returns: each attachment's name, MIME type, and decoded size in bytes (what fetch-attachment returns), plus a count; sizeApproximate: true marks the rare IMAP size that is an estimate. Do not use when: you want the bytes (use fetch-attachment for inline base64, or save-attachment to write to disk). Get the message id from search-messages or list-messages first.

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": {
      "id": "<id>"
    },
    "name": "list-attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes

Output Schema

NameRequiredDescriptionDefault
countNo
attachmentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 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"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  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?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavior: sizes are decoded byte counts matching what fetch-attachment returns, and sizeApproximate=true flags estimated IMAP sizes — a non-obvious data-quality caveat. It stays silent on auth or rate-limit concerns, but for a local read-only enumeration that is a minor gap.

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?

Three labeled lines (Use when / Returns / Do not use when) with the routing constraint front-loaded. Every clause carries information — scope, return shape, caveat, alternatives, prerequisite — and none is redundant with the schema or annotations.

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 single-parameter read tool an output schema exists, so return values need not be re-explained; the description nonetheless clarifies the decoded-size and approximation semantics that the schema alone would not convey. Routing, prerequisites, and the metadata-only boundary are all covered, so an agent has everything needed to call 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 the load for the single `id` parameter. It does explain the value's origin ('get the message id from search-messages or list-messages first') and that it addresses a message, but it never mentions the accepted 'imap:<token>' form encoded in the schema pattern, leaving one format undocumented.

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 ('enumerating a message's attachments') plus the exact fields surfaced (names, MIME types, sizes), and names the boundaries against fetch-attachment and save-attachment. An agent can distinguish it from all 50+ siblings without opening a 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 three-way routing: 'Use when' for listing metadata, 'Do not use when' pointing to fetch-attachment for bytes and save-attachment for disk writes, plus a prerequisite telling the agent to obtain the id from search-messages or list-messages first. Nothing is left to inference.

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