Route an email address to an agent
route_email_domainAssign an agent to reply to inbound email for a domain and set whether it answers workspace members or anyone; stop replies by clearing the agent.
Instructions
Choose which agent answers mail to an address, and who it answers.
Setting ``email_agent_id`` together with ``clear_agent=True`` is an error.
With ``email_agent_scope="anyone"``, a stranger can make the agent use its
allowed tools. Mail without a passing DMARC result gets no reply.
A custom domain must be verified with inbound and sending on.
A field left out keeps its value, except that a new agent starts at ``"members"``.
Returns the updated ``EmailDomainResponse`` as a dict, or
``{"error": "<message>"}``.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"domain_id": "<domain_id>"
},
"name": "route_email_domain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain_id | Yes | Email identity ID, the ``id`` from ``list_email_domains``. | |
| clear_agent | No | ``true`` stops the agent replying to this address's mail. | |
| email_agent_id | No | Agent that replies to inbound mail, from ``list_agents`` or ``create_agent``. | |
| email_agent_scope | No | Who the agent answers: ``members`` (verified members of the workspace whose mail passes DMARC) or ``anyone`` (every sender whose mail passes DMARC and the spam checks). Omitted: the current scope stays; a newly set agent starts at ``members``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||