MailgentMailgent
MCPTools Reference

mail.get_thread

Get a full email thread with all messages

Scope: mail:read

Get the complete conversation — all messages in chronological order.

Parameters

NameTypeRequiredDescription
threadIdstringYesThread ID

Example

Agent needs full context before replying.

→ mail.get_thread({ threadId: "thd_a3f91b00c4e2d7e8" })

Returns

Thread object with messages array ordered oldest to newest. Each message includes from, to, subject, text, extractedText, labels.

This is the best way to give your LLM full conversation context before generating a reply.

Agent Pattern

1. mail.list_messages(labels: "unread")     → find new email
2. mail.get_thread(threadId: "...")          → full conversation
3. Feed thread messages to LLM              → generate reply
4. mail.reply(messageId: "...", text: "...") → send
5. mail.update_labels(addLabels: ["read"])   → mark done

REST Equivalent

GET /v0/threads/{threadId}

On this page