Send SMS
send_smsSend a text from an agent's phone line through the governed messaging API. Provide from_agent_id, to, and message. For the immediate confirmation a customer just requested on a booking form, add purpose: booking_confirmation, the form's actual sms_consent: true, and idempotency_key; this records service consent and allows the requested confirmation after hours. Booking alerts to this business's active admin phone use purpose: booking_alert and idempotency_key. Explicit opt-outs, content controls and rate limits remain enforced. Use dispatch_policy: queue_if_needed to defer ordinary messages outside their allowed window. Optionally link lead_id; it must belong to this business and match the recipient phone.
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": {
"from_agent_id": "<from_agent_id>",
"to": "<to>",
"message": "<message>"
},
"name": "send_sms"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient phone number in E.164 format (e.g. +18135551234). | |
| lead_id | No | Optional lead ID to link and honor the lead's automation-pause state. | |
| message | Yes | Text message body. | |
| purpose | No | Booking confirmation attests the customer just requested this text; booking_alert requires an active business admin recipient. Requires idempotency_key. | |
| sms_opt_in | No | Existing form consent alias, for example yes. | |
| source_url | No | Optional HTTPS booking-form URL for consent provenance. | |
| sms_consent | No | Actual service-message opt-in captured on the booking form. Never infer or invent it. | |
| submitted_at | No | Optional original form-submission ISO timestamp. Must be recent for an immediate reply. | |
| from_agent_id | Yes | Agent ID whose phone line the text is sent from. | |
| submission_id | No | Optional original submission ID; defaults to the idempotency key. | |
| dispatch_policy | No | ||
| idempotency_key | No | Optional caller-supplied key. A replay with the same key returns the original send outcome instead of sending again — so a retry after an uncertain response is safe. | |
| consent_language | No | The disclosure shown on the form, when available. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| error | No | Present when success is false | |
| success | Yes | Whether the tool completed successfully | |
| message_sid | No |