Skip to main content
Glama

Sickle — every mailbox for your agent

Search emails

search_emails
Read-only

Search one folder for text in email subjects and bodies. Results have the same fields, order and paging as list_emails. The search covers a single folder; list_mailbox_folders lists the account's others.

Input Schema

NameRequiredDescriptionDefault
emailYesThe email account address
limitNoHow many matches to return. Defaults to 20, capped at 100.
orderNoDate order for the matches: newest_first (the default) or oldest_first.newest_first
queryYesText to search for in email subject and body
offsetNoHow many matches to skip from the start of the ordering. Defaults to 0.
mailboxYesMailbox/folder to search, e.g. "INBOX". Search covers one folder at a time.

Output Schema

NameRequiredDescriptionDefault
orderYesDate order of `emails`.
queryNoThe search text, for search_emails. Absent for list_emails.
totalYesHow many emails the folder holds (or match the query) in all, not just this page.
emailsYesThis page of emails.
offsetYesPosition of this page's first email in the ordering, counting from 0.
mailboxYesThe folder listed or searched. UIDs below only mean something together with it.
next_offsetNoPass this as `offset` to get the next page. Absent on the last page.

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 cover readOnly and closed-world safety, so the bar is lower. The description adds genuinely new behavioral context: search spans subjects AND bodies, is limited to a single folder, and inherits list_emails' field order and paging semantics, which tells the agent the output shape without opening the schema.

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?

Three short sentences, front-loaded with the core action and scope, then the output-shape note, then the sibling pointer. No filler.

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?

An output schema exists, so return values needn't be explained, and the pointer to list_emails for field/order/paging semantics is a helpful shortcut. The only missing piece is explicit guidance on when to prefer this over list_emails.

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%, with descriptions for all six parameters including the limit cap and order enum, so the schema does the heavy lifting. The description only restates that query matches subject and body and that mailbox is a single folder, adding little beyond the schema.

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?

States a specific verb (search), resource (emails) and scope (one folder, subject and body text). It distinguishes itself from list_emails by noting results share fields/order/paging, but never states the substantive difference in selection (text match vs enumeration).

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?

The single-folder constraint is stated and list_mailbox_folders is named as the way to find other folders, which is useful context. However, there is no explicit 'use search_emails when you need to find messages matching text, use list_emails when you want to enumerate' guidance, so the choice against the closest sibling is left implied.

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