Skip to main content
Glama
Receipt Sweep

Receipt Sweep

by saranya-ms

read_email

Read-only

Retrieve a specific email by message ID and folder to extract receipt data, including date, sender, subject, body, and attachment names and sizes for expense tracking.

Instructions

Read the full content of a specific email.

Args: message_id: The message ID from search_emails results. folder: The folder the message is in (must match the search).

Returns the email's date, sender, subject, body text, and a list of any attachments (with filenames and sizes). The body is taken from whichever of the plain-text or HTML parts contains the order details. If has_pdf is true and the body has no amount, call read_pdf_attachment.

Input Schema

NameRequiredDescriptionDefault
folderNoINBOX
message_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, so the safety profile is covered. The description adds useful behavior beyond that: the folder must match the search, the body is pulled from whichever part contains the order details, and a conditional hand-off to read_pdf_attachment. It does not mention pagination or error behavior, but the added context is meaningful.

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-loads the purpose, then parameters, then return behavior in a compact block with no filler. The references to 'order details' and 'amount' are narrowly domain-specific and slightly muddy a generic email reader, but overall it is tight and well-ordered.

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 need not be enumerated, yet the description still summarizes the returned fields and explains source-selection of the body. Combined with the annotation-carried safety profile, an agent has nearly everything needed to call it correctly.

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 description coverage is 0%, so the description carries the burden and largely compensates: message_id is sourced from search_emails, and folder is described with the constraint that it 'must match the search' (beyond the schema's plain default of INBOX). Both parameters gain semantic meaning not present in the schema.

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 and resource ('Read the full content of a specific email') and implicitly differentiates from siblings by naming search_emails as the source of message_id and read_pdf_attachment as a follow-up. An agent can tell this is the single-message full-content reader, distinct from the search/list tools.

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?

Explains how to obtain the input ('message_id from search_emails results') and gives an explicit conditional branch to an alternative tool ('if has_pdf is true and the body has no amount, call read_pdf_attachment'). It lacks an explicit when-not-to-use statement, but the routing guidance is concrete.

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