MCP Tools Reference

MCP Tools Reference

Complete reference for all 20 tools exposed by the MailAfrica Agent MCP server.

Outbound Email

ToolParametersReturnsDescription
send_emailto: list[str], subject: str, text_body?: str, html_body?: str, cc?: list[str], bcc?: list[str], from_domain_id?: int, from_address?: strSend resultSend an email
list_outbound_emailslimit?: int (default 20)List of emailsRecent outbound messages
get_outbound_emailmessage_id: intEmail detailsSingle outbound message

Inbound Email

ToolParametersReturnsDescription
list_inbound_addresses(none)List of addressesAll receiving addresses
create_inbound_addresslocal_part: str, label?: strAddress detailsCreate new receiving address
delete_inbound_addressaddress_id: intConfirmationRemove receiving address
list_inbound_messagesaddress_id: int, unread?: bool, limit?: intList of messagesMessages at an address
get_inbound_messagemessage_id: intMessage with bodyFull inbound message

Sending Domains

ToolParametersReturnsDescription
list_sending_domains(none)List of domainsAll registered domains
add_sending_domaindomain: strDNS recordsRegister domain, get DKIM/CNAME
verify_sending_domaindomain_id: intVerification resultRe-check DNS records

Webhooks

ToolParametersReturnsDescription
list_webhooksaddress_id: intList of webhooksWebhooks on an address
create_webhookaddress_id: int, url: str, secret?: strWebhook detailsCreate signed webhook
delete_webhookwebhook_id: intConfirmationRemove webhook
test_webhookwebhook_id: intTest resultTrigger test ping

Agent & Auto-Reply

ToolParametersReturnsDescription
agent_configaddress_id: int, mode?: str, persona?: str, reply_from_domain_id?: int, reply_from_address?: strConfigSet auto-reply config
agent_get_configaddress_id: intConfigGet auto-reply config
agent_status(none)Status listAll address auto-reply statuses
agent_draftaddress_id: int, subject: str, text_body: strDraft replyGenerate draft without sending
agent_handle_messagemessage_id: int, address_id: intReply resultRun auto-reply pipeline now

Billing & Info

ToolParametersReturnsDescription
wallet_balance(none)Balance (TZS)Current wallet balance
list_models(none)Model listAvailable Ngamia LLM models

Tool Details

send_email

send_email(
    to=["alice@example.com", "bob@example.com"],
    subject="Project Update",
    text_body="Here's the latest update on the project.",
    html_body="<h1>Project Update</h1><p>Here's the latest update on the project.</p>",
    from_domain_id=1
)

When from_domain_id is provided, the email is sent from your verified domain. Without it, MailAfrica uses the default sending address.

create_inbound_address

create_inbound_address(local_part="sales", label="Sales Inquiries")

Creates sales@yourdomain.com (if using a verified domain) or a system-generated address.

agent_config

agent_config(
    address_id=1,
    mode="auto",
    persona="You are a professional sales assistant for TechCorp. Be helpful but concise.",
    reply_from_address="sales@techcorp.com"
)

The persona field is the system prompt sent to the LLM. Make it specific to get better replies.

agent_draft

Use this to preview what the agent would reply without actually sending:

agent_draft(
    address_id=1,
    subject="Pricing question",
    text_body="Hi, how much does your enterprise plan cost?"
)

Returns the generated reply text without side effects.

agent_handle_message

Manually trigger the auto-reply pipeline for a specific message:

agent_handle_message(message_id=123, address_id=1)

Useful for testing or processing messages that arrived before auto-reply was configured.