Skip to main content
Glama
hasan-imam

mcp-outlook-applescript

by hasan-imam

search_emails

Search emails by subject or sender to retrieve metadata (subject, sender, date, flags) with optional date range and folder filters. Supports pagination; use get_email for full email content.

Instructions

Search emails by matching the query against subject line and sender address. Returns metadata only (subject, sender, date, flags) — no body preview. For email content, call get_email on a matching ID. Returns {items, count, hasMore} — increment offset by limit when hasMore is true. Use after/before (ISO 8601) to filter by received date. Use folder_id to scope to one folder. Pagination is fast at any offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoOnly include emails received on or after this ISO 8601 date (e.g., "2025-01-01T00:00:00Z"). If omitted, no start date filter.
limitNoMaximum number of emails to return, 1-200 (e.g., 50). Defaults to 25 if omitted. Search results are metadata-only (~400 bytes each), so larger pages are efficient.
queryYesSearch query text matched against subject and sender address (e.g., "invoice")
beforeNoOnly include emails received on or before this ISO 8601 date (e.g., "2025-12-31T23:59:59Z"). If omitted, no end date filter.
offsetNoNumber of emails to skip for pagination (e.g., 25 for page 2). Defaults to 0 if omitted.
folder_idNoFolder ID to limit search to (e.g., from list_folders). If omitted, searches all folders.
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 and does well. It discloses metadata-only returns, the response shape {items, count, hasMore}, and pagination behavior (increment offset by limit). It omits potential rate limits or sorting behavior, but for a read-only search tool, the core behavioral traits are covered.

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 and well-structured. It opens with the core purpose, then provides operational details on return shape, pagination, and filters. Every sentence contributes useful information with no repetition or filler.

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?

Given there is no output schema, the description effectively explains the return format and pagination pattern. It covers filtering, folder scoping, and points to get_email for content. It lacks sorting details or default folder behavior, but for a search tool with this complexity, it is sufficiently 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%, so baseline is 3, but the description adds meaningful context: pagination semantics ('increment offset by limit when hasMore is true'), result size ('~400 bytes each') to justify high limits, and the intended use of after/before for received-date filtering. This goes beyond the schema's property descriptions.

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 begins with a specific verb and resource: 'Search emails by matching the query against subject line and sender address.' It also distinguishes the tool from get_email by explicitly noting that it returns metadata only and no body preview, clarifying its role among sibling 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?

Provides clear context for when to use this tool and when to use an alternative: 'For email content, call get_email on a matching ID.' It also explains filtering with after/before and folder_id, and pagination with offset/hasMore. However, it doesn't explicitly contrast with list_emails, which is a related sibling.

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/hasan-imam/mcp-outlook-applescript'

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