send_email
The send_email tool sends an email to any recipient. Unlike send_email_to_caller (which auto-resolves the recipient from the call’s contact), this tool gives the AI orchestrator full control over who receives the email.
When It’s Available
Section titled “When It’s Available”Available during todo execution when the TodoType has SendEmail in its tools list. The AI determines the correct recipient based on the task context — typically from the todo_type.description which contains staff directories, routing rules, or other organizational context.
Tool Definition
Section titled “Tool Definition”Tool { name: "send_email", description: "Sends an email to the specified recipient with the given subject and body.", input_schema: SendEmailInput { recipient_email: String, // The recipient email address subject: String, // The email subject line body: String, // The email body (plain text) },}Execution Flow
Section titled “Execution Flow”AI calls send_email({ recipient_email: "staff@clinic.com", subject: "...", body: "..." }) → Send via bases::email::send_email → Return "Email sent successfully to staff@clinic.com."No contact lookup is needed — the AI provides the recipient directly.
How the AI Picks the Recipient
Section titled “How the AI Picks the Recipient”The executor’s system prompt includes the todo type description, which organizations use to embed routing context:
You are an AI task executor. Complete the given to-do task using the available tools.
Task type: {todo_type.name}Task type description: {todo_type.description}Task description: {todo.description}Example todo type description:
Forward urgent messages to the office manager at manager@clinic.com.For scheduling requests, email scheduling@clinic.com.The AI reads this context, analyzes the call transcription, and routes the email to the right person.
Comparison with send_email_to_caller
Section titled “Comparison with send_email_to_caller”| send_email_to_caller | send_email | |
|---|---|---|
| Recipient | Auto-resolved from call contact | AI-determined from task context |
| AI provides | Subject, body | Recipient, subject, body |
| Use case | Follow-up to the caller | Internal routing, staff notifications |
| Requires contact | Yes (fails without one) | No |
Related Pages
Section titled “Related Pages”- send_email_to_caller — auto-resolved recipient from call contact
- Agent Tools Overview — voice and task tool systems
- Todos — todo extraction, approval, and execution pipeline