Skip to main content
Glama

List emails

list_emails
Read-onlyIdempotent

List workspace email summaries, newest first.

    Summaries contain IDs and metadata. ``get_email`` reads the body of a
    specific message.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum records returned on this page.
cursorNoPagination cursor: the ``next_cursor`` from the previous page. Omitted: the first page.
statusNoOnly emails currently in this status; ``received`` means inbound. Omitted: every status.
directionNoOnly mail received by the workspace (``inbound``) or only mail it sent (``outbound``). Omitted: both.
llm_modelNoThe calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / llm_model / description
      Previous value: -"Model ID of the calling agent. Optional. Recorded for analytics only."New value: +"The calling agent's provider model ID, as shown in the client's model configuration when available. Recorded for analytics."
  2. Changed5 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"How many items one page holds. ``next_cursor`` in the response points to the next page."New value: +"Maximum records returned on this page."
    • addedOutput schema / $defs
      Added value: +{
      +  "EmailSummary": {
      +    "description": "Trimmed view for list endpoints — drops the message bodies.\n\nBodies can be large and contain PII; paging through a year of mail\nshouldn't return every byte of every message just to render a list.\nUse ``EmailResponse`` (via ``GET /emails/{id}``) for the full row.",
      +    "properties": {
      +      "bcc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "BCC recipient email addresses, if any.",
      +        "title": "Bcc Addresses"
      +      },
      +      "cc_addresses": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "CC recipient email addresses, if any.",
      +        "title": "Cc Addresses"
      +      },
      +      "direction": {
      +        "default": "outbound",
      +        "description": "'outbound' for emails Hail sent, 'inbound' for emails received.",
      +        "enum": [
      +          "outbound",
      +          "inbound"
      +        ],
      +        "title": "Direction",
      +        "type": "string"
      +      },
      +      "email_domain_id": {
      +        "anyOf": [
      +          {
      +            "format": "uuid",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The sending domain used, if from_address belongs to one of the org's configured domains.",
      +        "title": "Email Domain Id"
      +      },
      +      "end_reason": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reason delivery failed or bounced, if applicable. Null on success or while pending.",
      +        "title": "End Reason"
      +      },
      +      "failed_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the send failed, ISO 8601 timestamp. Null unless it failed.",
      +        "title": "Failed At"
      +      },
      +      "from_address": {
      +        "description": "Sender email address.",
      +        "title": "From Address",
      +        "type": "string"
      +      },
      +      "from_name": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Display name used on the From: header, when the sender supplied one. Always null on inbound rows.",
      +        "title": "From Name"
      +      },
      +      "id": {
      +        "description": "Unique identifier for this email.",
      +        "format": "uuid",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "metadata": {
      +        "additionalProperties": true,
      +        "description": "Free-form JSON object attached to the email, as sent on create. Not interpreted by Hail.",
      +        "title": "Metadata",
      +        "type": "object"
      +      },
      +      "organization_id": {
      +        "description": "Organization that sent or received this email.",
      +        "format": "uuid",
      +        "title": "Organization Id",
      +        "type": "string"
      +      },
      +      "provider_message_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "The email provider's identifier for this message, if assigned.",
      +        "title": "Provider Message Id"
      +      },
      +      "reply_to": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Reply-To email address, if set.",
      +        "title": "Reply To"
      +      },
      +      "requested_at": {
      +        "description": "When the send was requested, ISO 8601 timestamp.",
      +        "format": "date-time",
      +        "title": "Requested At",
      +        "type": "string"
      +      },
      +      "sent_at": {
      +        "anyOf": [
      +          {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "When the message was handed to the provider, ISO 8601 timestamp. Null until sent.",
      +        "title": "Sent At"
      +      },
      +      "status": {
      +        "description": "Delivery status: 'queued', 'sent', 'delivered', 'failed', 'bounced', 'complained', or 'received' (inbound emails).",
      +        "enum": [
      +          "queued",
      +          "sent",
      +          "delivered",
      +          "failed",
      +          "bounced",
      +          "complained",
      +          "received"
      +        ],
      +        "title": "Status",
      +        "type": "string"
      +      },
      +      "subject": {
      +        "description": "Email subject line.",
      +        "title": "Subject",
      +        "type": "string"
      +      },
      +      "to_addresses": {
      +        "description": "Recipient email addresses.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "To Addresses",
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "organization_id",
      +      "email_domain_id",
      +      "direction",
      +      "from_address",
      +      "from_name",
      +      "to_addresses",
      +      "cc_addresses",
      +      "bcc_addresses",
      +      "reply_to",
      +      "subject",
      +      "status",
      +      "end_reason",
      +      "provider_message_id",
      +      "requested_at",
      +      "sent_at",
      +      "failed_at",
      +      "metadata"
      +    ],
      +    "title": "EmailSummary",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "items": {
      +        "description": "Emails in this page, newest first.",
      +        "items": {
      +          "$ref": "#/$defs/EmailSummary"
      +        },
      +        "title": "Items",
      +        "type": "array"
      +      },
      +      "next_cursor": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Opaque cursor for the next page. Null when there are no more results.",
      +        "title": "Next Cursor"
      +      }
      +    },
      +    "required": [
      +      "items",
      +      "next_cursor"
      +    ],
      +    "title": "EmailListResponse",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "error": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / title
      Removed value: -"list_emails_toolDictOutput"
  3. Changed1 schema field changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Number of items per page."New value: +"How many items one page holds. ``next_cursor`` in the response points to the next page."
  5. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered by structured data. The description's useful addition is that results are summary records with IDs and metadata, not message bodies, which sets expectations about payload weight; however it says nothing about pagination behavior or defaults beyond what the schema already states.

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 short sentences, zero filler, with the scope constraint and the summary-vs-body distinction front-loaded before the alternative is mentioned.

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 read-only list tool with full schema coverage, an output schema, and complete annotations, the description supplies the essential scoping and routing information. The only gap is that an agent reading the description alone would not learn that results are filterable by status and direction, though the schema covers this.

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 limit, cursor, status, direction, and llm_model are all fully documented in the input schema. The description adds no meaning beyond that — it never mentions filtering by status or direction, so the baseline of 3 applies.

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?

The description states a specific verb and resource ("List workspace email summaries"), specifies ordering ("newest first"), and explicitly scopes the payload to summaries containing IDs and metadata rather than bodies. An agent can distinguish it from get_email on the strength of the text alone.

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

Usage Guidelines4/5

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

It names the sibling alternative and the condition that selects it: when you need the body of a specific message, use get_email rather than this list. It does not discuss when to prefer filtering by status/direction or when a different list_* tool applies, so guidance is clear but not exhaustive.

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.