Skip to main content
Glama
Outlook MCP Server

Outlook MCP Server

by kennymatsudo

archive_matching

Archives messages in an Outlook folder by sender and/or age, showing a preview match count before confirming bulk cleanup.

Instructions

Archive every message in a folder that matches the criteria, without collecting ids. The tool for large backlogs: "archive read mail older than a year", "archive everything from news@example.com".

Needs older_than_days or sender (or both), so a whole folder can never be archived by accident. read_state: any, read or unread. confirm_count: omit it first; the preview returns the match count and ten samples. Show them to the user, then call again with confirm_count equal to that count. Archives up to 1000 per call. If remaining is above zero, preview again (the count will have changed) and repeat.

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

Input Schema

NameRequiredDescriptionDefault
folderNoinbox
senderNo
read_stateNoany
confirm_countNo
older_than_daysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses the guardrail preventing whole-folder archiving, the 1000-per-call cap, the preview-then-confirm interaction, sample and count return values, and the `remaining` signal for continuation. These are non-obvious behaviors an agent could not infer from the schema.

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 purpose and the differentiator, then the safety rule, then the procedure — a logical order with no filler sentences. It is slightly dense and the running prose about repeating the preview could be tightened, but every sentence carries actionable information.

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

Completeness5/5

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

Despite having no output schema and no annotations, the description explains what the call returns (match count, ten samples, `remaining`) and how to act on those values. Nothing an agent needs to invoke this multi-step destructive tool safely is missing.

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 description coverage is 0%, so the description must compensate, and it does for four of five parameters: older_than_days and sender as required filter criteria, read_state with its values (any/read/unread), and confirm_count with its full workflow. The `folder` parameter and its 'inbox' default are never mentioned, which is the one remaining gap.

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 scope — 'Archive every message in a folder that matches the criteria, without collecting ids' — which cleanly separates it from archive_messages (id-based) and search_message_ids. The examples ('archive read mail older than a year') make the resource and filter model concrete.

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?

Explicitly frames the tool as 'the tool for large backlogs', states the safety prerequisite (older_than_days or sender required), and gives the exact two-step procedure: omit confirm_count, show preview to user, re-call with the count. It even covers the repeat loop when `remaining` is above zero.

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