Skip to main content
Glama
gmail-mcp

gmail-mcp

list_attachments

List all file attachments in an email with their IDs, filenames, MIME types, and sizes.

Instructions

List all file attachments in an email with their IDs, filenames,
MIME types, and sizes.

Required:
  message_id (str) — Gmail message ID from list_emails.

Returns on success:
  {"attachments": [
    {"id": "...", "filename": "report.pdf",
     "mime_type": "application/pdf", "size": 204800}
  ]}

Workflow note: The attachment "id" field is a Gmail attachment ID —
  pass it to download_attachment along with the message_id and
  a save_path to download the file. Returns empty list if the
  email has no attachments.

Input Schema

NameRequiredDescriptionDefault
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses the empty-list case for emails without attachments, the prerequisite for message_id, and the exact return payload. It does not mention pagination limits, mailbox scopes, or whether listing marks anything as read, so it falls short of fully specifying behavior.

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?

Front-loaded purpose sentence, then clearly labeled Required, Returns, and Workflow note sections. Every line carries information an agent needs to construct the call or use the result; nothing is 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?

There is no output schema, so describing the return shape and the empty-list case is essential and is done with a concrete example. Combined with the workflow handoff to download_attachment, an agent has everything needed for this simple one-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single parameter has no title-level description, so the description must compensate. It does: it identifies message_id as a Gmail message ID and its provenance (from list_emails), and separately explains the attachment id returned so the agent understands the ID namespaces involved.

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 ("List all file attachments in an email") plus the exact fields returned (IDs, filenames, MIME types, sizes). The workflow note naming download_attachment makes the boundary against the download siblings explicit.

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

Usage Guidelines4/5

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

The workflow note tells the agent this is a discovery step that feeds download_attachment, and it names list_emails as the source of message_id, so the call context is clear. It does not explicitly state when to prefer this over the sibling download_attachments, which is the only gap.

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