MCP server › Sample workflows
Top conversation pairs
An e-discovery classic: “who talked to whom the most?” — finding the top bidirectional conversation pairs across all collected mailboxes, then summarizing what those conversations were about. The sample runs against the DataTap-hosted Enron corpus (6 collected mailboxes, 12,447 emails).
The tool sequence
Steps 1–4 identify the top pairs. Step 5 confirms each pair's count live from the index. Step 6 pulls the full conversation in date order for summarization:
// 1 · Get the top senders in the corpus (fromAddress facet).
// Exclude OneDrive files — they have no fromAddress and inflate counts.
// 'business' and 'personal' are legacy index values; 'OneDriveFile' is current.
// The server normalises legacy values in responses but index-level filters
// still need to reference the raw stored values.
{"tool": "summarize_content", "arguments": {
"filter": "itemType ne 'OneDriveFile' and itemType ne 'business' and itemType ne 'personal'",
"facets": "fromAddress,count:20"
}}
// → Identifies the collected mailbox owners (our subjects A, B, C, D)
// plus significant senders in their inboxes.
// 2 · For each subject, who sends TO them most? (inbound side of each pair)
{"tool": "summarize_content", "arguments": {
"filter": "toRecipients/any(r: r/address eq '<subject-email>')",
"facets": "fromAddress,count:15"
}}
// Repeat for each subject. Exclude known system senders
// (exchmigteam@, outlook.migration.team@, arsystem@mailman, imceanotes-*).
// 3 · For each subject, who do they send TO most? (outbound side)
// toRecipients is not facetable (complex type) — pull all sent messages
// and count agent-side.
{"tool": "search_content_advanced", "arguments": {
"filter": "fromAddress eq '<subject-email>'",
"select": "toRecipients,ccRecipients,bccRecipients",
"top": 1334
}}
// Flatten all recipient arrays, deduplicate within each message,
// and tally a count per address across all messages.
// 4 · Combine inbound + outbound counts per (subject, other) pair.
// Bidirectional total = step-2 count + step-3 count.
// 5 · Verify the top pairs with direct count_content calls.
// Use to+cc+bcc to match the same scope the aggregation used (steps 3-4).
{"tool": "count_content", "arguments": {
"filter": "fromAddress eq '<A>' and (toRecipients/any(r: r/address eq '<B>') or ccRecipients/any(r: r/address eq '<B>') or bccRecipients/any(r: r/address eq '<B>'))"
}}
{"tool": "count_content", "arguments": {
"filter": "fromAddress eq '<B>' and (toRecipients/any(r: r/address eq '<A>') or ccRecipients/any(r: r/address eq '<A>') or bccRecipients/any(r: r/address eq '<A>'))"
}}
// 6 · Pull the conversation for each top pair (both directions, sorted by date).
{"tool": "search_content_advanced", "arguments": {
"filter": "(fromAddress eq '<A>' and (toRecipients/any(r: r/address eq '<B>') or ccRecipients/any(r: r/address eq '<B>'))) or (fromAddress eq '<B>' and (toRecipients/any(r: r/address eq '<A>') or ccRecipients/any(r: r/address eq '<A>')))",
"select": "fromAddress,subject,bodyPreview,receivedDateTime",
"top": 110,
"orderBy": "receivedDateTime asc"
}}Top 3 pairs — Enron corpus
Across the 6 collected mailboxes (Darron Giron, Charles Weldon, Fletcher Sturm, Mike Maggi, Pete Davis, Jay Reitmeyer) and their inboxes, filtering out system senders:
| Pair | A → B | B → A | Total |
|---|---|---|---|
| Mike Maggi ↔ Michelle Nelson | 468 | 504 | 972 |
| Darron Giron ↔ Carole Frank | 234 | 16 | 250 |
| Fletcher Sturm ↔ Tamara Black | 34 | 198 | 232 |
Conversation summaries
1 · Mike Maggi ↔ Michelle Nelson (972 emails, Oct 2001 – Feb 2002)
The highest-volume bidirectional exchange in the corpus, and one of the most unusual. Nelson sends 504 messages to Maggi; Maggi sends 468 back. Nearly all have no subject line and are very short — the exchange reads more like instant-message banter conducted over email than a work correspondence.
The tone is unmistakably personal: “you are not going to let it go are you?”, “I owe you drinks though let me know”, “if you werent always staring at me you wouldnt notice my eyes”, “damn you caught me”. Mixed in are occasional work logistics — “Fred needs to see you” — but they are clearly colleagues who knew each other well. The date range (Oct 2001 – Feb 2002) places the entire exchange in the final months before Enron filed for bankruptcy in December 2001.
2 · Darron Giron ↔ Carole Frank (250 emails, Oct 2000 – Dec 2001)
A supervisor/analyst relationship on Enron's gas trading desk. Giron sends 234 messages to Frank covering day-to-day risk operations: Value at Risk calculations (“Let's make sure we are doing this every night”), Gas Daily spread booking procedures (“we need to be consistent in booking the GD spread deals”), credit reports, and Canadian deals in US books. The messages are short, task-oriented, and often forwarded from other desks.
Frank's 16 replies show a different arc: early messages are operational, but by late 2001 the exchange shifts to career planning. Frank asks Giron to write her a letter of recommendation for the internal Analyst Program (“Thank you for agreeing to write a letter of recommending me”), reflects on her direction (“I really would like to do something more commercial. I think that my personality would be better suited”), and by December 2001 — as Enron's collapse became undeniable — forwards Giron three open positions at CMS Energy (“I thought that you might be interested”).
3 · Fletcher Sturm ↔ Tamara Black (232 emails, Nov 2000 – May 2001)
Tamara Black was Sturm's executive assistant. Her 198 messages to him are almost entirely calendar invites — desk position reviews, candidate interviews, trading team dinners, compliance sessions with Enron leadership (Louise Kitchen, Jeff Lavorato), and internal demos (EOL platform, position management tooling). Subject lines like “Mtg. w/L. Kitchen & J. Lavorato rm 3321 reg. Other People Trading on EOL” and “Interview Jeremy Sorkin for J. Arnold” paint a picture of an active trading desk calendar in 2001.
Sturm's 34 replies are short coordination messages: confirming meetings, requesting address lookups (“could you provide my wife with the addresses for the following people”), forwarding dinner invitations with “Please put this on my calendar, thanks.” One thread with subject “Re: CONFIDENTIAL” hints at a sensitive matter but its body was not preserved.
search_content_advanced with a subject filter to pull a specific thread (e.g. all messages where subject contains “TXN”), or use find_related_items with relation="sender" on any message to surface other emails from the same person in the same time window.← Previous sample: Top external recipient · Back to MCP server →