microsoft / microsoft/work-iq

[Mail MCP] Add "move message" tool to enable inbox triage workflows (move to folder / archive)

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
132
Avg merge
5d 19h
Merged PRs (30d)
6

Description

Area

Work IQ Mail MCP server (mcp_MailTools) — Microsoft Graph mail tools (preview)

Summary / Feature Request

Please add a Mail MCP tool that can MOVE an existing message to another mail folder (e.g., Archive, Processed, Action Required, etc.). Today, the Mail MCP server provides the ability to read/search messages and delete messages, but does not provide a way to move messages into a folder. This makes it difficult to build reliable inbox triage and workflow automation scenarios where messages must be categorized and retained rather than deleted.

Why this matters (real workflow impact)

We're trying to build an agent workflow that:

  1. identifies messages matching criteria (sender, subject, keywords, etc.)
  2. takes action to manage the inbox (triage)
  3. preserves messages for audit/tracking by filing them into folders

With only read/search + delete, the agent can't complete common inbox-management patterns like:

  • “Move to Processed” after handling
  • “Move to Needs Review” for exceptions
  • “Move to Archive” for retention
  • “Move to ” for organization

Deletion is not an acceptable substitute for many business workflows because it removes the message rather than classifying it.

Current Mail MCP tools (gap)

The current Mail MCP server lists tools such as:

  • getMessage / searchMessages (read)
  • deleteMessage (delete)
  • createMessage / sendDraft (compose/send)
  • reply / replyAll (respond)
    …but there is no moveMessage / moveToFolder equivalent. This is a major capability gap for inbox automation.

(Ref: Work IQ Mail MCP reference page)

Proposed Tool(s)

Option A: Add a dedicated move tool:

  • mcp_MailTools_graph_mail_moveMessage

Required parameters:

  • id: message ID
  • destinationFolderId OR destinationFolderPath (either one)

Optional parameters:

  • createFolderIfMissing: boolean
  • headers: optional

Return:

  • newMessageId (Graph typically creates a new ID after move)
  • destinationFolderId
  • movedDateTime

Option B: Support "archive" as a first-class operation:

  • mcp_MailTools_graph_mail_archiveMessage
    (Which moves to the default archive folder)
Acceptance Criteria
  • Can move a message to:
    • a standard folder (Inbox, Archive, Deleted Items, etc.)
    • a custom folder
  • Works for messages found via searchMessages
  • Returns the new message ID after move
  • Handles permissions and common errors clearly (folder not found, insufficient permissions, etc.)
Workarounds attempted
  • Deleting messages is not acceptable because we need classification + retention.
  • Replying/sending drafts does not help with inbox state management.
  • Without move, workflows become brittle because there is no way to reliably mark "processed" while retaining the original message.
Additional Notes

This request is specifically about enabling reliable agent-driven inbox triage workflows. A move capability would significantly expand the practical use of Mail MCP beyond read-only + delete.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Work IQ Mail MCP server's existing getMessage, searchMessages, and deleteMessage tool registrations, then review Microsoft Graph's message move operation and folder permissions. Resolve whether the dedicated move tool or archive operation is in scope, then verify the listed acceptance criteria for standard and custom folders, returned IDs, and common errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.