Preview message cost
preview_message_costCalculate SMS/MMS cost before sending: get segment count, unit price, total cost, and destination country without sending the message or incurring charges.
Instructions
Price one message before sending (GET /api/v1/sms/messages/cost-preview): segment count, unit cost, total cost, currency and destination country for a sender, recipient and text. Sends nothing and is not billed. Use it before send_message to show the user the price; the real charge is per recipient and per segment, so multiply by the number of recipients. RCS cannot be previewed.
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": "<from>",
"to": "<to>"
},
"name": "preview_message_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient, E.164; its country decides the unit price. | |
| from | Yes | Your Vobiz messaging number, E.164 (see list_messaging_numbers). | |
| text | No | Message body; its length and characters decide the segment count. | |
| channel | No | Channel to price: sms (default) or mms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success; false when the result is an error (then error, message and retryable are set). | |
| preview | No |