Skip to main content
Glama
google-seo-mcp
by Akxan

Find emails with attachments

gmail_find_attachments
Read-onlyIdempotent

Search a read-only Gmail mailbox for messages with attachments and list each file's name, type, and size, so emailed photos or documents can be committed to GitHub.

Instructions

Search the authorized Gmail mailbox (read-only) and list matching messages with their attachments (name, type, size), so a photo or document someone emailed can be committed to GitHub with github_commit_attachment. Gmail search syntax: from:, subject:, newer_than:7d, filename:jpg. By default only messages with an attachment are returned; set requireAttachment=false to find a message whose text is in the body itself and read it with gmail_get_message. Only a ~200-character snippet is shown here.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gmail_find_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoMost messages to return.
queryNoGmail search query, e.g. 'from:alba newer_than:14d'.newer_than:30d
requireAttachmentNoKeep the implicit 'has:attachment' filter. false searches every message, including ones whose content is in the email body (read it with gmail_get_message).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Changed2 schema fields changedv0.10.0
    • addedInput schema / properties / max / description
      Added value: +"Most messages to return."
    • addedInput schema / properties / requireAttachment
      Added value: +{
      +  "default": true,
      +  "description": "Keep the implicit 'has:attachment' filter. false searches every message, including ones whose content is in the email body (read it with gmail_get_message).",
      +  "type": "boolean"
      +}
  3. Addedv0.8.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only, idempotency, open-world and non-destructiveness, so the description focuses on adding value: the implicit has:attachment filter, the ~200-character snippet limitation, and the Gmail search syntax. Remaining gaps include pagination behavior and whether max truncates silently, but the disclosure is well above the annotation baseline.

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

Conciseness4/5

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

Purpose and scope are front-loaded, and the routing advice follows in a logical order. It is somewhat dense as a single run-on opening sentence, but no clause is filler.

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

Completeness4/5

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

With no output schema, the description takes on the burden of describing returns and does so at a high level (attachment name, type, size, snippet). The only meaningful omission is how results are ordered or paginated when max is reached, which is minor for a 3-parameter search tool.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema by giving concrete Gmail search operators (from:, subject:, newer_than:7d, filename:jpg) and restating the requireAttachment toggle in terms of the practical consequence of switching it off.

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 opens with a specific verb and resource ('Search the authorized Gmail mailbox and list matching messages with their attachments') and names the returned fields (name, type, size). It clearly distinguishes itself from gmail_get_message by framing this as attachment discovery rather than body reading.

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 states the downstream use case (commit to GitHub via github_commit_attachment) and explicitly routes the agent elsewhere when the content lives in the body, naming both requireAttachment=false and gmail_get_message as the alternative. When-to-use and when-not-to-use are both present.

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