Skip to main content
Glama
Receipt Sweep

Receipt Sweep

by saranya-ms

search_emails

Read-only

Search mailbox folders by sender, subject, text, or date range to find receipts and invoices. Returns matching email IDs and metadata for follow-up reading.

Instructions

Search for emails in a folder.

Args: folder: Mailbox folder to search (default 'INBOX'). Use list_folders() to see all available folders. Common: INBOX, Sent, Trash, [Gmail]/All Mail, Bulk (Yahoo spam), Archive. from_address: Filter by sender email address. subject_contains: Filter by text in the subject line. body_or_subject: Search for text in the subject OR body. since_date: Only emails on or after this date (YYYY-MM-DD). before_date: Only emails before this date (YYYY-MM-DD). limit: Max results to return (default 50, newest first).

Returns a JSON list of {id, date, from, subject} for matching emails. Use read_email() with the id to get the full content.

Input Schema

NameRequiredDescriptionDefault
limitNo
folderNoINBOX
since_dateNo
before_dateNo
from_addressNo
body_or_subjectNo
subject_containsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safe-read profile, and the description adds genuinely useful context beyond it: default limit of 50 returned newest-first, the exact result fields ({id, date, from, subject}), and the follow-up path via read_email(). It does not discuss pagination beyond the limit or rate limits, keeping it short of a 5.

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 purpose sentence, then a scannable Args block, then the return shape and follow-up hint. The args block is long but earns its place given 0% schema coverage; only minor trimming would be possible without losing information.

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 7-parameter read tool with an output schema, the description covers the gaps that matter: folder discovery, date formats, result fields, and the read_email follow-up. The one missing piece is an explicit cross-reference to search_all_folders for cross-folder queries.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does: every one of the 7 params is explained, including the folder default and example values, the YYYY-MM-DD date formats, and limit's default and ordering. This fully compensates for the empty schema descriptions.

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 and resource ('Search for emails in a folder') and scopes it to a single folder, which implicitly contrasts with the sibling search_all_folders. However, it never names that sibling, so the distinction is left for the agent to infer from names 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?

Gives concrete routing context: directs to list_folders() to discover folders and to read_email() with the id for full content. It does not explicitly state when to prefer search_all_folders over this single-folder tool, so the alternative is only implied.

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