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, narrowed by the inputs beside q, or list its mail by those inputs alone. An Outlook mailbox without q reads one folder, the inbox unless folder names another, in order; with q it searches every folder and leaves off each page what the other inputs rule out, filtered counting them, so a short page can have more after it, and it answers no match past its 1,000th, ceiling marking the page where it stopped. Any other mailbox whose provider is imap leaves off each page what an instant, a size or has:attachment rules out, filtered counting them, and names under notSearched each folder the call had no time left to search. A message whose recipients one answer cannot carry names the first that fit, omittedRecipients counting the rest. The times it answers with carry their offset in the person's own time zone, which the answer names under now beside their time now in it - UTC where the person has stored no zone, as now says.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mailbox": "<mailbox>"
    },
    "name": "messages_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoA 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 ( ). 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: and cc: (never me), subject:, plain words and quoted phrases, -word or -"a phrase" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk. after: and before: written as a bare date open at midnight in the person's own time zone, save in an Outlook mailbox's query, whose dates Microsoft reads itself.
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; compact, the lightest page, carries only each message's id, threadId, sender, date, unread mark, subject and the first 100 characters of its snippet.
afterNoOnly mail that arrived at or after this instant, with its offset, as 2026-10-20T00:00:00Z.
focusNoOutlook alone: focused answers the mail Outlook sorts into Focused, other the mail in Other. Outlook sorts its inbox alone, and reads mail in every other folder as focused.
orderNonewest, the default, answers the newest mail first; oldest the oldest. Gmail answers newest first alone, and so does Outlook with q.
beforeNoOnly mail that arrived before this instant, written and read as after is.
folderNoOne folder to search: inbox, sent, archive, drafts, deleted or junk, or a folder's id from labels_list - on a Gmail connected by Google sign-in any label's, on Outlook a folder's and never a category's. A mailbox whose provider is imap takes no folder in q beside it.
unreadNotrue answers unread mail alone, false read mail alone.
flaggedNotrue answers flagged mail alone - starred on Gmail, flagged on Outlook - false the rest.
mailboxYesThe mailbox's name or its email address.
pageTokenNoThe nextPageToken of the page before, asked with every other input the same. Outlook, and a Gmail whose provider is imap, page threads by their matching messages, so a thread can recur on a later page.
maxResultsNoHow many results to take, 10 where left out.

Output Schema

NameRequiredDescriptionDefault
nowYesThe person's own time zone, in which every time this answer gives is written, and their time now in it.
moreYes
shownYes
ceilingNo
omittedNo
threadsNo
filteredNo
messagesNo
newestOnlyNoThe folders whose provider showed only their newest messages, each with how many it showed: every one holds more, and nothing before those was read, searched, counted or acted on, so finding nothing there says nothing of the rest.
unreadableYes
notSearchedNo
nextPageTokenYes
screeningWaitNoPresent where a message is marked not_yet_screened: the seconds to wait before reading those messages by their ids.
resultSizeEstimateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none; sign_in_letter, it is a letter from Lumman's own sign-in address, which no tool reads or acts on, so the person opens it at its link or in their own mail app."
    • changedOutput schema / properties / messages / items / properties / withheld / enum
      Previous value: -[
      -  "screening",
      -  "not_yet_screened",
      -  "too_large_to_screen"
      -]New value: +[
      +  "screening",
      +  "not_yet_screened",
      +  "too_large_to_screen",
      +  "sign_in_letter"
      +]
    • changedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none; sign_in_letter, it is a letter from Lumman's own sign-in address, which no tool reads or acts on, so the person opens it at its link or in their own mail app."
    • changedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / enum
      Previous value: -[
      -  "screening",
      -  "not_yet_screened",
      -  "too_large_to_screen"
      -]New value: +[
      +  "screening",
      +  "not_yet_screened",
      +  "too_large_to_screen",
      +  "sign_in_letter"
      +]
  2. Changed2 schema fields changed
    • changedOutput schema / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."
    • changedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."
  3. Changed4 schema fields changed
    • changedOutput schema / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."
    • changedOutput schema / properties / messages / items / properties / withheld / enum
      Previous value: -[
      -  "screening",
      -  "not_yet_screened"
      -]New value: +[
      +  "screening",
      +  "not_yet_screened",
      +  "too_large_to_screen"
      +]
    • changedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / description
      Previous value: -"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment."New value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment; too_large_to_screen, it needs more than that allowance ever holds, so the person opens it at its link, or finds it by its date where it has none."
    • changedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / enum
      Previous value: -[
      -  "screening",
      -  "not_yet_screened"
      -]New value: +[
      +  "screening",
      +  "not_yet_screened",
      +  "too_large_to_screen"
      +]
  4. Changed7 schema fields changed
    • removedOutput schema / properties / messages / items / properties / withheld / const
      Removed value: -"screening"
    • addedOutput schema / properties / messages / items / properties / withheld / description
      Added value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment."
    • addedOutput schema / properties / messages / items / properties / withheld / enum
      Added value: +[
      +  "screening",
      +  "not_yet_screened"
      +]
    • addedOutput schema / properties / screeningWait
      Added value: +{
      +  "description": "Present where a message is marked not_yet_screened: the seconds to wait before reading those messages by their ids.",
      +  "type": "number"
      +}
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / const
      Removed value: -"screening"
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / description
      Added value: +"Why none of its words are here: screening, it screened as an attack; not_yet_screened, the account's screening allowance had no room for it at that moment."
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / withheld / enum
      Added value: +[
      +  "screening",
      +  "not_yet_screened"
      +]
  5. Changed1 schema field changed
    • addedOutput schema / properties / newestOnly
      Added value: +{
      +  "description": "The folders whose provider showed only their newest messages, each with how many it showed: every one holds more, and nothing before those was read, searched, counted or acted on, so finding nothing there says nothing of the rest.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "folder": {
      +        "type": "string"
      +      },
      +      "shown": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "folder",
      +      "shown"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  6. Changed1 schema field changed
    • changedInput schema / properties / q / description
      Previous 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 ( ). 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: and cc: (never me), subject:, plain words and quoted phrases, -word or -\"a phrase\" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk."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 ( ). 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: and cc: (never me), subject:, plain words and quoted phrases, -word or -\"a phrase\" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk. after: and before: written as a bare date open at midnight in the person's own time zone, save in an Outlook mailbox's query, whose dates Microsoft reads itself."
  7. Changed2 schema fields changed
    • changedInput schema / properties / folder / description
      Previous value: -"One folder to search: inbox, sent, archive, drafts, deleted or junk, or a folder's id from labels_list - on Gmail by Google sign-in any label's, on Outlook a folder's and never a category's. A mailbox whose provider is imap takes no folder in q beside it."New value: +"One folder to search: inbox, sent, archive, drafts, deleted or junk, or a folder's id from labels_list - on a Gmail connected by Google sign-in any label's, on Outlook a folder's and never a category's. A mailbox whose provider is imap takes no folder in q beside it."
    • addedInput schema / properties / maxResults / description
      Added value: +"How many results to take, 10 where left out."
  8. Changed4 schema fields changed
    • changedInput schema / properties / view / description
      Previous value: -"summary, the default, carries each message's subject and snippet; headers leaves both out."New value: +"summary, the default, carries each message's subject and snippet; headers leaves both out; compact, the lightest page, carries only each message's id, threadId, sender, date, unread mark, subject and the first 100 characters of its snippet."
    • changedInput schema / properties / view / enum
      Previous value: -[
      -  "summary",
      -  "headers"
      -]New value: +[
      +  "summary",
      +  "headers",
      +  "compact"
      +]
    • changedOutput schema / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "date",
      -  "draftId"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "date"
      +]
    • changedOutput schema / properties / threads / items / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "date",
      -  "draftId"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "date"
      +]
  9. Changed10 schema fields changed
    • addedOutput schema / properties / messages / items / properties / focus
      Added value: +{
      +  "description": "Outlook alone, on a message in the inbox: whether it sits in Focused or Other.",
      +  "enum": [
      +    "focused",
      +    "other"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / hasFile
      Added value: +{
      +  "description": "Whether the message carries a file.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / messages / items / properties / important
      Added value: +{
      +  "description": "Whether it is marked important: Gmail's own importance mark, Outlook's high importance. A password mailbox other than a Gmail keeps none.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / messages / items / properties / invitation
      Added value: +{
      +  "description": "Whether it invites to a meeting or updates one; a cancellation or an answer to one does not.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / messages / items / properties / mailingList
      Added value: +{
      +  "description": "Whether it names a mailing list it came from, in a List-Id or List-Unsubscribe header.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / focus
      Added value: +{
      +  "description": "Outlook alone, on a message in the inbox: whether it sits in Focused or Other.",
      +  "enum": [
      +    "focused",
      +    "other"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / hasFile
      Added value: +{
      +  "description": "Whether the message carries a file.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / important
      Added value: +{
      +  "description": "Whether it is marked important: Gmail's own importance mark, Outlook's high importance. A password mailbox other than a Gmail keeps none.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / invitation
      Added value: +{
      +  "description": "Whether it invites to a meeting or updates one; a cancellation or an answer to one does not.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / mailingList
      Added value: +{
      +  "description": "Whether it names a mailing list it came from, in a List-Id or List-Unsubscribe header.",
      +  "type": "boolean"
      +}
  10. Changed3 schema fields changed
    • changedInput schema / properties / pageToken / description
      Previous value: -"The nextPageToken of the page before, asked with every other input the same. Outlook pages threads by their matching messages, so a thread can recur on a later page."New value: +"The nextPageToken of the page before, asked with every other input the same. Outlook, and a Gmail whose provider is imap, page threads by their matching messages, so a thread can recur on a later page."
    • changedInput schema / properties / q / description
      Previous 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: and cc: (never me), subject:, plain words and quoted phrases, -word or -\"a phrase\" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk."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 ( ). 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: and cc: (never me), subject:, plain words and quoted phrases, -word or -\"a phrase\" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk."
    • changedOutput schema / properties / threads / items / required
      Previous value: -[
      -  "id",
      -  "link",
      -  "messages"
      -]New value: +[
      +  "id",
      +  "messages"
      +]
  11. Changed4 schema fields changed
    • changedInput schema / properties / q / description
      Previous 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."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: and cc: (never me), subject:, plain words and quoted phrases, -word or -\"a phrase\" leaving it out, is:unread, one run of OR between any of those (as a OR b OR c), has:attachment, and larger: and smaller: in bytes or as 500K or 5M, after: and before: as 2026/01/31, newer_than: in days, months or years, 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 NOT, and is searched by message in every folder but the bin and junk."
    • addedOutput schema / properties / messages / items / properties / answered
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / notSearched
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / answered
      Added value: +{
      +  "type": "boolean"
      +}
  12. Changed3 schema fields changed
    • changedInput schema / properties / after / description
      Previous value: -"Only mail that arrived at or after this instant, with its offset, as 2026-10-20T00:00:00Z. Gmail and Outlook read it to the second, any other mailbox whose provider is imap by the day."New value: +"Only mail that arrived at or after this instant, with its offset, as 2026-10-20T00:00:00Z."
    • addedOutput schema / properties / now
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The person's own time zone, in which every time this answer gives is written, and their time now in it.",
      +  "properties": {
      +    "noneStored": {
      +      "description": "Present where the person has stored no time zone: that every time here is UTC, and how one gets stored.",
      +      "type": "string"
      +    },
      +    "time": {
      +      "type": "string"
      +    },
      +    "timeZone": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "timeZone",
      +    "time"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "shown",
      -  "unreadable",
      -  "more",
      -  "nextPageToken",
      -  "resultSizeEstimate"
      -]New value: +[
      +  "shown",
      +  "unreadable",
      +  "more",
      +  "nextPageToken",
      +  "resultSizeEstimate",
      +  "now"
      +]
  13. Changed11 schema fields changed
    • addedInput schema / properties / after
      Added value: +{
      +  "description": "Only mail that arrived at or after this instant, with its offset, as 2026-10-20T00:00:00Z. Gmail and Outlook read it to the second, any other mailbox whose provider is imap by the day.",
      +  "format": "date-time",
      +  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +  "type": "string"
      +}
    • addedInput schema / properties / before
      Added value: +{
      +  "description": "Only mail that arrived before this instant, written and read as after is.",
      +  "format": "date-time",
      +  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      +  "type": "string"
      +}
    • addedInput schema / properties / flagged
      Added value: +{
      +  "description": "true answers flagged mail alone - starred on Gmail, flagged on Outlook - false the rest.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / focus
      Added value: +{
      +  "description": "Outlook alone: focused answers the mail Outlook sorts into Focused, other the mail in Other. Outlook sorts its inbox alone, and reads mail in every other folder as focused.",
      +  "enum": [
      +    "focused",
      +    "other"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / folder
      Added value: +{
      +  "description": "One folder to search: inbox, sent, archive, drafts, deleted or junk, or a folder's id from labels_list - on Gmail by Google sign-in any label's, on Outlook a folder's and never a category's. A mailbox whose provider is imap takes no folder in q beside it.",
      +  "pattern": "^[A-Za-z0-9_=-]{1,512}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / order
      Added value: +{
      +  "description": "newest, the default, answers the newest mail first; oldest the oldest. Gmail answers newest first alone, and so does Outlook with q.",
      +  "enum": [
      +    "newest",
      +    "oldest"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / pageToken / description
      Previous value: -"The 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."New value: +"The nextPageToken of the page before, asked with every other input the same. Outlook pages threads by their matching messages, so a thread can recur on a later page."
    • addedInput schema / properties / unread
      Added value: +{
      +  "description": "true answers unread mail alone, false read mail alone.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "mailbox",
      -  "q"
      -]New value: +[
      +  "mailbox"
      +]
    • addedOutput schema / properties / ceiling
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / filtered
      Added value: +{
      +  "type": "number"
      +}
  14. Changed2 schema fields changed
    • removedOutput schema / properties / messages / items / properties / folder / enum
      Removed value: -[
      -  "inbox",
      -  "sent",
      -  "archive",
      -  "drafts",
      -  "deleted",
      -  "junk",
      -  "other"
      -]
    • removedOutput schema / properties / threads / items / properties / messages / items / properties / folder / enum
      Removed value: -[
      -  "inbox",
      -  "sent",
      -  "archive",
      -  "drafts",
      -  "deleted",
      -  "junk",
      -  "other"
      -]
  15. Changed4 schema fields changed
    • addedOutput schema / properties / messages / items / properties / withheld
      Added value: +{
      +  "const": "screening",
      +  "type": "string"
      +}
    • changedOutput schema / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "from",
      -  "to",
      -  "cc",
      -  "bcc",
      -  "date",
      -  "draft",
      -  "draftId",
      -  "unread",
      -  "labelIds"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "date",
      +  "draftId"
      +]
    • addedOutput schema / properties / threads / items / properties / messages / items / properties / withheld
      Added value: +{
      +  "const": "screening",
      +  "type": "string"
      +}
    • changedOutput schema / properties / threads / items / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "threadId",
      -  "from",
      -  "to",
      -  "cc",
      -  "bcc",
      -  "date",
      -  "draft",
      -  "draftId",
      -  "unread",
      -  "labelIds"
      -]New value: +[
      +  "id",
      +  "threadId",
      +  "date",
      +  "draftId"
      +]
  16. 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"
      +}
  17. Changed1 schema field changed
    • addedOutput schema / properties / omitted
      Added value: +{
      +  "type": "number"
      +}
  18. 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."
  19. 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."
  20. 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"
  21. 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."
  22. 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"
      +]
  23. 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"
      +]
  24. First observed

TDQS

A3.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnlyHint, destructiveHint false, openWorldHint false), and the description goes well beyond them with non-obvious behavior: paging artifacts from post-fetch filtering ('a short page can have more after it'), a hard answer ceiling at the 1,000th match, folders skipped for lack of time reported under notSearched, recipient truncation with omittedRecipients counting the rest, and timestamps carrying the person's own offset under now. That is exactly the operational context an agent can't get from annotations.

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 is front-loaded in the first clause, and for a 13-parameter, four-provider tool the length is defensible. But the prose is a chain of comma-spliced clauses ('leaves off each page what the other inputs rule out, filtered counting them') that is hard to parse, so information density comes at the cost of readability rather than genuine concision.

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 the description needn't document return shapes, and it instead covers the gotchas an agent must know: per-provider query dialects, pagination anomalies, result ceilings, and skipped folders. For a tool this complex the coverage is strong, though it omits any mention of when to reach for the sibling list/thread tools.

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 coverage is 100% and the q, view, focus, order, folder and pageToken descriptions are already extremely detailed, so the description mostly restates the same provider-specific query rules. It adds some framing (alternatives-vs-copied-subject-line advice, date parsing at local midnight) but nothing material about parameters that the schema does not already carry, 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 concrete verb-plus-resource ('Search one connected mailbox') and immediately scopes it to one mailbox and to the provider's native query language, which implicitly separates it from the all-mailboxes sibling. It never names that sibling or any other alternative, so the differentiation is left to the reader's inference 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?

It clearly explains the two modes of use - pass q to search, or list by the surrounding inputs alone - and describes how the mode changes scope per provider. However, it gives no guidance on when to pick this tool over messages_list_all_mailboxes or messages_get, and no exclusions or prerequisites are stated.

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.