Skip to main content
Glama

Search a mailbox

messages_list
Read-only

Search one connected mailbox in its own provider's query language, Gmail's or Outlook's. 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.
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.
mailboxYesThe mailbox's name or its email address.
pageTokenNoThe nextPageToken of the page before, asked with the same q and by. Outlook pages threads by their matching messages, so a thread can recur on a later page.
maxResultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
moreYes
shownYes
omittedNo
threadsNo
messagesNo
unreadableYes
nextPageTokenYes
resultSizeEstimateYes

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."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."
  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."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."
  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."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."
  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."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."
    • changedOutput schema / 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"
      +]
    • 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. Changed36 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 / nextPageToken / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / nextPageToken / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / resultSizeEstimate / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resultSizeEstimate / type
      Added value: +[
      +  "number",
      +  "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

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly=true, destructive=false and openWorld=false, so the safety profile is covered. The description adds genuine behavioral context about per-provider query dialects and the omittedRecipients output behavior, but it is marred by awkward prose and omits pagination/result-shape framing beyond what the schema says.

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

Conciseness2/5

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

The description is poorly front-loaded and hard to parse: 'A message whose recipients one answer cannot carry names the first that fit, omittedRecipients counting the rest' uses a confusing backward reference, and the final sentence about mailboxes_list is tangential. Only the first clause is clean; the rest buries and bloats the purpose.

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

Completeness3/5

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

An output schema exists and the safety profile is fully covered by annotations, so return values needn't be explained. Still, the one sentence that does discuss output (omittedRecipients) is redundant and cryptic, and the description gives no guidance on pagination behavior even though pageToken semantics are non-trivial (threads recurring across pages).

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 high (83%), and the schema already documents q, by, view, mailbox, pageToken and maxResults in depth, so the description does not need to carry parameter meaning. The description's provider-language remarks overlap with the q schema text rather than adding syntax the schema lacks, making baseline 3 appropriate.

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 first clause gives a specific verb and resource ('Search one connected mailbox') with a clear scope (one mailbox, provider's own query language), which an agent can distinguish from messages_list_all_mailboxes. However, it never names that sibling, so the differentiation is left implicit. The remaining sentences drift into output details (omittedRecipients) and cross-references rather than reinforcing purpose.

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?

Usage is only implied: the phrase 'one connected mailbox' hints that the all-mailbox variant is a separate tool, and the query-language detail signals search semantics. There is no explicit when-to-use, when-not-to-use, or named alternative, so an agent must infer routing from the sibling list.

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.