compact_email_thread — De-duplicate Email Thread & RFC 5322 .eml
Decodes raw RFC 5322 .eml MIME messages (multipart/alternative, quoted-printable, base64) or pasted reply chains, strips O(N^2) repeated quoted history, mobile signatures, and legal disclaimers, and outputs chronological Markdown.
Why buy vs. DIY: Avoids writing RFC 2047/quoted-printable/multipart MIME parsers and multi-client Outlook/Gmail quote splitters; collapses 10-reply O(N^2) threads by >80%.
Pricing: $0.001 base (up to $0.005 max ($0.001 base + $0.0005 per 50KB of input, capped at $0.005 for payloads up to 2MB), x402 variable settlement) · REST: POST https://context-crush.apikeg.com/v1/compact-email-thread · MCP: https://context-crush.apikeg.com/mcp
Input Parameters
| Field | Type | Required / Default | Description & Constraints |
content |
string |
Required |
Raw RFC 5322 .eml MIME message (multipart/alternative, quoted-printable, base64) or pasted multi-reply email thread. (minLength: 1, maxLength: 2000000) |
stripSignatures |
boolean |
Default: true |
Strip mobile/client footers ('Sent from my iPhone', 'Get Outlook for iOS') and RFC 3676 '-- ' tails. |
stripDisclaimers |
boolean |
Default: true |
Strip standard corporate confidentiality and legal disclaimer footer blocks. |
REST Example (curl)
curl -X POST "https://context-crush.apikeg.com/v1/compact-email-thread" \
-H "Content-Type: application/json" \
-d '{
"stripSignatures": true,
"stripDisclaimers": true,
"content": "Approved — let's lock in the annual tier.\n\nSent from my iPhone\n\nOn Tue, Nov 12, 2026 at 2:15 PM Alice Chen <alice@acme.com> wrote:\n> Can you confirm final pricing?\n>\n> CONFIDENTIALITY NOTICE: This email and any attachments are confidential."
}'
MCP tools/call Payload
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "compact_email_thread",
"arguments": {
"stripSignatures": true,
"stripDisclaimers": true,
"content": "Approved — let's lock in the annual tier.\n\nSent from my iPhone\n\nOn Tue, Nov 12, 2026 at 2:15 PM Alice Chen <alice@acme.com> wrote:\n> Can you confirm final pricing?\n>\n> CONFIDENTIALITY NOTICE: This email and any attachments are confidential."
}
}
}