Skip to main content
Glama

Fluxmail Cloud

Search emails

search_emails
Read-only

Search one account with typed portable syntax. The query supports text, from:, to:, subject:, in:, read and starred states, attachments, and date filters.

Input Schema

NameRequiredDescriptionDefault
toNo
fromNo
readNo
afterNoYYYY-MM-DD received date, inclusive in UTC
queryYesTyped portable search syntax
beforeNoYYYY-MM-DD received date, exclusive in UTC
folderNoFolder role (inbox, sent, drafts, trash, spam, starred, archive, all) or a label/folder name. Use all or omit this field to search all mail except Spam and Trash. An IMAP server's \All mailbox may use different rules.
starredNo
subjectNo
pageSizeNoDefaults to 25
accountIdNoAccount to operate on. Optional when exactly one account is connected.
pageTokenNonextPageToken from a previous call
hasAttachmentNo
includeSnippetNoRequest or suppress message previews
rawProviderQueryNoProvider-native Gmail syntax or Outlook KQL for one compatible account
includeSearchContextNoInclude a match-centered body excerpt; requires a portable text query

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "exhausted": {
      +          "type": "boolean"
      +        },
      +        "items": {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "accountId": {
      +                "type": "string"
      +              },
      +              "attachments": {
      +                "items": {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "filename": {
      +                      "type": "string"
      +                    },
      +                    "id": {
      +                      "type": "string"
      +                    },
      +                    "mimeType": {
      +                      "type": "string"
      +                    },
      +                    "sizeBytes": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "id",
      +                    "filename",
      +                    "mimeType",
      +                    "sizeBytes"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "body": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "html": {
      +                    "type": "string"
      +                  },
      +                  "text": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "bodyTruncation": {
      +                "additionalProperties": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "nextOffset": {
      +                      "type": "number"
      +                    },
      +                    "totalChars": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "totalChars"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "object"
      +              },
      +              "date": {
      +                "type": "string"
      +              },
      +              "flags": {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "draft": {
      +                    "type": "boolean"
      +                  },
      +                  "read": {
      +                    "type": "boolean"
      +                  },
      +                  "starred": {
      +                    "type": "boolean"
      +                  }
      +                },
      +                "required": [
      +                  "read",
      +                  "starred",
      +                  "draft"
      +                ],
      +                "type": "object"
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "subject": {
      +                "type": "string"
      +              },
      +              "threadId": {
      +                "type": "string"
      +              },
      +              "to": {
      +                "items": {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "email": {
      +                      "type": "string"
      +                    },
      +                    "name": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "email"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "threadId",
      +              "accountId",
      +              "to",
      +              "subject",
      +              "date",
      +              "flags"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "nextPageToken": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "items",
      +        "exhausted"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "data"
      +  ],
      +  "type": "object"
      +}
  2. Changed13 schema fields changed
    • changedInput schema / properties / accountId / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • 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"
      +  }
      +]
    • changedInput schema / properties / folder / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 2048,
      +    "minLength": 1,
      +    "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 / rawProviderQuery / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / rawProviderQuery / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • 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"
      -]
  3. Changed48 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#"
    • addedInput schema / properties / accountId / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / accountId / description
      Added value: +"Account to operate on. Optional when exactly one account is connected."
    • removedInput schema / properties / accountId / maxLength
      Removed value: -512
    • removedInput schema / properties / accountId / minLength
      Removed value: -1
    • removedInput schema / properties / accountId / 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: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / folder / description
      Added value: +"Folder role (inbox, sent, drafts, trash, spam, starred, archive, all) or a label/folder name. Use all or omit this field to search all mail except Spam and Trash. An IMAP server's \\All mailbox may use different rules."
    • removedInput schema / properties / folder / maxLength
      Removed value: -2048
    • 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 / pageToken / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / pageToken / description
      Added value: +"nextPageToken from a previous call"
    • removedInput schema / properties / pageToken / minLength
      Removed value: -1
    • removedInput schema / properties / pageToken / type
      Removed value: -"string"
    • addedInput schema / properties / query / description
      Added value: +"Typed portable search syntax"
    • removedInput schema / properties / query / maxLength
      Removed value: -2048
    • addedInput schema / properties / rawProviderQuery / description
      Added value: +"Provider-native Gmail syntax or Outlook KQL for one compatible account"
    • removedInput schema / properties / rawProviderQuery / maxLength
      Removed value: -2048
    • changedInput schema / properties / rawProviderQuery / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • 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"
      +]
  4. 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"
  5. Added

TDQS

B3.4/5.0
Behavior3/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 the safety profile is covered. The description adds the single-account scoping constraint, but says nothing about pagination behavior, result caps, or how the query and top-level filter params interact — all of which matter for a 16-param search.

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?

Two tightly packed sentences with zero filler, and the primary scope statement is front-loaded ahead of the syntax inventory.

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?

The output schema and annotations relieve the description of return-value and safety explanation, and pagination params are documented in the schema. Still missing for a 16-param tool is sibling differentiation and any note on how query-syntax operators relate to the equivalent structured filter parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 63% schema description coverage, the description does real work by enumerating the portable query grammar (text, from:, to:, subject:, in:, read/starred states, attachments, date filters), which the schema leaves as an opaque 'Typed portable search syntax'. It does not, however, explain the overlap between those query operators and the separate from/to/subject/read/starred fields, leaving a meaningful ambiguity.

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?

States a specific verb and resource ('Search one account') and scopes it to a single account with a portable typed syntax. An agent can tell it is a search operation, but nothing in the text distinguishes it from the sibling 'search_emails_batch' or from 'list_emails'.

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

Usage Guidelines2/5

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

No when-to-use, when-not-to-use, or alternative routing is provided. The closest signal, 'one account', is a scope constraint rather than guidance; an agent must infer on its own when to pick search_emails_batch, list_emails, or rawProviderQuery instead.

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