Skip to main content
Glama
uth-mail-mcp

uth-mail-mcp

by fotispetrou

search_messages

Read-only

Find mailbox messages newest first by full-text query, sender, recipient, subject, date range, folder, unread, or flagged filters; returns metadata for opening full message text.

Instructions

Find messages, newest first; with no filters, the latest ones.

query searches whole messages (headers and text) on the server. sender, to and subject match those headers, and to also covers Cc; Greek text there is matched without regard to case or accents, over the newest 3000 candidates. since and before are arrival dates (YYYY-MM-DD), before exclusive. Each result has uid, date, from, to, subject, read/flag state and whether it has attachments; use get_message for the text.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
limitNo
queryNo
sinceNo
beforeNo
folderNoinbox
senderNo
subjectNo
unread_onlyNo
flagged_onlyNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: server-side whole-message matching, a newest-3000-candidate search window, accent- and case-insensitive Greek matching, and an exclusive `before` boundary. Annotations already cover read-only/closed-world safety, so these operational constraints are the right value-add. Missing disclosure of pagination/limit behavior and what happens when the candidate cap is hit.

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 core behavior in one sentence, then groups parameter semantics tightly with backticks for scannability. Dense but every clause carries information; only the result-field enumeration edges toward redundancy given an output schema exists.

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 search tool with ten optional filters and an output schema, the description covers the hard parts: matching scope, date semantics, result-set cap, and the handoff to get_message. It is incomplete only on paging (limit) and the folder/unread/flagged filters, which an agent would otherwise have to guess at.

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 0%, so the description carries the full burden, and it does document query, sender, to/Cc, subject, since, and before with useful matching semantics and formats. However four of ten parameters — folder, limit, unread_only, flagged_only — get no mention, leaving real gaps for a 10-parameter tool.

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?

Opens with a specific verb+resource and default ordering: "Find messages, newest first; with no filters, the latest ones." It also signals a boundary with a sibling by directing full-text retrieval to get_message. Slightly short of 5 because folder scope (inbox default) is never stated even though it materially defines what is searched.

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 clear when-to-use routing for the top sibling ("use get_message for the text") and explains which filter to reach for depending on whether you want body text versus headers versus dates. No explicit exclusions or warnings about when this tool is the wrong choice beyond that one sibling handoff.

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