Add Graph-backed Outlook Inbox rule management (`messageRules`)
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:
fetchcreate_entityupdate_entitydelete_entitysearch_pathsget_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:
- https://learn.microsoft.com/graph/api/resources/messagerule
- https://learn.microsoft.com/graph/api/mailfolder-list-messagerules
- https://learn.microsoft.com/graph/api/mailfolder-post-messagerules
- https://learn.microsoft.com/graph/api/messagerule-update
- https://learn.microsoft.com/graph/api/messagerule-delete
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
search_pathsdiscovers themessageRulescollection and item paths.get_schemareturns writable rule properties, predicates, exceptions, and actions.- Rules can be listed with their IDs, sequence, enabled/error/read-only state, conditions, exceptions, and actions.
- Rules can be created and the resulting Graph rule ID is returned.
- Writable rules can be patched or deleted.
- Read-only rules are not presented as successfully modified.
- Destructive or externally communicating actions, such as permanent deletion, forwarding, or redirection, require user confirmation.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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