Skip to main content
Glama

Fluxmail Cloud

List emails in several accounts

search_emails_batch
Read-only

List or search emails in up to 20 accounts at once, with one result group per account. Filter with query, which takes typed search such as from:ann@example.com is:unread, and use folder for a folder role. Each account pages with its own pageToken.

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": {
      "accounts": "<accounts>"
    },
    "name": "search_emails_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoTyped search. Plain words search the message text; quote a phrase or a value that has spaces. Filters: from:, to:, subject:, in:inbox|sent|drafts|archive|spam|trash|all, is:read, is:unread, is:starred, is:unstarred, has:attachment, -has:attachment, after:YYYY-MM-DD (inclusive) and before:YYYY-MM-DD (exclusive), in UTC. Terms combine with AND; OR and parentheses are searched as text.
folderNo
accountsYes
pageSizeNoDefaults to 25
includeSnippetNoRequest or suppress message previews. Gmail and Outlook include them unless this is false. IMAP mailboxes include them only when this is true.
includeSearchContextNoInclude a match-centered body excerpt; requires search words in query

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / includeSnippet / description
      Previous value: -"Request or suppress message previews"New value: +"Request or suppress message previews. Gmail and Outlook include them unless this is false. IMAP mailboxes include them only when this is true."
  2. Changed15 schema fields changed
    • removedInput schema / properties / after
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "YYYY-MM-DD received date, inclusive in UTC"
      -}
    • removedInput schema / properties / before
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "YYYY-MM-DD received date, exclusive in UTC"
      -}
    • removedInput schema / properties / from
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "maxLength": 2048,
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedInput schema / properties / hasAttachment
      Removed value: -{
      -  "type": [
      -    "boolean",
      -    "null"
      -  ]
      -}
    • changedInput schema / properties / includeSearchContext / description
      Previous value: -"Include a match-centered body excerpt; requires a portable text query"New value: +"Include a match-centered body excerpt; requires search words in query"
    • addedInput schema / properties / query / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / query / description
      Previous value: -"Typed portable search syntax"New value: +"Typed search. Plain words search the message text; quote a phrase or a value that has spaces. Filters: from:, to:, subject:, in:inbox|sent|drafts|archive|spam|trash|all, is:read, is:unread, is:starred, is:unstarred, has:attachment, -has:attachment, after:YYYY-MM-DD (inclusive) and before:YYYY-MM-DD (exclusive), in UTC. Terms combine with AND; OR and parentheses are searched as text."
    • removedInput schema / properties / query / maxLength
      Removed value: -2048
    • removedInput schema / properties / query / minLength
      Removed value: -1
    • removedInput schema / properties / query / type
      Removed value: -"string"
    • removedInput schema / properties / read
      Removed value: -{
      -  "type": [
      -    "boolean",
      -    "null"
      -  ]
      -}
    • removedInput schema / properties / starred
      Removed value: -{
      -  "type": [
      -    "boolean",
      -    "null"
      -  ]
      -}
    • removedInput schema / properties / subject
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "maxLength": 2048,
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedInput schema / properties / to
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "maxLength": 2048,
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedInput schema / required
      Previous value: -[
      -  "accounts",
      -  "query"
      -]New value: +[
      +  "accounts"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "exhausted": {
      +          "type": "boolean"
      +        },
      +        "groups": {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "accountId": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "accountId"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "groups",
      +        "exhausted"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "type": "object"
      +}
  4. Changed10 schema fields changed
    • addedInput schema / properties / accounts / items / properties / accountId / maxLength
      Added value: +512
    • changedInput schema / properties / after / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / before / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / from / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / from / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • addedInput schema / properties / query / maxLength
      Added value: +2048
    • addedInput schema / properties / subject / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / subject / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • addedInput schema / properties / to / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / to / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
  5. Changed40 schema fields changed
    • changedInput schema / $schema
      Previous value: -"https://json-schema.org/draft/2020-12/schema"New value: +"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / accounts / items / properties / accountId / maxLength
      Removed value: -512
    • addedInput schema / properties / accounts / items / properties / pageToken / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / accounts / items / properties / pageToken / minLength
      Removed value: -1
    • removedInput schema / properties / accounts / items / properties / pageToken / type
      Removed value: -"string"
    • addedInput schema / properties / after / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / after / description
      Added value: +"YYYY-MM-DD received date, inclusive in UTC"
    • removedInput schema / properties / after / format
      Removed value: -"date"
    • removedInput schema / properties / after / pattern
      Removed value: -"^(?:(?:\\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])))$"
    • removedInput schema / properties / after / type
      Removed value: -"string"
    • addedInput schema / properties / before / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / before / description
      Added value: +"YYYY-MM-DD received date, exclusive in UTC"
    • removedInput schema / properties / before / format
      Removed value: -"date"
    • removedInput schema / properties / before / pattern
      Removed value: -"^(?:(?:\\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])))$"
    • removedInput schema / properties / before / type
      Removed value: -"string"
    • addedInput schema / properties / folder / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "inbox",
      +      "sent",
      +      "drafts",
      +      "archive",
      +      "spam",
      +      "trash",
      +      "all"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / folder / enum
      Removed value: -[
      -  "inbox",
      -  "sent",
      -  "drafts",
      -  "archive",
      -  "spam",
      -  "trash",
      -  "all"
      -]
    • removedInput schema / properties / folder / type
      Removed value: -"string"
    • removedInput schema / properties / from / maxLength
      Removed value: -2048
    • changedInput schema / properties / from / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / hasAttachment / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • addedInput schema / properties / includeSearchContext / description
      Added value: +"Include a match-centered body excerpt; requires a portable text query"
    • changedInput schema / properties / includeSearchContext / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • addedInput schema / properties / includeSnippet / description
      Added value: +"Request or suppress message previews"
    • changedInput schema / properties / includeSnippet / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • addedInput schema / properties / pageSize / anyOf
      Added value: +[
      +  {
      +    "maximum": 100,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / pageSize / default
      Removed value: -25
    • addedInput schema / properties / pageSize / description
      Added value: +"Defaults to 25"
    • removedInput schema / properties / pageSize / maximum
      Removed value: -100
    • removedInput schema / properties / pageSize / minimum
      Removed value: -1
    • removedInput schema / properties / pageSize / type
      Removed value: -"integer"
    • addedInput schema / properties / query / description
      Added value: +"Typed portable search syntax"
    • removedInput schema / properties / query / maxLength
      Removed value: -2048
    • changedInput schema / properties / read / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • changedInput schema / properties / starred / type
      Previous value: -"boolean"New value: +[
      +  "boolean",
      +  "null"
      +]
    • removedInput schema / properties / subject / maxLength
      Removed value: -2048
    • changedInput schema / properties / subject / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / to / maxLength
      Removed value: -2048
    • changedInput schema / properties / to / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "accounts"
      -]New value: +[
      +  "accounts",
      +  "query"
      +]
  6. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  7. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety is covered. The description adds meaningful behavior beyond that: one result group per account and independent pagination via each account's pageToken. It does not cover partial-account failures or rate-limit behavior, which keeps it from a 5.

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

Conciseness5/5

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

The description is front-loaded with the core batch scope and grouping behavior, then covers query, folder, and pagination in two compact sentences. Every clause adds practical guidance with no filler.

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?

For a six-parameter batch search tool with an output schema and safety annotations, the description covers the essential call semantics: account limit, grouping, query filtering, folder role, and per-account pagination. It leaves optional parameters to the schema and does not address partial results or failures across accounts, which is a minor gap.

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 67%, and the schema already provides detailed query syntax, folder enum, page size, snippet, and search-context descriptions. The description adds useful meaning for the nested accounts array by explaining that each account pages with its own pageToken, but it does not mention pageSize, includeSnippet, or includeSearchContext.

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 states a specific verb and resource: list or search emails across up to 20 accounts at once, with one result group per account. That clearly conveys batch multi-account scope, though it does not explicitly contrast with single-account search_emails or list_emails_batch.

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 up to 20 accounts at once' implies this tool is for multi-account listing/searching, giving usable context. But it gives no explicit when-not conditions or alternatives such as search_emails for one account or list_emails_batch for plain batch listing.

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