Skip to main content
Glama

Gmail Check Mail Updates

gmail_check_mail_updates
Read-onlyIdempotent

Fetches new sent and received Gmail messages since a saved history checkpoint or timestamp for incremental polling; excludes drafts and returns the next checkpoint.

Instructions

Fetch the mail added to the mailbox since a saved checkpoint (since_history_id), or on a cold start since timestamp (the last day without one), received and sent alike with drafts left out, for incremental polling. Use gmail_get_mail_digest for a one-off look at a recent window and gmail_search_emails to search. Returns messages (the digest's fields), count, skipped_deleted_message_ids for mail deleted before it could be read, next_page_token, and next_history_id: the checkpoint to save for the next call, null until the last 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_check_mail_updates"
  }
}

Input Schema

NameRequiredDescriptionDefault
timestampNoCold-start alternative to since_history_id: an ISO-8601 datetime with offset, e.g. '2026-11-01T08:00:00Z', or epoch seconds; returns mail added after that time. Ignored when since_history_id is set; with neither, the last day of mail is returned.
page_tokenNoPagination token from a prior response's next_page_token. Resubmit the matching continue_from_history_id as since_history_id, or continue_from_timestamp as timestamp, until the final page returns a non-null next_history_id.
max_resultsNoPage size (default 100): history records when resuming from since_history_id, messages on a cold start. Continue with next_page_token.
since_history_idNoGmail historyId to resume from: the next_history_id saved from the previous call, or the continue_from_history_id while paging; omit for a cold start. On paginated responses, next_history_id is null until the final page; do not overwrite a saved checkpoint with null. Continue with next_page_token as page_token and preserve the response's continue_from_history_id or continue_from_timestamp. Takes precedence over timestamp.

Output Schema

NameRequiredDescriptionDefault
countNoNumber of items in this response.
has_moreNoWhether another page is available.
messagesNo
fetched_atNoRFC3339 time when this response was fetched.
next_history_idNo
next_page_tokenNoOpaque token for the next page, or null.
account_timezoneNo
skipped_deleted_countNo
continue_from_timestampNo
continue_from_history_idNo
skipped_deleted_message_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description still adds real behavior: drafts are excluded, sent mail is included, deleted mail is surfaced via skipped_deleted_message_ids, and next_history_id is null until the final page with an explicit warning not to overwrite a saved checkpoint with null. It does not discuss quota/rate-limit or history-expiry behavior, which matters for a historyId-based poller.

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?

Front-loaded with the core purpose and alternatives before the return-value detail, and nearly every clause carries information. The single long run-on sentence with nested asides makes it denser than ideal to scan, but there is little true 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?

For a paginated, checkpoint-driven polling tool with four optional params, the description covers the two entry modes, the paging loop, checkpoint persistence, and the skipped-message edge case. With an output schema present, the extra return-field summary is optional but reinforces the pagination contract rather than being required.

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 schema already defines each parameter; the description nevertheless adds workflow meaning by framing next_history_id as 'the checkpoint to save for the next call' and explaining the null-until-last-page rule and precedence of since_history_id over timestamp. This goes beyond restating field docs, though it duplicates a fair amount of the schema text.

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 ('Fetch the mail added to the mailbox') plus the exact scope: since a saved checkpoint, or since a timestamp on cold start, received and sent alike, drafts excluded. This distinguishes it immediately from gmail_get_mail_digest, gmail_search_emails, and gmail_read_emails, which are all named.

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?

Gives explicit routing: use gmail_get_mail_digest for a one-off look at a recent window, gmail_search_emails to search, and gmail_read_emails to read bodies. It also states the intended mode ('for incremental polling') and the cold-start fallback behavior (last day without a timestamp).

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