Skip to main content
Glama

List or search received messages

list_messages
Read-onlyIdempotent

Search or browse received inbox mail newest first, with sender, subject, date, preview and unread state. Filter by unread, text, sender, subject, or date range; read full messages separately.

Instructions

List or search received mail in the inbox, newest first, with sender, subject, date, a short preview and unread state. Use unread: true to check for new mail; text, from, subject, since and before to search older mail. Use read_message for the full text of one message. Only mail from allowed senders is ever included. Returns { messages, next_cursor }; pass next_cursor as cursor for older messages. Changes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoSender address or part of it
textNoWords to find in subject, sender or body
limitNoMaximum number of messages (1-50)
sinceNoOnly messages received at or after this date (YYYY-MM-DD) or date-time
beforeNoOnly messages received before this date or date-time
cursorNonext_cursor from a previous call, to get older messages
unreadNotrue: only unread messages
subjectNoWords in the subject

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.3.2
    • addedInput schema / properties / before
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "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])))$",
      +      "type": "string"
      +    },
      +    {
      +      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d+)?)?(Z|[+-]\\d{2}:\\d{2})?$",
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Only messages received before this date or date-time"
      +}
    • changedInput schema / properties / cursor / description
      Previous value: -"next_cursor from a previous call"New value: +"next_cursor from a previous call, to get older messages"
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Sender address or part of it",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of messages (1-50)"
    • addedInput schema / properties / subject
      Added value: +{
      +  "description": "Words in the subject",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / text
      Added value: +{
      +  "description": "Words to find in subject, sender or body",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / unread / description
      Added value: +"true: only unread messages"
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, yet the description still adds material context: only mail from allowed senders is included, results are newest-first, the return shape is { messages, next_cursor }, and next_cursor round-trips as cursor. 'Changes nothing' reinforces the safety profile in plain language.

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?

Front-loads purpose, then usage, then the alternative tool, then the return contract in a tight set of sentences. No redundant restatement of the name or schema.

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

Completeness5/5

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

Despite having no output schema, the description specifies the return shape and pagination. Combined with the sender-allowlist constraint and the harmless-read guarantee, an agent has everything needed to call and interpret this tool.

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?

Schema coverage is 100%, so parameters are documented structurally. The description still adds a layer of intent by grouping the filters into two use cases (unread check vs. older-mail search) and explaining the cursor round-trip, which is more than the schema alone conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('list or search') and resource ('received mail in the inbox'), plus ordering and the returned fields. It also explicitly distinguishes itself from read_message, which returns the full text of one message.

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

Usage Guidelines5/5

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

Gives concrete when-to-use guidance: 'Use unread: true to check for new mail; text, from, subject, since and before to search older mail.' It names the alternative tool (read_message) and the condition that selects it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.