Skip to main content
Glama

search_and_fetch_emails

Read-only

Search your email inbox using filters and fetch the full content of specific emails, downloading attachments to your project folder.

Instructions

Searches the user's live email inbox. By default, searches only the Inbox folder (matching what the user sees in their mail client) — this excludes deleted items, drafts, and spam. Use filters to find specific emails (e.g., 'is_unread=True' for new emails, 'days_ago=7' for last week, 'folder=sent' for sent items, 'folder=all' to search the entire mailbox including trash). It returns a list of lightweight email previews. To read the full email body, thread history, and automatically download attachments to local disk, call this tool again and provide the specific email_id. Emails often contain attachments. It is highly recommended to always provide the working_directory parameter so attachments are saved directly to the user's actual project folder. This directory path refers to the user's native operating system, not the LLM's sandbox environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
senderNoFilter by the sender's email address or name.
subjectNoFilter by keywords in the subject line.
has_attachmentsNoIf True, only returns emails that contain file attachments.
attachment_nameNoFilter by a specific attachment filename.
is_unreadNoIf True, returns ONLY unread emails. If False, returns ONLY read emails. Leave empty for both.
days_agoNoFilter emails received in the last N days (e.g., 7 for last week).
folderNoThe mailbox folder to search in. Defaults to 'inbox' when omitted, which matches what the user sees in their mail client and excludes deleted items, drafts, and spam. Use 'sent' to search sent items. Use 'all' ONLY when the user explicitly asks to search across the entire mailbox including trash/deleted items.
limitNoMaximum number of emails to retrieve (default: 10).
offsetNoPagination offset to skip the first N emails.
email_idNoIf provided, fetches the exact full email and downloads its attachments. Accepts short IDs from search results (e.g., 'msg_abc123') OR direct Adeu IDs (e.g., 'adeu_4052').
working_directoryNoOptional. The current working directory of the project or task. If provided, attachments will be saved here under an 'adeu_attachments' subfolder. If omitted, attachments are saved to the system temp directory.
Behavior1/5

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

The annotation readOnlyHint=true contradicts the description's claim that the tool downloads attachments to local disk, which is a write operation. This inconsistency misleads the agent about the tool's side effects.

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 description is clear and front-loaded with core purpose. While slightly verbose (10 sentences), each sentence adds value and there is minimal redundancy.

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 tool with 11 parameters and no output schema, the description covers essential context: default folder behavior, fetch mode, attachment handling, and working directory. It lacks details on return format but is otherwise complete.

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%, baseline 3. The description adds value by providing usage examples (e.g., 'is_unread=True', 'days_ago=7'), explaining the behavior of email_id (accepts short IDs or Adeu IDs), and recommending working_directory for attachment storage.

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 clearly states the tool searches the user's live email inbox and fetches full email with attachments when an email_id is provided. It differentiates the two modes and is distinct from sibling tools like create_email_draft.

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?

The description explains when to use the fetch mode (by providing email_id) and gives specific filter examples. It also cautions about using 'folder=all' only when explicitly requested. However, it does not explicitly contrast with sibling tools or exclude any use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dealfluence/adeu'

If you have feedback or need assistance with the MCP directory API, please join our Discord server