Logo
Search
API Docs

SMS Tool for Mid-Call Texting

Tools

SMS Tool for Mid-Call Texting

Overview

The built-in sms tool lets your assistant send a text message to the caller while the call is still in progress — useful for texting a confirmation link, an address, or a summary the caller asked for without ending the call. It's one of several default tools available alongside transferCall, endCall, dtmf, and apiRequest.


Requirements

SMS messages sent from this tool go out through the core system's phone number infrastructure, so before adding it:

  • You need a phone number with SMS capability enabled on the number you'll send from.
  • That number must be reachable by your assistant's configuration (the same number used for voice can typically also send SMS, provided SMS is enabled on it).

Adding the SMS Tool to an Assistant

Add a tool of type sms to the assistant's tools array:

{
  "model": {
    "provider": "openai",
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are an assistant. When the user asks you to send a text message, use the sms function."
      }
    ],
    "tools": [
      {
        "type": "sms",
        "metadata": {
          "from": "+15551234567"
        }
      }
    ]
  }
}

You can also add it from the dashboard's Tools page, then attach it to the assistant the same way you would any other tool.


Configuring metadata.from

The metadata.from field is required and must be a number with SMS capability enabled. This is the number the caller will see the text arrive from, so it should be a number your callers already recognize as yours (typically the same number they called).


System Prompt Instructions

Attaching the tool doesn't tell the assistant when to use it. Add a plain instruction to the system prompt describing the trigger, for example:

When the caller asks you to text them something (a link, an address, a confirmation), use the sms function to send it to the number they're calling from.

Limitations & Troubleshooting

  • The sending number must have SMS capability enabled — a voice-only number will fail to send.
  • If texts aren't going out, confirm the assistant actually has the tool attached and that the system prompt gives it a clear trigger to call it.
  • Content sent through this tool is a plain text message; it does not support MMS attachments.