Skip to content

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.

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 {
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)
},
}
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.

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.

send_email_to_callersend_email
RecipientAuto-resolved from call contactAI-determined from task context
AI providesSubject, bodyRecipient, subject, body
Use caseFollow-up to the callerInternal routing, staff notifications
Requires contactYes (fails without one)No