MCP Tools Reference
Complete reference for all 20 tools exposed by the MailAfrica Agent MCP server.
Outbound Email
| Tool | Parameters | Returns | Description |
|---|---|---|---|
send_email | to: list[str], subject: str, text_body?: str, html_body?: str, cc?: list[str], bcc?: list[str], from_domain_id?: int, from_address?: str | Send result | Send an email |
list_outbound_emails | limit?: int (default 20) | List of emails | Recent outbound messages |
get_outbound_email | message_id: int | Email details | Single outbound message |
Inbound Email
| Tool | Parameters | Returns | Description |
|---|---|---|---|
list_inbound_addresses | (none) | List of addresses | All receiving addresses |
create_inbound_address | local_part: str, label?: str | Address details | Create new receiving address |
delete_inbound_address | address_id: int | Confirmation | Remove receiving address |
list_inbound_messages | address_id: int, unread?: bool, limit?: int | List of messages | Messages at an address |
get_inbound_message | message_id: int | Message with body | Full inbound message |
Sending Domains
| Tool | Parameters | Returns | Description |
|---|---|---|---|
list_sending_domains | (none) | List of domains | All registered domains |
add_sending_domain | domain: str | DNS records | Register domain, get DKIM/CNAME |
verify_sending_domain | domain_id: int | Verification result | Re-check DNS records |
Webhooks
| Tool | Parameters | Returns | Description |
|---|---|---|---|
list_webhooks | address_id: int | List of webhooks | Webhooks on an address |
create_webhook | address_id: int, url: str, secret?: str | Webhook details | Create signed webhook |
delete_webhook | webhook_id: int | Confirmation | Remove webhook |
test_webhook | webhook_id: int | Test result | Trigger test ping |
Agent & Auto-Reply
| Tool | Parameters | Returns | Description |
|---|---|---|---|
agent_config | address_id: int, mode?: str, persona?: str, reply_from_domain_id?: int, reply_from_address?: str | Config | Set auto-reply config |
agent_get_config | address_id: int | Config | Get auto-reply config |
agent_status | (none) | Status list | All address auto-reply statuses |
agent_draft | address_id: int, subject: str, text_body: str | Draft reply | Generate draft without sending |
agent_handle_message | message_id: int, address_id: int | Reply result | Run auto-reply pipeline now |
Billing & Info
| Tool | Parameters | Returns | Description |
|---|---|---|---|
wallet_balance | (none) | Balance (TZS) | Current wallet balance |
list_models | (none) | Model list | Available 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.