Skip to main content
Glama

graph_search_mail

Search Outlook emails by keyword, optionally scoped to a folder or shared mailbox, and page through large result sets with compact fields.

Instructions

Search emails by keyword.

Args: query: Search query string. top: Maximum number of results (default 25). folder: Mail folder name or ID to search (default "", the whole mailbox). Scope the search to a folder when the mailbox holds thousands of messages. compact: Whether to return only the identifying fields instead of the full record (default false). Use it to page through large collections cheaply. next_link: Opaque nextLink URL from a previous call, used to fetch the next page. Overrides the other paging arguments when supplied. include_next_link: Whether to wrap the result as {items, next_link} so paging can continue (default false, which returns a bare list). immutable_ids: Whether to ask Graph for immutable message IDs (default false). A message ID changes when the message is moved, so a stored ID stops working; an immutable ID survives the move. mailbox: Shared mailbox address or user ID to act on. Empty targets your own mailbox. Requires the delegated Mail.*.Shared permissions.

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": "graph_search_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
queryYes
folderNo
compactNo
mailboxNo
next_linkNo
immutable_idsNo
include_next_linkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.1/5.0
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 disclose important behavior: pagination via next_link, how next_link overrides other paging arguments, compact versus full records, the include_next_link wrapper shape, immutable ID behavior, and shared-mailbox permission requirements. It still omits details such as which email fields keyword search covers and error or rate-limit behavior.

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 purpose is front-loaded in one sentence and followed by a structured Args section. The length is justified because none of the eight parameters have schema descriptions, and each parameter entry adds concrete meaning rather than repeating the schema.

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?

The description is quite complete for a complex email search tool with paging, compact mode, immutable IDs, and shared mailbox support. Because there is no output schema, it could still do more to explain returned record structure and keyword matching semantics, but the essential call behavior is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 explain all eight parameters, and it does so thoroughly. It documents query, top, folder, compact, next_link, include_next_link, immutable_ids, and mailbox with defaults, conditions, and behavioral implications beyond the bare schema.

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?

The description states a specific verb and resource: 'Search emails by keyword.' That clearly identifies the tool's function, but it does not explicitly distinguish it from sibling search tools such as graph_search_all or graph_search_messages.

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 gives useful conditional guidance for individual parameters, such as scoping to a folder for large mailboxes, using compact for cheap paging, and using immutable IDs when IDs may survive moves. However, it does not explicitly say when to prefer this tool over sibling search tools or when not to use it.

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

Deploy Server

Other Tools