Skip to main content
Glama
Automata MCP

Automata MCP

List emails

list-emails
Read-onlyIdempotent

List email metadata newest first, one page at a time, filtered by folder, date range, unread, flagged, or attachments; excludes bodies and supports result paging.

Instructions

[Email] List one page of emails, newest first: sender, recipients, subject, date, read state and attachment names — no body. Pass folder (a path from list-mail-folders) to list one folder; without it every synced folder this token may read is listed, and an email filed in several folders appears once with each folder in folders. Filter with since/until, unread, flagged and hasAttachments. A response is one page: when hasMore is true call again with nextPage and otherwise the same arguments (including window) until hasMore is false before summarising. covered is the span this page actually covers; totalMatching counts the emails in the request. Pass an emailId to read-email for the text. To find emails by sender, subject or words, use search-emails instead of paging.

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": "list-emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page, counting back from the newest. Walk this up while `hasMore` is true.
limitNoHow many emails to return in this page
sinceNoOnly emails received at or after this date, e.g. 2024-03-01 or 2024-03-01T12:00:00Z
untilNoOnly emails received at or before this date. Pass back `window.until` from a previous page when paging a range.
folderNoFolder path from list-mail-folders, e.g. "INBOX". Omit for every synced folder.
unreadNotrue for unread emails only, false for read ones only
flaggedNotrue for flagged (starred) emails only
hasAttachmentsNotrue for emails with attachments only

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description still adds substantial behavior beyond them: pagination semantics, the response metadata fields (hasMore, covered, totalMatching, folders), and the non-obvious deduplication rule that an email filed in several folders appears once per folder. The 'no body' constraint and the instruction to finish paging before summarising are exactly the traits annotations cannot express.

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?

Dense and front-loaded: scope first, then folder behavior, then filters, then the paging loop, then sibling routing. Nearly every clause carries information, but the single long paragraph mixes response-shape, paging, and alternative-tool guidance, and the nextPage/window phrasing adds noise relative to the actual schema.

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, yet the description compensates by naming the returned fields and the response envelope (hasMore, nextPage, covered, totalMatching, folders). Combined with the paging loop and the fallback to search-emails, an agent has everything needed to call this correctly and interpret the result.

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 documents every parameter; the description still adds real meaning by tying `folder` to list-mail-folders output and explaining the since/until filtering intent. It loses a point for referencing a `nextPage` argument and a `window` object that do not exist in the schema (the schema exposes `page` and `window.until` only inside the until description), which could send an agent looking for parameters it cannot supply.

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 plus the exact scope: 'List one page of emails, newest first' with an enumerated field list (sender, recipients, subject, date, read state, attachment names) and an explicit negative ('no body'). It distinguishes itself from search-emails and read-email by naming both siblings and their roles, so an agent can pick correctly without opening schemas.

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 rules: use read-email when you have an emailId for body text, use search-emails when finding by sender/subject/words, use list-mail-folders to obtain a folder path, and omit `folder` to span all synced folders. It also gives a concrete paging loop (repeat with nextPage until hasMore is false before summarising), which is the kind of procedural guidance agents usually get wrong.

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