API & MCP
Everything a person can do on Sortbay E-mail Thread Grouper, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://sortbaythreadgroup.usefulweb.app/api/v1/calculate– run Sortbay E-mail Thread GrouperGET https://sortbaythreadgroup.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Sortbay E-mail Thread Grouper
Sorts the messages of an mbox file (or several pasted .eml sources) into conversations: replies are linked through Message-ID, In-Reply-To and References, missing parents still connect their replies, and messages without those headers join a thread only when the subject matches after removing Re:/Fwd:/AW:/WG: prefixes and they share a participant.
| Field | Type | Default | Description |
|---|---|---|---|
source | textarea | "From maria.lopez@example.com Mon Nov 30 09:12:44 2026\nFrom: \"Maria Lopez\" <m | E-mail source (.eml text) or mbox. Paste the full source of a message (headers, a blank line, then the body) — in most mail programs “Show original” or “View source”. Several messages: paste an mbox (each starts with a “From ” line). |
file | file | — | E-mail file (.eml or .mbox, optional). Up to 10 MB. Used instead of the pasted text when given. Export single mails as .eml or a folder as .mbox from your mail program. |
Example request
Support conversation and a sales mail
curl -X POST https://sortbaythreadgroup.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://sortbaythreadgroup.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
sortbay_thread_group - Local stdio connector:
node src/mcp-stdio.ts --tool=sortbay-thread-group
{
"mcpServers": {
"sortbay-thread-group": { "type": "http", "url": "https://sortbaythreadgroup.usefulweb.app/mcp" }
}
}