Skip to main content
Glama

Gmail Get Mail Digest

gmail_get_mail_digest
Read-onlyIdempotent

List recent received and sent mail as a single digest with snippets to catch up on a chosen lookback window, excluding drafts, Spam, and Trash.

Instructions

List the mail received and sent in a recent time window (default the last 3 days) as one feed with snippets, with no category or importance filtering; drafts, Spam and Trash are left out. Use it to catch up on recent mail; use gmail_search_emails to find mail by sender, subject or any Gmail query, and gmail_check_mail_updates to poll for new mail since a saved checkpoint. Returns messages (id, thread_id, from, subject, date, snippet, unread, has_attachments, direction 'received' or 'sent'), count, window and account_timezone; there is no next page. Read bodies with gmail_read_emails.

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_get_mail_digest"
  }
}

Input Schema

NameRequiredDescriptionDefault
windowNoLookback window: a number of days (d), hours (h) or weeks (w), e.g. '24h' or '2w'. Mail received or sent since now minus the window is listed.3d
max_itemsNoMessages to return. There is no next page: when the window holds more, shorten it or page through gmail_search_emails instead.
unread_onlyNoWhen true, only unread messages are listed (adds is:unread); by default read and unread both are.

Output Schema

NameRequiredDescriptionDefault
countNoNumber of items in this response.
windowNoThe lookback window that was applied, e.g. '3d'.
has_moreNoWhether another page is available.
messagesNoReceived and sent messages in the window; drafts excluded.
fetched_atNoRFC3339 time when this response was fetched.
next_page_tokenNoOpaque token for the next page, or null.
account_timezoneNoIANA time zone of every time in this result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv2.2.0
    • changedInput schema / properties / max_items / description
      Previous value: -"Maximum messages to return, 1 to 100 (default 25). There is no next page: when the window holds more, shorten it or page through gmail_search_emails instead."New value: +"Messages to return. There is no next page: when the window holds more, shorten it or page through gmail_search_emails instead."
    • addedInput schema / properties / max_items / maximum
      Added value: +100
    • addedInput schema / properties / max_items / minimum
      Added value: +1
    • changedInput schema / properties / window / description
      Previous value: -"Lookback window as '<int><unit>' where unit is d (days), h (hours), or w (weeks), e.g. '24h' or '2w'; default is '3d'. Mail received or sent since now minus the window is listed."New value: +"Lookback window: a number of days (d), hours (h) or weeks (w), e.g. '24h' or '2w'. Mail received or sent since now minus the window is listed."
    • addedInput schema / properties / window / pattern
      Added value: +"^\\d+[dhw]$"
    • addedOutput schema / properties / account_timezone / description
      Added value: +"IANA time zone of every time in this result."
    • addedOutput schema / properties / messages / description
      Added value: +"Received and sent messages in the window; drafts excluded."
    • addedOutput schema / properties / messages / items / description
      Added value: +"Message summary."
    • addedOutput schema / properties / messages / items / properties
      Added value: +{
      +  "date": {
      +    "description": "Received time in the account time zone.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "direction": {
      +    "description": "'received' or 'sent'.",
      +    "type": "string"
      +  },
      +  "from": {
      +    "description": "Sender name and email.",
      +    "type": "object"
      +  },
      +  "has_attachments": {
      +    "description": "Whether the message has attachments.",
      +    "type": "boolean"
      +  },
      +  "id": {
      +    "description": "Message ID for gmail_read_emails.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "snippet": {
      +    "description": "Short plain-text preview.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "subject": {
      +    "description": "Decoded subject.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "thread_id": {
      +    "description": "Conversation ID for gmail_get_thread.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "unread": {
      +    "description": "Whether the message is unread.",
      +    "type": "boolean"
      +  }
      +}
    • addedOutput schema / properties / messages / items / type
      Added value: +"object"
    • addedOutput schema / properties / window / description
      Added value: +"The lookback window that was applied, e.g. '3d'."
    • addedOutput schema / properties / window / type
      Added value: +"string"
  2. Addedv2.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/non-destructive annotations, it discloses three non-obvious traits: no category or importance filtering, drafts/Spam/Trash excluded, and no next page. The 'no next page' fact is repeated from the max_items schema text, which slightly dilutes the added value, but the scoping exclusions are genuinely new information.

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?

Three sentences, front-loaded with the purpose, followed by routing and then return shape — no filler. The return-field enumeration (id, thread_id, from, subject, ...) is somewhat listy and duplicates the existing output schema, which is the only sentence that does not fully earn its place.

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?

The tool is a simple three-param filtered list, all parameters are documented, an output schema covers the return values, and the description still supplies scope exclusions, the default window and routing to both siblings. Nothing an agent needs in order to call it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so window, max_items and unread_only are already fully documented with defaults, patterns and bounds. The description adds only the default window length ('the last 3 days'), which the schema already states, so this is the expected baseline 3.

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 states a specific verb and resource ('List the mail received and sent in a recent time window') and pins down the shape of the result ('as one feed with snippets, with no category or importance filtering'). It explicitly distinguishes itself from gmail_search_emails and gmail_check_mail_updates by name, so an agent can choose 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?

It gives an explicit use case ('catch up on recent mail') and then names the two alternatives with the conditions that select them: search by sender/subject/any Gmail query, or poll since a saved checkpoint. Exclusions are implicit in the scoping statement (drafts, Spam, Trash left out) and 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.

Deploy Server

Other Tools