Reecall
Tools and MCPs

Email tool

Configure send_email with an email template, its recipients, and a condition for sending it. The Assistant collects the required details from the caller and fills in the template during the call.

Overview

Each send_email tool defines one email template, such as a late-arrival notice or a document request. Set:

  • descriptionOverride to specify when to send it.
  • to to set the recipients.
  • subject and body to set the email content.
  • parameters to define the details the Assistant must collect.

During the call, the Assistant collects those details, sends the email, and tells the caller whether it was sent.

For example, with this configuration:

JSONCode
{ "to": "frontdesk@acmedental.com", "subject": "Late arrival", "body": "{name} will be {delay} late for their appointment at {time}.", "parameters": { "type": "object", "properties": { "name": { "type": "string", "description": "Caller's full name" }, "delay": { "type": "string", "description": "How late the caller will be, e.g. 15 minutes" }, "time": { "type": "string", "description": "Appointment time, e.g. 09:30" } }, "required": ["name", "delay", "time"] } }

With name = "Jane Doe", delay = "15 minutes", and time = "09:30", the front desk receives this email from Reecall <noreply@reecall.co>: Jane Doe will be 15 minutes late for their appointment at 09:30.

Attach separate send_email tools for different email templates.


Naming and describing the tool

nameOverride and descriptionOverride are set when you attach the tool to an Assistant. They tell the Assistant what the email is and when to send it.

FieldTypeRequiredDescription
nameOverridestringNoName of the email, e.g. notify_late_arrival. Letters, digits, _ and -, up to 64 characters.
descriptionOverridestringNoWhen the Assistant should send this email. Supports {variable} placeholders.

Give each send_email tool a unique nameOverride. The API rejects duplicate tool names on the same Assistant with 400 DUPLICATE_TOOL_NAME.

Add descriptionOverride to the Tool object alongside assistantId and configuration. State the condition for sending:

JSONCode
"descriptionOverride": "Tell the front desk when a caller says they will be late for an appointment."

Configuration

FieldTypeRequiredDescription
tostringYesRecipients of the email.
subjectstringYesSubject of the email, with placeholders.
bodystringYesText of the email, with placeholders.
parametersobjectYesJSON Schema of the details the Assistant must collect.
maxEmailsPerCallintegerNoMaximum emails sent by this tool instance. Default: 1.

Only these configuration fields are accepted. The API rejects invalid configurations when you save the tool and lists the detected problems together:

JSONCode
{ "status": 400, "code": "INVALID_TOOL_CONFIGURATION", "message": "Invalid send_email configuration.", "context": { "errors": [ "to: \"frontdesk@acmedental\" is not an email address or a {{variable}}", "subject: must be a non-empty string" ] } }

to

One or more email addresses separated by ;. Each one can be a {{variable}}, e.g. {{frontdesk_email}}, which can itself hold several addresses separated by ;. All recipients receive the same email.

subject and body

The subject and text of the email, in plain text. Use {x} or {{x}} placeholders for the parts that change. At send time, each placeholder is replaced with:

  1. the value collected by the Assistant for the parameter of the same name,
  2. otherwise, the variable or injected data of the same name.

Unknown and secret placeholders

Unknown placeholders and secret variables with isSecret: true become empty strings. Check placeholder spelling to avoid missing content. When the caller's number is hidden, {{caller_phone_number}} becomes **********.

parameters

A JSON Schema (draft 2020-12) of type object listing the details the Assistant must collect before sending. Use description on each property to say what to collect and in which format. parameters cannot declare a to property: the Assistant never chooses the recipients.

The collected values are checked against parameters before sending. If they do not match, nothing is sent and the Assistant asks the caller again. Use required, pattern, enum or maxLength to control exactly what can appear in the email.

maxEmailsPerCall

The value must be an integer of at least 1. The limit and duplicate detection apply to each tool instance, so separate email tools have separate counters. A repeated call with the same rendered subject and body is not sent again by that instance. A send with unknown status also reserves a slot to avoid duplicate emails.


Full example

This example attaches a late arrival email to an Assistant. The Assistant collects the details from the caller, and the front desk address comes from a variable.

Code
POST https://newprd.reecall.io/data_next/ai/tools Authorization: Bearer {token} Content-Type: application/json
JSONCode
{ "definitionId": "ec5c7df0-2f33-414a-8477-2aa0dac69bf1", "assistantId": "<your-assistantId>", "nameOverride": "notify_late_arrival", "descriptionOverride": "Tell the front desk when a caller says they will be late for an appointment.", "configuration": { "to": "{{frontdesk_email}}", "subject": "Late arrival", "body": "{name} will be {delay} late for their appointment at {time}.\n\nCaller's number: {{caller_phone_number}}", "parameters": { "type": "object", "properties": { "name": { "type": "string", "description": "Caller's full name" }, "delay": { "type": "string", "description": "How late the caller will be, e.g. 15 minutes", "maxLength": 50 }, "time": { "type": "string", "description": "Appointment time in HH:MM format (24h), e.g. 09:30", "pattern": "^\\d{2}:\\d{2}$" } }, "required": ["name", "delay", "time"], "additionalProperties": false } } }
Last modified on