Skip to main content
Glama

Cooper Email

Search threads

cooper_search_threads
Read-onlyIdempotent

Use this when you need the conversations that contain a keyword, sender, recipient, or subject, instead of each matching message. Read-only; requires auth. Inputs: inbox_id (required; inbox id, username, or email), q (required; every word must match subject, body text, from, or to), limit (optional, default 20, max 50). Returns {object:"list", inbox_id, q, data:[thread]} ordered by the best matching message. Each thread includes folder and purge_after. Omit folder to search inbox and archive only. An empty q returns HTTP 400 missing_query. A bad folder returns invalid_folder. An unknown inbox returns inbox_not_found.

Input Schema

NameRequiredDescriptionDefault
qYesSearch words; every word must match subject, body, from, or to
limitNoMax threads to return (default 20, max 50)
folderNoinbox, archive, spam, trash, or all. Omit to search inbox and archive only. A bad value returns invalid_folder.
inbox_idYesInbox id (inb_…), username, or full email address

Output Schema

NameRequiredDescriptionDefault
qNoThe search query that was run.
dataNoItems on this page, in the order the tool description gives.
objectNoObject type name, such as list, message, or thread.
inbox_idNoInbox id (inb_…) this object belongs to. Null when it applies to every inbox.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Matching threads, best match first.",
      +  "properties": {
      +    "data": {
      +      "description": "Items on this page, in the order the tool description gives.",
      +      "items": {
      +        "properties": {
      +          "assignment": {
      +            "description": "Current assignment {assignee, note, claimed_until, claim_active, …}, or null."
      +          },
      +          "attachment_count": {
      +            "description": "Number of attachments across the thread."
      +          },
      +          "created_at": {
      +            "description": "ISO-8601 time the object was created."
      +          },
      +          "folder": {
      +            "description": "inbox, archive, spam, or trash."
      +          },
      +          "id": {
      +            "description": "Thread id (thr_…)."
      +          },
      +          "inbox_id": {
      +            "description": "Inbox id (inb_…) this object belongs to. Null when it applies to every inbox."
      +          },
      +          "labels": {
      +            "description": "Labels on the object."
      +          },
      +          "last_message_id": {
      +            "description": "Id of the newest message."
      +          },
      +          "message_count": {
      +            "description": "Number of messages on the thread."
      +          },
      +          "preview": {
      +            "description": "Preview of the latest message."
      +          },
      +          "purge_after": {
      +            "description": "ISO-8601 time a trashed thread is deleted, or null."
      +          },
      +          "received_at": {
      +            "description": "ISO-8601 time of the latest inbound message, or null."
      +          },
      +          "recipients": {
      +            "description": "Addresses that received mail on this thread."
      +          },
      +          "senders": {
      +            "description": "Addresses that sent mail on this thread."
      +          },
      +          "sent_at": {
      +            "description": "ISO-8601 time of the latest outbound message, or null."
      +          },
      +          "subject": {
      +            "description": "Subject of the first message."
      +          },
      +          "updated_at": {
      +            "description": "ISO-8601 time the object last changed."
      +          }
      +        },
      +        "type": "object"
      +      }
      +    },
      +    "inbox_id": {
      +      "description": "Inbox id (inb_…) this object belongs to. Null when it applies to every inbox."
      +    },
      +    "object": {
      +      "description": "Object type name, such as list, message, or thread."
      +    },
      +    "q": {
      +      "description": "The search query that was run."
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / folder
      Added value: +{
      +  "description": "inbox, archive, spam, trash, or all. Omit to search inbox and archive only. A bad value returns invalid_folder.",
      +  "enum": [
      +    "inbox",
      +    "archive",
      +    "spam",
      +    "trash",
      +    "all"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, and non-destructive hints, yet the description still adds substantive context beyond them: auth requirement, result ordering by best matching message, per-thread fields (folder, purge_after), and three concrete error outcomes (missing_query, invalid_folder, inbox_not_found).

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?

The definition is front-loaded with the selection trigger and then packs inputs, return shape, and errors into a dense list with no filler sentences. It reads as a terse run-on enumeration rather than fully structured prose, which slightly hurts scanability.

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?

For a four-parameter read tool with full schema coverage and an output schema, nothing essential is missing: trigger, scoping default, ordering, thread fields, and failure modes are all present. An agent could invoke it correctly from the description alone.

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 coverage is 100%, so all four parameters are already documented, and the description's restatement of q and folder semantics largely duplicates the schema rather than extending it. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('the conversations that contain a keyword, sender, recipient, or subject') and explicitly contrasts itself with per-message results ('instead of each matching message'), which separates it from siblings like cooper_search_messages and cooper_list_threads.

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?

It gives an explicit trigger ('use this when you need the conversations...'), names the alternative behavior it replaces, and documents the folder-omission default (inbox and archive only) so the agent knows the scoping consequence before calling.

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.