Use when the user wants to review unread emails, says "daily mail", "check my email", "unread emails", "inbox review", "mail digest", "看邮件", "未读邮件", or wants a daily email summary with actionable triage
Review and triage unread emails, categorizing them by urgency and verifying actionability through external systems (ADO pipelines, S360, etc.).
digraph daily_mail {
rankdir=TB;
"Fetch unread emails" -> "Categorize by type";
"Categorize by type" -> "Verify actionability";
"Verify actionability" -> "Present summary";
}
Use the Mail MCP to fetch recent unread emails:
SearchMessagesQueryParameters:
queryParameters: "?$filter=isRead eq false&$top=30&$orderby=receivedDateTime desc&$select=id,subject,from,receivedDateTime,bodyPreview,importance,hasAttachments"
Classify each email into one of these categories:
| Category |
|---|
| Examples |
|---|
| Default Action |
|---|
| Needs Action | Manual validation pending, approval requests, assigned tasks | Verify then present |
| Alerts | Azure Monitor alerts, build failures, Sev incidents | Verify current status |
| Reports | S360 daily report, digest emails | Cross-check with source system |
| Informational | Build succeeded, resolved incidents, newsletters | Summarize briefly |
| Noise | Medium articles, auto-digests, Microsoft Daily Digest | Skip unless user asks |
For each "Needs Action" or "Alert" email, verify against the source system before presenting:
For build failure or manual validation emails:
GetMessage if needed)az pipelines build show --id <buildId> --org <org> --project <project> --query "{status: status, result: result, finishTime: finishTime, definitionName: definition.name}" -o json
az pipelines build list --org <org> --project <project> --top 5 --query "[?definition.name=='<pipeline>'].{id:id, buildNumber:buildNumber, status:status, result:result, finishTime:finishTime, sourceBranch:sourceBranch}" -o json
search_active_s360_kpi_action_items:
request: { targetIds: ["<service-id>"], pageSize: 50 }
Important: Query by service targetId, NOT by assignedTo alias (check memory for the correct service ID).microsoft.insights/scheduledqueryrules/ in subscription paths)
b. Get the alert rule details to find the underlying KQL query:
az monitor scheduled-query show --name <rule-name> --resource-group <rg> --subscription <sub> --query "{query: criteria.allOf[0].query}" -o json
c. Run the query against the Log Analytics workspace to check recent probe status:
az monitor log-analytics query --workspace <workspace-id> --analytics-query "<KQL query modified to show recent results with status>" -o table
d. If recent probe runs all show pass → mark as "can ignore" (self-recovered)IMPORTANT: Always execute these steps for Grok emails. Do NOT just summarize the email body — it is always truncated.
GetMessage with preferHtml: truegrok.com/chat/ in link hrefs, use the originalsrc attribute, not the safelinks wrapper)new_page)take_snapshot) and extract the full contentIMPORTANT: Meetup registration emails (e.g., "Time to Meetup!", "Register for Meetup") are high-priority — always surface them in "Needs Action" with the registration link.
GetMessage to extract the registration linkeventMessageRequest type) and activity/learning invitations, do NOT deep-verify| Subject | Sender | Brief description |Output a structured summary table:
### Needs Action
1. **[Subject]** — [what needs to be done]
### Worth Noting
1. **[Subject]** — [brief summary]
### Can Ignore (verified)
| Email | Reason |
|-------|--------|
| [Subject] | [why — with verification result, e.g. "probe recovered, last 10 runs all pass"] |
### Ignored by Rule
| Email | Rule |
|-------|------|
| [Subject] | [which rule matched, e.g. "Medium article", "build succeeded notification", "Microsoft Daily Digest"] |
### Meeting Invites / Learning Events
| Subject | Sender | Description |
|---------|--------|-------------|
| [Subject] | [Sender name] | [One-line summary of the event/meeting] |
Distinction:
GetMessage) before making triage decisions — bodyPreview is often truncated