Skip to main content
Glama

Cooper Email

List messages

cooper_list_messages
Read-onlyIdempotent

Use this when you need to check an inbox for new or recent mail (sent and received), for example after sending a message and waiting for a reply. Read-only; requires auth. Inputs: inbox_id (optional; inbox id, username, or email — omit to use the account's newest inbox), limit (optional, default 50, max 200), labels (optional; the message must have every label, for example ["unread"]), unread (optional boolean; true keeps only unread mail, false drops it), before (optional ISO-8601 exclusive upper bound on created_at), after (optional ISO-8601 exclusive lower bound on created_at), from (optional case-insensitive substring of From), to (optional case-insensitive substring of To or Cc), subject (optional case-insensitive substring), direction (optional inbound or outbound), thread_id (optional), ascending (optional; true returns oldest first), page_token (optional cursor), wait_seconds (optional integer from 0 to 55; when set, hold until unread mail arrives and return object inbox_wait with timed_out). Filters run on the server before limit. Returns {object:"list", inbox_id, data:[{id, thread_id, direction, status, from, to, subject, preview, created_at, labels, attachments?}], next_page_token}, newest first unless ascending is true. When wait_seconds is set, returns unread mail immediately if any is already stored. page_token is the base64url of created_at and id. Previews only, not full bodies: call cooper_get_message to read one message. Mark one read with cooper_update_message. Fails with 400 invalid_date, invalid_direction, invalid_ascending, invalid_page_token, invalid_label, invalid_unread, or label_conflict, or 404 inbox_not_found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoCase-insensitive substring of To or Cc. % and _ match those characters.
fromNoCase-insensitive substring of From. % and _ match those characters.
afterNoISO-8601 exclusive lower bound on created_at. A bad value returns invalid_date.
limitNoMax messages to return (default 50, max 200)
beforeNoISO-8601 exclusive upper bound on created_at. A bad value returns invalid_date.
labelsNoKeep messages that have every one of these labels. Example: ["unread"].
unreadNotrue lists only messages labeled unread. false omits them.
subjectNoCase-insensitive substring of the subject. % and _ match those characters.
inbox_idNoInbox id, username, or email. Omit to use the newest inbox.
ascendingNotrue lists oldest first. false, the default, lists newest first.
directionNoinbound or outbound. Anything else returns invalid_direction.
thread_idNoOnly messages on this thread (thr_…).
page_tokenNoCursor from next_page_token. A bad token returns invalid_page_token.
wait_secondsNoOptional. When set, hold until unread mail arrives, from 0 to 55 seconds. Returns immediately when unread mail is already stored. At most 5 waits can run at once for this key. The result is object inbox_wait with timed_out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / wait_seconds
      Added value: +{
      +  "description": "Optional. When set, hold until unread mail arrives, from 0 to 55 seconds. Returns immediately when unread mail is already stored. At most 5 waits can run at once for this key. The result is object inbox_wait with timed_out.",
      +  "type": "number"
      +}
  2. Changed9 schema fields changed
    • addedInput schema / properties / after
      Added value: +{
      +  "description": "ISO-8601 exclusive lower bound on created_at. A bad value returns invalid_date.",
      +  "type": "string"
      +}
    • addedInput schema / properties / ascending
      Added value: +{
      +  "description": "true lists oldest first. false, the default, lists newest first.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / before
      Added value: +{
      +  "description": "ISO-8601 exclusive upper bound on created_at. A bad value returns invalid_date.",
      +  "type": "string"
      +}
    • addedInput schema / properties / direction
      Added value: +{
      +  "description": "inbound or outbound. Anything else returns invalid_direction.",
      +  "enum": [
      +    "inbound",
      +    "outbound"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "description": "Case-insensitive substring of From. % and _ match those characters.",
      +  "type": "string"
      +}
    • addedInput schema / properties / page_token
      Added value: +{
      +  "description": "Cursor from next_page_token. A bad token returns invalid_page_token.",
      +  "type": "string"
      +}
    • addedInput schema / properties / subject
      Added value: +{
      +  "description": "Case-insensitive substring of the subject. % and _ match those characters.",
      +  "type": "string"
      +}
    • addedInput schema / properties / thread_id
      Added value: +{
      +  "description": "Only messages on this thread (thr_…).",
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "description": "Case-insensitive substring of To or Cc. % and _ match those characters.",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / labels
      Added value: +{
      +  "description": "Keep messages that have every one of these labels. Example: [\"unread\"].",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / unread
      Added value: +{
      +  "description": "true lists only messages labeled unread. false omits them.",
      +  "type": "boolean"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / limit / description
      Added value: +"Max messages to return (default 50, max 200)"
  5. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is largely covered. The description still adds real behavioral detail: server-side filtering before limit, the 0-55 second wait window with a five-concurrent-wait cap, the inbox_wait/timed_out return shape, page_token being a base64url composite, and an enumerated error set. That is useful, but much of it restates annotation-covered ground, keeping this at a solid 3 rather than higher.

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

Conciseness4/5

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

Front-loaded with the when-to-use condition, then inputs, then return shape, then error codes. Dense and almost entirely load-bearing, though the parameter enumeration in prose duplicates the schema and makes the block longer than a reader needs.

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?

There is no output schema, so the description carries the return contract itself and does so fully: field list, ordering, pagination token semantics, and the special inbox_wait shape under wait_seconds. Error codes are enumerated. Nothing needed to invoke correctly is missing.

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 the schema already documents every parameter and the baseline is 3. The description goes modestly beyond it by clarifying that wait_seconds yields an object inbox_wait with timed_out, that page_token encodes created_at and id, and that before/after are exclusive. These are genuine additions absent from the schema text.

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+resource ('check an inbox for new or recent mail (sent and received)') and immediately contrasts with the sibling that reads message bodies ('Previews only, not full bodies: call cooper_get_message'). An agent can distinguish this from cooper_search_messages or cooper_get_thread without opening a schema.

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?

Explicitly names the triggering scenario ('after sending a message and waiting for a reply') and routes to two alternatives with their conditions: cooper_get_message for full bodies and cooper_update_message to mark one read. It also flags required auth, which is a precondition rather than just context.

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.