> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tai42.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tools-twilio

> Twilio provisioning tools for the TAI ecosystem: manifest-loaded REST tools that list a Twilio account's incoming phone numbers, read a number's inbound-message webhook, and set a number's inbound-message webhook URL.

<Info>`Tool` plugin · listing `tai42/tools-twilio`</Info>

## Install

```bash theme={null}
tai plugins install tai42-tools-twilio
```

## Permissions

| Capability | Declared |
| ---------- | -------- |
| Network    | yes      |
| Subprocess | no       |
| Filesystem | no       |

## Provides

<h3 id="list-twilio-numbers">
  list\_twilio\_numbers
</h3>

`Tool` — List a Twilio account's incoming phone numbers with their inbound-message webhook.

<h3 id="get-twilio-number-webhook">
  get\_twilio\_number\_webhook
</h3>

`Tool` — Read one Twilio number's inbound-message webhook URL and method.

<h3 id="set-twilio-number-webhook">
  set\_twilio\_number\_webhook
</h3>

`Tool` — Set a Twilio number's inbound-message webhook to a given https URL.

Three tools that provision a Twilio phone number's inbound-message webhook over
Twilio's REST API: list the account's numbers, read one number's webhook, and set
a number's webhook URL. They configure the number so an inbound message reaches
the platform; the message-handling channel is a separate concern.

## Configuration

The tools read the same `CHANNEL_TWILIO_` credentials as the deployment's Twilio
channel — one account SID, auth token, and REST base configure both.

| Variable                              | Default                             | Effect                                                          |
| ------------------------------------- | ----------------------------------- | --------------------------------------------------------------- |
| `CHANNEL_TWILIO_ACCOUNT_SID`          | unset                               | Twilio account SID. Missing or empty raises on every tool call. |
| `CHANNEL_TWILIO_AUTH_TOKEN`           | unset                               | Twilio auth token. Missing or empty raises on every tool call.  |
| `CHANNEL_TWILIO_API_BASE_URL`         | `https://api.twilio.com/2010-04-01` | Twilio REST origin (carries the API version prefix).            |
| `CHANNEL_TWILIO_HTTP_TIMEOUT_SECONDS` | `30`                                | Per-request HTTP timeout in seconds.                            |

Credentials live only in the environment. A request carries HTTP Basic auth
(`AccountSid:AuthToken`); the auth header is never echoed into a raised error, and
redirects are not followed so it cannot reach another host.

## list\_twilio\_numbers

Lists every incoming phone number on the account, following Twilio's paging to
exhaustion, and returns each number's `sid`, `phone_number`, `sms_url`, and
`sms_method`.

## get\_twilio\_number\_webhook

Reads one number's inbound-message webhook. Takes the number's `phone_number_sid`
(required, non-empty) and returns its `sid`, `phone_number`, `sms_url`, and
`sms_method`.

## set\_twilio\_number\_webhook

Points a number's inbound-message webhook at a URL. Takes `phone_number_sid`
(required, non-empty) and `sms_url` (required, non-empty, https) and returns the
updated `sid`, `phone_number`, and `sms_url`. A non-https or empty URL raises
before any network call; a Twilio non-2xx propagates unchanged.
