Skip to main content
Glama

Mailrun Agent Identity

List messages

list_messages
Read-onlyIdempotent

Message metadata for an identity (no bodies): direction, counterparty, subject (only when retention is on), status, size and time. Filter by direction, status, counterparty, subject_contains, since/until (ISO 8601).

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": {
      "identity_id": "<identity_id>"
    },
    "name": "list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size, 1-100 (default 25).
sinceNoISO 8601 date or date-time, inclusive.
untilNoISO 8601 date or date-time, inclusive; a bare date runs to end of day.
cursorNoOpaque next_cursor from the previous page.
statusNoOne of queued, sending, reconciliation_required, sent, failed, received, draft; other values match nothing.
directionNoin, out or draft; other values match nothing.
identity_idYesIdentity id from list_identities.
counterpartyNoExact email address to match.
subject_containsNoSubstring match; only identities with retain_content=true have stored subjects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely new behavioral context: results are metadata only with no bodies, and subjects are only present when the identity has retention enabled — a non-obvious conditional an agent could otherwise misread as data loss.

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 tight sentences with zero filler: the first front-loads what is returned and its key exclusion (no bodies), the second lists filters and formats. Nothing repeats the tool name or wastes space.

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 9-parameter filtered list tool with no output schema, the description covers return contents, the retention caveat, and all filtering axes, with pagination handled in the schema via limit/cursor. It stops just short of stating the response envelope (e.g. next_cursor presence), which an agent might want.

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 100%, so the baseline is 3. The description restates the filterable parameters and their ISO 8601 format, which the schema already documents, and only mildly reinforces the retention-dependent behavior of subject_contains.

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 names a specific resource ('Message metadata for an identity') and enumerates the returned fields (direction, counterparty, subject, status, size, time), plus an explicit scope caveat that bodies are excluded. It does not distinguish itself from plausible siblings such as list_threads or list_drafts, so an agent must infer the boundary.

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?

Usage is implied by the filter list ('Filter by direction, status, counterparty, subject_contains, since/until'), which tells the agent how to narrow results, and the identity_id requirement is clear from the schema. However there is no statement of when to choose this over listing threads or drafts, and no prerequisite guidance.

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