> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # sendSms > Send an SMS or MMS message from a tool function. [functionresult]: /docs/server-sdks/reference/typescript/agents/function-result Send an SMS or MMS message to a phone number. At least one of `body` or `media` must be provided. Generates a SWML `send_sms` verb under the hood. Throws `Error` if neither `body` nor `media` is provided. ## **Parameters** **`opts`** `object` — required SMS configuration object. --- **`opts.toNumber`** `string` — required Destination phone number in E.164 format (e.g., `"+15551234567"`). --- **`opts.fromNumber`** `string` — required Sender phone number in E.164 format. Must be a number in your SignalWire project. --- **`opts.body`** `string` Text body of the message. --- **`opts.media`** `string[]` List of media URLs to include as MMS attachments. --- **`opts.tags`** `string[]` Tags to associate with the message for searching and filtering in the SignalWire dashboard. --- **`opts.region`** `string` Region to originate the message from. --- ## **Returns** [`FunctionResult`][functionresult] -- `this`, for chaining. ## **Examples** ### Text Message ```typescript {4} import { FunctionResult } from '@signalwire/sdk'; const result = new FunctionResult('SMS sent.') .sendSms({ toNumber: '+15551234567', fromNumber: '+15559876543', body: 'Your appointment is confirmed for tomorrow at 3 PM.', }); ``` ### MMS with Media ```typescript {4} import { FunctionResult } from '@signalwire/sdk'; const result = new FunctionResult("I've sent your receipt.") .sendSms({ toNumber: '+15551234567', fromNumber: '+15559876543', body: "Here's your receipt:", media: ['https://example.com/receipt.pdf'], }); ``` > Send an SMS or MMS message from a tool function.