microsoft / microsoft/work-iq

Add Graph-backed Outlook Inbox rule management (`messageRules`)

Open
#178 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

Summary

Please expose Microsoft Graph Outlook Inbox rule management through Work IQ, particularly the hosted workiq-preview entity tools.

Work IQ can manage messages and other Outlook entities, but /me/mailFolders/inbox/messageRules is not currently exposed. Natural-language requests to create or modify rules therefore cannot produce a confirmed, persistent Outlook rule.

Requested capability

Support listing, creating, updating, enabling/disabling, reordering, and deleting Inbox rules.

This could use the existing generic entity tools:

  • fetch
  • create_entity
  • update_entity
  • delete_entity
  • search_paths
  • get_schema

Dedicated rule tools would also work, but exposing the standard Graph resource through the existing entity surface seems sufficient.

Microsoft Graph support

Microsoft Graph v1.0 already provides full CRUD:

Operation Endpoint Least-privileged permission
List GET /me/mailFolders/inbox/messageRules MailboxSettings.Read
Create POST /me/mailFolders/inbox/messageRules MailboxSettings.ReadWrite
Update PATCH /me/mailFolders/inbox/messageRules/{id} MailboxSettings.ReadWrite
Delete DELETE /me/mailFolders/inbox/messageRules/{id} MailboxSettings.ReadWrite

For complete management, Work IQ needs delegated MailboxSettings.ReadWrite, or the equivalent capability exposed through the Work IQ Tools MCP resource and its path policy/allowlist.

Documentation:

Example use case

Create a rule that handles security-notification email:

{
  "displayName": "Delete selected PIM notifications",
  "sequence": 1,
  "isEnabled": true,
  "conditions": {
    "subjectContains": ["PIM:"]
  },
  "actions": {
    "delete": true,
    "stopProcessingRules": true
  }
}

The exact predicates and actions are represented by Graph's messageRulePredicates and messageRuleActions types.

Acceptance criteria

  1. search_paths discovers the messageRules collection and item paths.
  2. get_schema returns writable rule properties, predicates, exceptions, and actions.
  3. Rules can be listed with their IDs, sequence, enabled/error/read-only state, conditions, exceptions, and actions.
  4. Rules can be created and the resulting Graph rule ID is returned.
  5. Writable rules can be patched or deleted.
  6. Read-only rules are not presented as successfully modified.
  7. Destructive or externally communicating actions, such as permanent deletion, forwarding, or redirection, require user confirmation.
  8. Work IQ reports success only after receiving the corresponding Graph success response.

Why this matters

Inbox-rule automation is a natural extension of Work IQ's existing mail-management surface. Without Graph-backed support, assistants must fall back to fragile Outlook browser automation or may imply that a rule was created without returning a persistent rule ID.

Related but not duplicate: #51 discusses unsupported Outlook actions and false-positive success messaging for drafts.

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 with the existing fetch, create_entity, update_entity, delete_entity, search_paths, and get_schema entity tools and the Work IQ Tools MCP path policy or allowlist. Trace how Outlook entities are exposed, then verify the messageRules collection and item paths, schemas, permissions, confirmations, and success responses against the listed Microsoft Graph endpoints. Done means all acceptance criteria pass, including safe handling of read-only and destructive operations.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.