Skip to content

MCP tools

The MCP server lives at https://mailforbots.com/mcp and has 41 tools plus search_tools and call_tool to reach them, all scoped to the account that owns the API key (a user or a team) and to the key's scopes and inboxes. Tool errors come back as text starting with Error: and isError set; a tool the key's scopes don't allow returns Error: This API key lacks the ... scope.

To keep your agent's context small, the server lists only three tools by default: search_tools, call_tool and report_issue. The agent calls search_tools with what it wants to do, asks for detail: "full" to see a tool's arguments, then runs it with call_tool. Every tool can also still be called by its own name. Clients that prefer the complete list can use https://mailforbots.com/mcp?tools=all.

inbox arguments accept either an inbox id or its full email address. Arguments marked required must be provided.

search_tools

Find tools by what you want to do (for example "wait for a verification code"). Only search_tools, call_tool and report_issue are listed up front; every other tool is found here and run with call_tool. Tools your key's scopes don't allow are left out. Omit query to browse the categories.

Any valid API key can call it, whatever its scopes.

Arguments of search_tools
ArgumentTypeDescription
querystringWhat you want to do, in plain words.
categoryinboxes | messages | sending | drafts | organize | notes | analytics | crm | supportOnly tools in this category.
detailnames | summary | fullHow much to return per tool: names only, name and description (default), or the full input schema and annotations.
limitinteger (1 to 25)Maximum tools to return. Default 8.

call_tool

Run a tool found with search_tools, by exact name. The arguments are checked against the tool's input schema; mistakes come back as an error naming the problem (and a close tool name if the name is wrong). Results and errors are the same as calling the tool directly.

Any valid API key can call it, whatever its scopes.

Arguments of call_tool
ArgumentTypeDescription
namerequiredstringTool name from search_tools.
argumentsobjectThe tool's arguments (see its input_schema).

search_crm

Find people and companies in the CRM by name, email, domain or other identifier, and/or by tag.

Needs scope mail:read.

Arguments of search_crm
ArgumentTypeDescription
querystring
tagstring
typeany | person | company
limitnumber

get_person

A person's profile, company, identifiers, tags, the notes/insights/links/tasks you may see, and your past emails with them.

Needs scope mail:read.

Arguments of get_person
ArgumentTypeDescription
personrequiredstringPerson id or email.

upsert_person

Create a person or update the one with this id/email. People are shared with every agent of the account; fields are merged.

Needs scope mail:read.

Arguments of upsert_person
ArgumentTypeDescription
idstring
emailstring
namestring
titlestring
companystringCompany id or domain; an unknown domain creates the company.
descriptionstring
fieldsobject
identifiers{ kind, value }[]email | phone | linkedin | url | domain

get_company

A company's profile, domains, people, tags and the entries you may see.

Needs scope mail:read.

Arguments of get_company
ArgumentTypeDescription
companyrequiredstringCompany id or domain.

upsert_company

Create a company or update the one with this id/domain. Shared with every agent of the account.

Needs scope mail:read.

Arguments of upsert_company
ArgumentTypeDescription
idstring
domainstring
namestring
descriptionstring
fieldsobject

add_crm_entry

Record a note, insight, link or task (with due_at) about a person or company. Private to you unless shared.

Needs scope mail:read.

Arguments of add_crm_entry
ArgumentTypeDescription
personstringPerson id or email.
companystringCompany id or domain.
kindrequirednote | insight | link | task
titlestring
bodystring
urlstring
due_atstring
visibilityprivate | sharedPrivate (default): only you and the account owner see it.
thread_idstring

update_crm_entry

Edit one of your entries, or share it / make it private.

Needs scope mail:read.

Arguments of update_crm_entry
ArgumentTypeDescription
idrequiredstring
titlestring
bodystring
urlstring
due_atstring
visibilityprivate | sharedPrivate (default): only you and the account owner see it.

delete_crm_entry

Delete one of your entries.

Needs scope mail:read.

Arguments of delete_crm_entry
ArgumentTypeDescription
idrequiredstring

list_crm_tasks

Your open CRM tasks, soonest first.

Needs scope mail:read.

Arguments of list_crm_tasks
ArgumentTypeDescription
due_beforestring
tagstring
include_doneboolean
allbooleanEvery task you can see, not only yours.
limitnumber

complete_crm_task

Mark one of your tasks done (or open again).

Needs scope mail:read.

Arguments of complete_crm_task
ArgumentTypeDescription
idrequiredstring
doneboolean

list_crm_tags

The account's shared tag vocabulary.

Needs scope mail:read.

No arguments.

tag_crm_record

Tag a person or company; private tags track your own state, shared tags classify for everyone.

Needs scope mail:read.

Arguments of tag_crm_record
ArgumentTypeDescription
personstringPerson id or email.
companystringCompany id or domain.
tagrequiredstring
visibilityprivate | sharedPrivate (default): only you and the account owner see it.

untag_crm_record

Remove your tag from a person or company.

Needs scope mail:read.

Arguments of untag_crm_record
ArgumentTypeDescription
personstringPerson id or email.
companystringCompany id or domain.
tagrequiredstring
visibilityprivate | sharedPrivate (default): only you and the account owner see it.

get_email_metrics

Delivery and engagement statistics for a send-time cohort of up to 90 days. Recipient counts; rates are null when no eligible recipients exist.

Needs scope mail:read.

Arguments of get_email_metrics
ArgumentTypeDescription
start_datestring
end_datestring
inbox_idstring
domain_idstring
timezonestringIANA timezone
granularityday | hour

list_email_sends

Durable send history, including deleted mailboxes. Paginate with next_cursor as before.

Needs scope mail:read.

Arguments of list_email_sends
ArgumentTypeDescription
start_datestring
end_datestring
inbox_idstring
domain_idstring
beforestring

get_email_events

Recipient outcomes and delivery/tracking event timeline. Paginate with next_cursor as cursor.

Needs scope mail:read.

Arguments of get_email_events
ArgumentTypeDescription
send_idrequiredstring
cursorstring

get_storage_usage

Account storage used, reserved and remaining bytes. Requires an account-wide key.

Needs scope mail:read.

No arguments.

create_inbox

Create a new inbox on the shared Mail for Bots domain or one of your verified custom domains. Returns its address. Use ttl_minutes for throwaway test inboxes.

Needs scope inboxes:manage.

Arguments of create_inbox
ArgumentTypeDescription
domainstringVerified custom domain; defaults to the shared domain. See list_domains.
usernamestringLocal part of the address; random if omitted.
display_namestringSender name shown on outgoing mail.
ttl_minutesinteger (5 to 43200)Auto-delete the inbox after N minutes.

list_inboxes

List all inboxes you own, with unread counts.

Needs scope mail:read.

No arguments.

list_domains

List your custom domains and whether they are verified (usable for create_inbox) and receiving mail.

Needs scope mail:read.

No arguments.

delete_inbox

Permanently delete an inbox and all its messages.

Needs scope inboxes:manage.

Arguments of delete_inbox
ArgumentTypeDescription
inboxrequiredstringInbox id or full email address

list_messages

List message summaries in an inbox, newest first.

Needs scope mail:read.

Arguments of list_messages
ArgumentTypeDescription
inboxrequiredstringInbox id or full email address
unread_onlyboolean
direction"inbound" | "outbound"
limitinteger (1 to 100)

get_message

Get a full message: plain text body, attachment list, and extracted one-time codes and links (verify, login, reset). Marks it read.

Needs scope mail:read.

Arguments of get_message
ArgumentTypeDescription
message_idrequiredstring

wait_for_message

Block until an unread inbound message matching the filters exists (including ones that already arrived), then return it in full and mark it read. Returns null on timeout. Ideal after triggering a signup or password reset.

Needs scope mail:read.

Arguments of wait_for_message
ArgumentTypeDescription
inboxrequiredstringInbox id or full email address
from_containsstring
subject_containsstring
to_containsstringMatch the address the mail was sent to, e.g. a +alias tag like "+github".
timeout_secondsinteger (1 to 300)Default 60.

get_thread

Get every message in a conversation, oldest first.

Needs scope mail:read.

Arguments of get_thread
ArgumentTypeDescription
thread_idrequiredstring

list_signatures

An inbox's signature variants (name, html, text, default). Pass a name as `signature` when sending.

Needs scope mail:read.

Arguments of list_signatures
ArgumentTypeDescription
inboxrequiredstring

set_signature

Create or replace a signature variant (html and/or text); default: true makes it the one added automatically.

Needs scope mail:read.

Arguments of set_signature
ArgumentTypeDescription
inboxrequiredstring
namestringa-z 0-9 - _ (default "default")
htmlstring
textstring
defaultboolean

delete_signature

Delete a signature variant; the oldest remaining one becomes the default.

Needs scope mail:read.

Arguments of delete_signature
ArgumentTypeDescription
inboxrequiredstring
namerequiredstring

send_email

Send an email from one of your inboxes.

Needs scope mail:send.

Arguments of send_email
ArgumentTypeDescription
inboxrequiredstringSending inbox id or address
torequiredstring[]At least one recipient.
ccstring[]
bccstring[]
subjectrequiredstring
textstring
htmlstring
attachments{ filename, content_type?, content_base64 }[]Files to attach (up to 20, max 20 MB total).
signatureboolean | stringOmit/true: the inbox's default signature; a variant name; false: none.

reply

Reply to a message, keeping it in the same thread.

Needs scope mail:send.

Arguments of reply
ArgumentTypeDescription
message_idrequiredstring
textstring
htmlstring
reply_allboolean
quotebooleanInclude the original message as a quote below your reply.
attachments{ filename, content_type?, content_base64 }[]Files to attach (up to 20, max 20 MB total).
signatureboolean | stringOmit/true: the inbox's default signature; a variant name; false: none.

forward

Forward a message (including its attachments) to new recipients, with an optional note on top.

Needs scope mail:send.

Arguments of forward
ArgumentTypeDescription
message_idrequiredstring
torequiredstring[]
ccstring[]
textstringYour note above the forwarded message.
signatureboolean | stringOmit/true: the inbox's default signature; a variant name; false: none.

list_labels

List your labels (with how many conversations each has).

Needs scope mail:read.

No arguments.

label_thread

Add and/or remove labels on a conversation. Labels are given by name; missing names in add are created.

Needs scope mail:write.

Arguments of label_thread
ArgumentTypeDescription
thread_idrequiredstring
addstring[]
removestring[]

create_draft

Save an email as a draft instead of sending it, so a human can review and send it from the webmail. Use mode reply, replyAll or forward with original_message_id to draft a response; for replies, recipients and the Re: subject default from the original message.

Needs scope drafts:write.

Arguments of create_draft
ArgumentTypeDescription
inboxstringSending inbox id or address (required for new messages).
mode"new" | "reply" | "replyAll" | "forward"
original_message_idstring
tostring[]
ccstring[]
bccstring[]
subjectstring
textstring
htmlstring
attachments{ filename, content_type?, content_base64 }[]Files to attach (up to 20, max 20 MB total).
signatureboolean | stringOmit/true: the inbox's default signature; a variant name; false: none.

list_drafts

List saved drafts (yours and ones other agents prepared).

Needs scope mail:read.

No arguments.

send_draft

Send a saved draft.

Needs scope mail:send.

Arguments of send_draft
ArgumentTypeDescription
draft_idrequiredstring

get_attachment

Get an attachment: a short-lived download URL, plus the content inline as text for small text files (csv, txt, json, and so on).

Needs scope mail:read.

Arguments of get_attachment
ArgumentTypeDescription
message_idrequiredstring
indexrequiredinteger (0 or more)Position in the message's attachment list.

get_raw_message

Get the original source of a message (RFC 822): all headers including Received, DKIM-Signature and Authentication-Results, plus the MIME body. Large messages are truncated; size is the full length in bytes. Mail received before originals were kept returns an error.

Needs scope mail:read.

Arguments of get_raw_message
ArgumentTypeDescription
message_idrequiredstring
max_bytesinteger (1000 to 2000000)Truncate after this many bytes. Default 200000.

delete_message

Delete a message.

Needs scope mail:write.

Arguments of delete_message
ArgumentTypeDescription
message_idrequiredstring

report_issue

Report a problem you ran into with Mail for Bots: a tool that failed or behaved unexpectedly, a missing capability, confusing output, or mail that was not delivered. Reports go to the Mail for Bots team. Never include secrets. Limited to 30 reports an hour.

Any valid API key can call it, whatever its scopes.

Arguments of report_issue
ArgumentTypeDescription
categoryrequiredbug | missing_feature | confusing | delivery | other
summaryrequiredstring (max 300)One line: what went wrong.
detailsstring (max 10000)What you were trying to do, what you expected, what happened.
tool_namestringThe MCP tool involved.
contextobjectArguments used, error text, message or inbox ids.