Skip to main content
Glama
Outlook MCP Server

Outlook MCP Server

by kennymatsudo

search_messages

Search Outlook messages by keyword or KQL across all folders or a specific folder, returning the newest matching summaries first.

Instructions

Find specific messages by keywords or KQL, newest first, across all folders or within one. Examples: from:alice@contoso.com subject:invoice, hasattachments:true, received>=2026-09-01. Returns at most 50 summaries.

folder: a well-known name or folder id to search only there. For a bulk action that needs every matching id, use search_message_ids. For all mail from one address, messages_from_sender is cheaper and complete.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
topNo
queryYes
folderNo

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?

No annotations exist, so the description carries the full burden, and it discloses substantive behavior: newest-first ordering, a hard cap of 50 returned summaries, and that folder scoping is optional. What it omits is the relationship between the `top` parameter and that 50 cap, and any note on pagination or failure modes when KQL is malformed.

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 core purpose and useful inline examples, then routing advice, with no filler sentences. The structure is slightly muddled because the `folder` clarification sits between the examples and the sibling routing, breaking what would otherwise be a clean purpose-to-alternatives flow.

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 explained, and the description still usefully notes the 50-summary ceiling. For a read-only, one-required-parameter search tool this is close to sufficient; the remaining gap is the undocumented `top` parameter and how it bounds results.

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 description coverage is 0%, so the description must compensate and it only partly does: `folder` is clarified as 'a well-known name or folder id', and `query` is conveyed through four concrete KQL examples. The third parameter, `top` (default 20), is never mentioned in the description, leaving its interaction with the stated 50-result cap undefined.

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 ('Find specific messages') plus the query mechanism (keywords or KQL) and default ordering ('newest first'). It also names the scope alternatives (all folders vs. one folder) and explicitly distinguishes itself from the two closest siblings, so an agent can select it without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given for both alternatives: use search_message_ids when a bulk action needs every matching id, and messages_from_sender when you want all mail from one address, described as 'cheaper and complete'. This is exactly the when-to-use / when-not-to-use guidance the dimension rewards.

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