Skip to main content
Glama

Search every mailbox

messages_list_all_mailboxes
Read-only

Search every mailbox you have connected in one call. The answer names the mailbox each result came from, names any mailbox it could not search, and is merged newest first by when each message arrived, a thread by its newest. A message whose recipients one answer cannot carry names the first that fit, omittedRecipients counting the rest. The mail of every mailbox mailboxes_list names is read and written with Multi Mail's tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesA Gmail mailbox, whatever its provider, reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ); one whose provider is imap is searched by message. An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. Any other mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, and one in: or label: naming one folder, by the name labels_list gives a label of type user or as inbox, sent, archive, drafts, spam or trash, a name holding a space quoted and a quote or backslash inside the quotes taking a backslash before it, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT.
byNomessage, the default, answers each matching message; thread answers each matching thread with every message in it.
viewNosummary, the default, carries each message's subject and snippet; headers leaves both out.
maxResultsNoHow many results to take from each mailbox.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
moreYes
shownYes
omittedNo
threadsNo
messagesNo
searchedYes
unreadableYes
unreachableYes
perMailboxMaxResultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / messages / items / properties / omittedRecipients
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / omittedRecipients
      Added value: +{
      +  "type": "number"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / omitted
      Added value: +{
      +  "type": "number"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / q / description
      Previous value: -"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, and one in: or label: naming one folder, by the name labels_list gives a label of type user or as inbox, sent, archive, drafts, spam or trash, a name holding a space quoted and a quote or backslash inside the quotes taking a backslash before it, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."New value: +"A Gmail mailbox, whatever its provider, reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ); one whose provider is imap is searched by message. An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. Any other mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, and one in: or label: naming one folder, by the name labels_list gives a label of type user or as inbox, sent, archive, drafts, spam or trash, a name holding a space quoted and a quote or backslash inside the quotes taking a backslash before it, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."
  4. Changed1 schema field changed
    • changedInput schema / properties / q / description
      Previous value: -"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."New value: +"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, and one in: or label: naming one folder, by the name labels_list gives a label of type user or as inbox, sent, archive, drafts, spam or trash, a name holding a space quoted and a quote or backslash inside the quotes taking a backslash before it, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."
  5. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  6. Changed1 schema field changed
    • changedInput schema / properties / q / description
      Previous value: -"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, plain words and quoted phrases, with no AND, OR or NOT, and answers the first page of a search by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."New value: +"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, is:unread, after: and before: as 2026/01/31, newer_than: in days, months or years, plain words and quoted phrases, with no AND, OR or NOT, and is searched by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."
  7. Changed3 schema fields changed
    • changedInput schema / properties / q / description
      Previous value: -"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."New value: +"A Gmail mailbox reads Gmail's search operators: from:, to:, cc:, subject:, is:unread, is:starred, in:sent, has:attachment, filename:pdf, after:2026/01/31, before:, newer_than:7d, larger:5M, OR, -word and ( ). An Outlook mailbox reads Microsoft's keyword query language - from:, to:, cc:, subject:, body:, received:, hasAttachments:true, plain words and quoted phrases, AND, OR and NOT in capitals - and never a filter expression such as isRead eq false. A few distinctive words, with OR between alternatives, miss less than a copied subject line or sentence. A mailbox whose provider is imap reads only from:, to: (never me), subject:, plain words and quoted phrases, with no AND, OR or NOT, and answers the first page of a search by message. Where the mailboxes are of different providers only from:, to:, subject:, plain words and quoted phrases are read alike, with no AND, OR or NOT."
    • changedOutput schema / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "from",
      -  "to",
      -  "cc",
      -  "bcc",
      -  "date",
      -  "draft",
      -  "draftId",
      -  "unread",
      -  "labelIds",
      -  "link",
      -  "mailbox"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "from",
      +  "to",
      +  "cc",
      +  "bcc",
      +  "date",
      +  "draft",
      +  "draftId",
      +  "unread",
      +  "labelIds",
      +  "mailbox"
      +]
    • changedOutput schema / properties / threads / items / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "from",
      -  "to",
      -  "cc",
      -  "bcc",
      -  "date",
      -  "draft",
      -  "draftId",
      -  "unread",
      -  "labelIds",
      -  "link"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "from",
      +  "to",
      +  "cc",
      +  "bcc",
      +  "date",
      +  "draft",
      +  "draftId",
      +  "unread",
      +  "labelIds"
      +]
  8. Changed32 schema fields changed
    • removedOutput schema / properties / messages / items / properties / bcc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / bcc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / cc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / cc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / draftId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / draftId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / from / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / from / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / snippet / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / snippet / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / subject / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / subject / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / messages / items / properties / to / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / messages / items / properties / to / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / bcc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / bcc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / cc / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / cc / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / draftId / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / draftId / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / from / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / from / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / snippet / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / snippet / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / subject / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / subject / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / to / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / to / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  9. First observed

TDQS

A3.6/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior beyond them: results name their source mailbox, unsearchable mailboxes are reported, results are merged newest-first with threads keyed by their newest message, and recipient lists are truncated with omittedRecipients counting the remainder.

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

Conciseness3/5

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

The purpose and merge semantics are front-loaded, but the sentences are long, clause-heavy and occasionally awkward ('The answer names the mailbox each result came from, names any mailbox it could not search...'), which slows an agent parsing the routing information. Some of the merging detail could be trimmed given an output schema exists.

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 an output schema present, return structure need not be explained, yet the description still covers cross-mailbox merge order, partial-failure reporting and recipient truncation. Combined with 100% parameter coverage, an agent has nearly everything needed to call it correctly; only explicit sibling routing 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 the schema already carries the heavy lifting on q, by, view and maxResults. The description only mildly extends this ('a thread by its newest' restates by=thread semantics) and adds no new syntax or format detail, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 scope: 'Search every mailbox you have connected in one call,' which clearly separates it from the single-mailbox sibling. It never names messages_list explicitly as the narrower alternative, so the differentiation is inferential rather than stated.

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

Usage Guidelines3/5

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

The phrase 'in one call' and 'every mailbox' implies when this is preferable to a per-mailbox search, and the closing sentence scopes which mailboxes are covered via mailboxes_list. However, there is no explicit when-not guidance (e.g., use messages_list for a single mailbox) and no stated prerequisites or limits.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources