Skip to main content
Glama

Search inbound emails

searchEmails
Read-onlyIdempotent

Find particular inbound emails. Use this when you are looking for specific messages: a full-text query (q) over subject, body, sender and recipient, or structured filters on sender, recipient, subject, body, attachments, spam score, or the sent email they reply to. Results can be ranked by relevance or date and carry a body snippet. To page through the inbox newest first, or to wait for mail that has not arrived yet, use listEmails instead. Each row is id, thread_id, received_at, from, to, subject, status, a snippet of the body and attachment_count when there are attachments; open one with getEmail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoFull-text query matched across subject, body, sender, and recipient. Every word must match, so fewer words find more; put a phrase in double quotes. An upper-case OR between words, phrases, or subject: / body: terms accepts either (invoice OR receipt). OR binds tighter than the implicit AND: acme invoice OR receipt means acme and either invoice or receipt. OR cannot join the other field filters, and there is no NOT. Field filters can be written inline: from:, to:, subject:, body:, has:attachment, before:, after:, domain:, status:, awaiting:, automated:.
toNoFilter to emails addressed to this recipient.
bodyNoFilter to emails whose body contains this string.
fromNoFilter to emails from this sender address or domain.
fullNoSet true for the record as stored. By default the result is a compact view for reading, which leaves out per-row delivery, webhook and classification state (message_id, domain and org ids, spam score, sizes, webhook status).
sortNoSort order. Defaults to relevance when there is text to rank against (q, subject or body) and to received_at_desc otherwise; relevance without any such text is treated as received_at_desc. Use received_at_asc with date_from for polling new mail.
limitNoMaximum number of emails to return (1 to 100, default 50).
cursorNoPagination cursor from a previous response's `meta.cursor` field.
statusNoFilter to emails in this processing status.
date_toNoInclusive upper bound on received_at. An ISO 8601 date-time with Z or a UTC offset ("2026-10-01T09:00:00Z", "2026-10-01T09:00:00-04:00"), or a calendar date ("2026-10-01"), which runs to the end of that day, UTC. A time with no offset is read as UTC.
snippetNoWhether rows read with full: true carry highlighted match fragments for a text query (default true). The body snippet on each row is returned either way.
subjectNoFilter to emails whose subject contains this string.
date_fromNoInclusive lower bound on received_at. An ISO 8601 date-time with Z or a UTC offset ("2026-10-01T09:00:00Z", "2026-10-01T09:00:00-04:00"), or a calendar date ("2026-10-01"), which starts at 00:00 UTC. A time with no offset is read as UTC.
domain_idNoFilter to emails received on a specific verified domain.
spam_score_ltNoFilter to emails with a spam score strictly below this value.
has_attachmentNoFilter to emails that have (true) or lack (false) attachments.
include_facetsNoSet true to also get aggregated facet counts (by sender, domain, status and whether there is an attachment) for the whole result set. Left out by default.
spam_score_gteNoFilter to emails with a spam score at or above this value.
reply_to_sent_email_idNoFilter to inbound emails that are replies to a specific sent email ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
toolYes
statusYes
statusTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changed
    • changedInput schema / properties / date_from / description
      Previous value: -"Inclusive lower bound on received_at (ISO 8601)."New value: +"Inclusive lower bound on received_at. An ISO 8601 date-time with Z or a UTC offset (\"2026-10-01T09:00:00Z\", \"2026-10-01T09:00:00-04:00\"), or a calendar date (\"2026-10-01\"), which starts at 00:00 UTC. A time with no offset is read as UTC."
    • removedInput schema / properties / date_from / format
      Removed value: -"date-time"
    • changedInput schema / properties / date_to / description
      Previous value: -"Inclusive upper bound on received_at (ISO 8601)."New value: +"Inclusive upper bound on received_at. An ISO 8601 date-time with Z or a UTC offset (\"2026-10-01T09:00:00Z\", \"2026-10-01T09:00:00-04:00\"), or a calendar date (\"2026-10-01\"), which runs to the end of that day, UTC. A time with no offset is read as UTC."
    • removedInput schema / properties / date_to / format
      Removed value: -"date-time"
    • addedInput schema / properties / full
      Added value: +{
      +  "default": false,
      +  "description": "Set true for the record as stored. By default the result is a compact view for reading, which leaves out per-row delivery, webhook and classification state (message_id, domain and org ids, spam score, sizes, webhook status).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / has_attachment / description
      Previous value: -"Filter to emails that have (\"true\") or lack (\"false\") attachments."New value: +"Filter to emails that have (true) or lack (false) attachments."
    • removedInput schema / properties / has_attachment / enum
      Removed value: -[
      -  "true",
      -  "false"
      -]
    • changedInput schema / properties / has_attachment / type
      Previous value: -"string"New value: +"boolean"
    • changedInput schema / properties / include_facets / default
      Previous value: -"true"New value: +false
    • changedInput schema / properties / include_facets / description
      Previous value: -"Include aggregated facet counts (sender, domain, status) in the response (default true)."New value: +"Set true to also get aggregated facet counts (by sender, domain, status and whether there is an attachment) for the whole result set. Left out by default."
    • removedInput schema / properties / include_facets / enum
      Removed value: -[
      -  "true",
      -  "false"
      -]
    • changedInput schema / properties / include_facets / type
      Previous value: -"string"New value: +"boolean"
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of emails to return (1–100, default 50)."New value: +"Maximum number of emails to return (1 to 100, default 50)."
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / q / description
      Previous value: -"Full-text query matched across subject, body, sender, and recipient."New value: +"Full-text query matched across subject, body, sender, and recipient. Every word must match, so fewer words find more; put a phrase in double quotes. An upper-case OR between words, phrases, or subject: / body: terms accepts either (invoice OR receipt). OR binds tighter than the implicit AND: acme invoice OR receipt means acme and either invoice or receipt. OR cannot join the other field filters, and there is no NOT. Field filters can be written inline: from:, to:, subject:, body:, has:attachment, before:, after:, domain:, status:, awaiting:, automated:."
    • changedInput schema / properties / snippet / default
      Previous value: -"true"New value: +true
    • changedInput schema / properties / snippet / description
      Previous value: -"Include a short body snippet in each result (default true)."New value: +"Whether rows read with full: true carry highlighted match fragments for a text query (default true). The body snippet on each row is returned either way."
    • removedInput schema / properties / snippet / enum
      Removed value: -[
      -  "true",
      -  "false"
      -]
    • changedInput schema / properties / snippet / type
      Previous value: -"string"New value: +"boolean"
    • changedInput schema / properties / sort / description
      Previous value: -"Sort order. Use received_at_asc with date_from for polling new mail."New value: +"Sort order. Defaults to relevance when there is text to rank against (q, subject or body) and to received_at_desc otherwise; relevance without any such text is treated as received_at_desc. Use received_at_asc with date_from for polling new mail."
  2. Changed18 schema fields changed
    • addedInput schema / properties / body / description
      Added value: +"Filter to emails whose body contains this string."
    • addedInput schema / properties / cursor / description
      Added value: +"Pagination cursor from a previous response's `meta.cursor` field."
    • addedInput schema / properties / date_from / description
      Added value: +"Inclusive lower bound on received_at (ISO 8601)."
    • addedInput schema / properties / date_to / description
      Added value: +"Inclusive upper bound on received_at (ISO 8601)."
    • addedInput schema / properties / domain_id / description
      Added value: +"Filter to emails received on a specific verified domain."
    • addedInput schema / properties / from / description
      Added value: +"Filter to emails from this sender address or domain."
    • addedInput schema / properties / has_attachment / description
      Added value: +"Filter to emails that have (\"true\") or lack (\"false\") attachments."
    • addedInput schema / properties / include_facets / description
      Added value: +"Include aggregated facet counts (sender, domain, status) in the response (default true)."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of emails to return (1–100, default 50)."
    • addedInput schema / properties / q / description
      Added value: +"Full-text query matched across subject, body, sender, and recipient."
    • addedInput schema / properties / reply_to_sent_email_id / description
      Added value: +"Filter to inbound emails that are replies to a specific sent email ID."
    • addedInput schema / properties / snippet / description
      Added value: +"Include a short body snippet in each result (default true)."
    • addedInput schema / properties / sort / description
      Added value: +"Sort order. Use received_at_asc with date_from for polling new mail."
    • addedInput schema / properties / spam_score_gte / description
      Added value: +"Filter to emails with a spam score at or above this value."
    • addedInput schema / properties / spam_score_lt / description
      Added value: +"Filter to emails with a spam score strictly below this value."
    • addedInput schema / properties / status / description
      Added value: +"Filter to emails in this processing status."
    • addedInput schema / properties / subject / description
      Added value: +"Filter to emails whose subject contains this string."
    • addedInput schema / properties / to / description
      Added value: +"Filter to emails addressed to this recipient."
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources