Skip to main content
Glama
benpeter
by benpeter

search_emails

Search Outlook emails using full-text queries for natural language search, or structured filters for precise matching on sender, subject, and date range.

Instructions

Search emails using full-text query OR structured filters (mutually exclusive). Use query for natural search, or structured filters for precise field matching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoFilter by sender email address
limitNoMaximum results (default 20, max 500)
queryNoFull-text search query (uses Exchange search index). Cannot be combined with structured filters.
subjectNoFilter by subject (contains match)
folderIdNoScope search to a specific folder
receivedAfterNoISO 8601 datetime — only messages received after this time
receivedBeforeNoISO 8601 datetime — only messages received before this time
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing behavior. It explicitly states that query and structured filters are mutually exclusive, which is a key constraint. It also differentiates between natural language search and structured matching, giving the agent behavioral insight. However, it does not describe return format, pagination, or read-only nature, so it's not fully comprehensive.

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?

The description is concise, two sentences, and front-loads the core purpose. Every clause adds value, explaining the two modes and offering usage hints without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and moderate complexity with 7 parameters, the description is minimally complete but omits details like result structure, pagination, and any side effects. It covers the essential search modes but lacks context on what to expect in the response or how to handle edge cases like both query and filters being provided (which is implied to be invalid).

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?

The input schema provides descriptions for all 7 parameters, including constraints on query exclusivity and limit defaults. The description reinforces the mutual exclusivity but adds no new information beyond the schema. With 100% schema coverage, the baseline of 3 is appropriate.

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 emails and distinguishes between two modes (full-text query vs structured filters). The verb 'search' and resource 'emails' are specific, and the mention of mutually exclusive modes clarifies scope, differentiating it from simple retrieval tools like get_emails.

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 description provides guidance on how to use the tool ('Use query for natural search, or structured filters for precise field matching'), but it does not explicitly state when to choose this tool over alternatives like get_emails or get_email. The usage context is implied by the search-focused wording but lacks explicit exclusions or alternative recommendations.

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/benpeter/owa-mcp'

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