Prepare a text to a lead
plan_textUse this when the owner asks you to text one of their leads, or to answer someone by text message (SMS). Prepare one text message (SMS) to one lead, from the account's texting number. Sends NOTHING. Runs every check the console runs (a texting number connected and approved, texting switched on, not opted out with STOP, the monthly budget) plus two more: they agreed to texts or texted the account first, and it is between 9am and 9pm their time. Returns exactly what will be sent (with the opt-out line a first text carries), from which number, to whom, why they may be texted, its length in characters and segments, the last few texts with them, and a change_token for send_text. Refused, with the reason, when a text cannot go. These go to a real person's phone: show the owner the exact text and call send_text only after they approve it.
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": {
"lead_id": "<lead_id>",
"text": "<text>"
},
"name": "plan_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The message, in the owner's words. The opt-out line is added by itself on a first text. | |
| client | No | Client website slug (or id). Leave out on your own account; required for platform-scoped keys. | |
| lead_id | Yes | The lead's id: crm_lead_id from list_inbox, an id from find_crm_leads, or a lead from Instagram's crm_lead_id. |