# Tools Resource

Create and configure [**Tools**](/docs/alpha/ai-assistants/tools) that an AI Assistant can use.

## Tool Properties

<OperationTable type="properties" data={{"type":"object","required":["name","description","type","requires_auth","enabled","meta","id","date_updated","date_created"],"refName":"assistants.v1.service.tool","modelName":"assistants_v1_service_tool","properties":{"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","description":"The SID of the [Account](/docs/iam/api/account) that created the Tool resource."},"description":{"description":"The description of the tool.","type":"string"},"enabled":{"description":"True if the tool is enabled.","type":"boolean"},"id":{"type":"string","pattern":"^aia_tool_.+$","description":"The tool ID."},"meta":{"description":"The metadata related to method, url, input_schema to used with the Tool.","type":"object"},"name":{"description":"The name of the tool.","type":"string"},"requires_auth":{"description":"The authentication requirement for the tool.","type":"boolean"},"type":{"description":"The type of the tool. ('WEBHOOK')","type":"string"},"url":{"type":"string","description":"The url of the tool resource."},"date_created":{"description":"The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","format":"date-time","type":"string"},"date_updated":{"description":"The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.","format":"date-time","type":"string"}}}} />

## Create a Tool

`POST https://assistants.twilio.com/v1/Tools`

### Request body parameters

```json
{"schema":{"type":"object","required":["name","type","enabled"],"refName":"assistants.v1.service.create_tool_request","modelName":"assistants_v1_service_create_tool_request","properties":{"assistant_id":{"type":"string","pattern":"^aia_asst_.+$","description":"The Assistant ID."},"description":{"description":"The description of the tool.","type":"string"},"enabled":{"description":"True if the tool is enabled.","type":"boolean"},"meta":{"description":"The metadata related to method, url, input_schema to used with the Tool.","type":"object"},"name":{"description":"The name of the tool.","type":"string"},"policy":{"description":"The policy associated with the tool.","type":"object","required":["policy_details"],"refName":"assistants.v1.service.create_policy_request","modelName":"assistants_v1_service_create_policy_request","properties":{"description":{"description":"The description of the policy.","type":"string"},"id":{"type":"string","pattern":"^aia_plcy_.+$","description":"The Policy ID."},"name":{"description":"The name of the policy.","type":"string"},"policy_details":{},"type":{"description":"The description of the policy.","type":"string"}}},"type":{"description":"The description of the tool.","type":"string"}}},"encodingType":"application/json","conditionalParameterMap":{}}
```

Create a Tool

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createTool() {
  const tool = await client.assistants.v1.tools.create({
    description: "Use this to schedule a meeting",
    enabled: true,
    meta: {
      url: "https://example.com",
      method: "POST",
      input_schema: "export type Data = { date: string }",
    },
    name: "Schedule a Meeting",
    type: "WEBHOOK",
  });

  console.log(tool.accountSid);
}

createTool();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
from twilio.rest.assistants.v1 import ToolList

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

tool = client.assistants.v1.tools.create(
    assistants_v1_service_create_tool_request=ToolList.AssistantsV1ServiceCreateToolRequest(
        {
            "description": "Use this to schedule a meeting",
            "enabled": True,
            "meta": {
                "url": "https://example.com",
                "method": "POST",
                "input_schema": "export type Data = { date: string }",
            },
            "name": "Schedule a Meeting",
            "type": "WEBHOOK",
        }
    )
)

print(tool.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Assistants.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var tool = await ToolResource.CreateAsync(
            assistantsV1ServiceCreateToolRequest: new ToolResource
                .AssistantsV1ServiceCreateToolRequest.Builder()
                .WithDescription("Use this to schedule a meeting")
                .WithEnabled(true)
                .WithMeta(new Dictionary<string, Object>() {
                    { "url", "https://example.com" },
                    { "method", "POST" },
                    { "input_schema", "export type Data = { date: string }" }
                })
                .WithName("Schedule a Meeting")
                .WithType("WEBHOOK")
                .Build());

        Console.WriteLine(tool.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.assistants.v1.Tool;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

        Tool.AssistantsV1ServiceCreateToolRequest assistantsV1ServiceCreateToolRequest =
            new Tool.AssistantsV1ServiceCreateToolRequest();
        assistantsV1ServiceCreateToolRequest.setDescription("Use this to schedule a meeting");
        assistantsV1ServiceCreateToolRequest.setEnabled(true);
        assistantsV1ServiceCreateToolRequest.setMeta(new HashMap<String, Object>() {
            {
                put("url", "https://example.com");
                put("method", "POST");
                put("input_schema", "export type Data = { date: string }");
            }
        });
        assistantsV1ServiceCreateToolRequest.setName("Schedule a Meeting");
        assistantsV1ServiceCreateToolRequest.setType("WEBHOOK");

        Tool tool = Tool.creator(assistantsV1ServiceCreateToolRequest).create();

        System.out.println(tool.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	assistants "github.com/twilio/twilio-go/rest/assistants/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &assistants.CreateToolParams{}
	params.SetAssistantsV1ServiceCreateToolRequest(assistants.assistants_v1_service_create_tool_request{
		Description: "Use this to schedule a meeting",
		Enabled:     true,
		Meta: assistants.assistants_v1_service_create_tool_request{
			Url:         "https://example.com",
			Method:      "POST",
			InputSchema: "export type Data = { date: string }",
		},
		Name: "Schedule a Meeting",
		Type: "WEBHOOK",
	})

	resp, err := client.AssistantsV1.CreateTool(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.AccountSid)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;
use Twilio\Rest\Assistants\V1\ToolModels;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$tool = $twilio->assistants->v1->tools->create(
    ToolModels::createAssistantsV1ServiceCreateToolRequest([
        "description" => "Use this to schedule a meeting",
        "enabled" => true,
        "meta" => [
            "url" => "https://example.com",
            "method" => "POST",
            "input_schema" => "export type Data = { date: string }",
        ],
        "name" => "Schedule a Meeting",
        "type" => "WEBHOOK",
    ])
);

print $tool->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

tool = @client
       .assistants
       .v1
       .tools
       .create(
         assistants_v1_service_create_tool_request: {
           'description' => 'Use this to schedule a meeting',
           'enabled' => true,
           'meta' => {
             'url' => 'https://example.com',
             'method' => 'POST',
             'input_schema' => 'export type Data = { date: string }'
           },
           'name' => 'Schedule a Meeting',
           'type' => 'WEBHOOK'
         }
       )

puts tool.account_sid
```

```bash
# This endpoint is not currently supported by the Twilio CLI. You can open an issue to request it on https://github.com/twilio/twilio-cli/issues
  # For an alternative low-code solution, check out https://www.twilio.com/docs/openapi/using-twilio-postman-collections
```

```bash
ASSISTANTS_V1_SERVICE_CREATE_TOOL_REQUEST_OBJ=$(cat << EOF
{
  "description": "Use this to schedule a meeting",
  "enabled": true,
  "meta": {
    "url": "https://example.com",
    "method": "POST",
    "input_schema": "export type Data = { date: string }"
  },
  "name": "Schedule a Meeting",
  "type": "WEBHOOK"
}
EOF
)
curl -X POST "https://assistants.twilio.com/v1/Tools" \
--json "$ASSISTANTS_V1_SERVICE_CREATE_TOOL_REQUEST_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2009-07-06T20:30:00Z",
  "date_updated": "2009-07-06T20:30:00Z",
  "description": "Use this to schedule a meeting",
  "enabled": true,
  "id": "aia_tool_#",
  "meta": {
    "url": "https://example.com",
    "method": "POST",
    "input_schema": "export type Data = { date: string }"
  },
  "name": "Schedule a Meeting",
  "requires_auth": false,
  "type": "WEBHOOK",
  "url": "https://www.example.com"
}
```

## Get a Tool

`GET https://assistants.twilio.com/v1/Tools/{id}`

### Path parameters

```json
[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]
```

Get a Tool

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchTool() {
  const tool = await client.assistants.v1.tools("aia_tool").fetch();

  console.log(tool.accountSid);
}

fetchTool();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

tool = client.assistants.v1.tools("aia_tool").fetch()

print(tool.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Assistants.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var tool = await ToolResource.FetchAsync(pathId: "aia_tool");

        Console.WriteLine(tool.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.assistants.v1.Tool;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Tool tool = Tool.fetcher("aia_tool").fetch();

        System.out.println(tool.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.AssistantsV1.FetchTool("aia_tool")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.AccountSid)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$tool = $twilio->assistants->v1->tools("aia_tool")->fetch();

print $tool->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

tool = @client
       .assistants
       .v1
       .tools('aia_tool')
       .fetch

puts tool.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:assistants:v1:tools:list \
   --id aia_tool
```

```bash
curl -X GET "https://assistants.twilio.com/v1/Tools/aia_tool" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2009-07-06T20:30:00Z",
  "date_updated": "2009-07-06T20:30:00Z",
  "description": "description",
  "enabled": false,
  "id": "aia_tool",
  "meta": {},
  "name": "Miss Christine Morgan",
  "policies": [
    {
      "id": "aia_plcy_#",
      "name": "name",
      "description": "description",
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "type": "type",
      "policy_details": {},
      "date_created": "2009-07-06T20:30:00Z",
      "date_updated": "2009-07-06T20:30:00Z"
    }
  ],
  "requires_auth": false,
  "type": "type",
  "url": "https://www.example.com"
}
```

## List Tools

`GET https://assistants.twilio.com/v1/Tools`

### Query parameters

```json
[{"explode":false,"in":"query","name":"AssistantId","schema":{"type":"string"}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

List tools

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listTools() {
  const tools = await client.assistants.v1.tools.list({ limit: 20 });

  tools.forEach((t) => console.log(t.accountSid));
}

listTools();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

tools = client.assistants.v1.tools.list(limit=20)

for record in tools:
    print(record.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Assistants.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var tools = await ToolResource.ReadAsync(limit: 20);

        foreach (var record in tools) {
            Console.WriteLine(record.AccountSid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.assistants.v1.Tool;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Tool> tools = Tool.reader().limit(20).read();

        for (Tool record : tools) {
            System.out.println(record.getAccountSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	assistants "github.com/twilio/twilio-go/rest/assistants/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &assistants.ListToolsParams{}
	params.SetLimit(20)

	resp, err := client.AssistantsV1.ListTools(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			fmt.Println(resp[record].AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$tools = $twilio->assistants->v1->tools->read([], 20);

foreach ($tools as $record) {
    print $record->accountSid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

tools = @client
        .assistants
        .v1
        .tools
        .list(limit: 20)

tools.each do |record|
   puts record.account_sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:assistants:v1:tools:list
```

```bash
curl -X GET "https://assistants.twilio.com/v1/Tools?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "meta": {
    "first_page_url": "https://www.example.com",
    "key": "key",
    "next_page_url": "https://www.example.com",
    "page": 42,
    "page_size": 42,
    "previous_page_url": "https://www.example.com",
    "url": "https://www.example.com"
  },
  "tools": [
    {
      "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "description": "description",
      "enabled": false,
      "id": "aia_tool_#",
      "meta": {},
      "name": "name",
      "requires_auth": false,
      "type": "type",
      "url": "https://www.example.com",
      "date_created": "2009-07-06T20:30:00Z",
      "date_updated": "2009-07-06T20:30:00Z"
    }
  ]
}
```

## Update a Tool

`PUT https://assistants.twilio.com/v1/Tools/{id}`

### Path parameters

```json
[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}]
```

### Request body parameters

```json
{"schema":{"type":"object","refName":"assistants.v1.service.update_tool_request","modelName":"assistants_v1_service_update_tool_request","properties":{"assistant_id":{"type":"string","pattern":"^aia_asst_.+$","description":"The Assistant ID."},"description":{"description":"The description of the tool.","type":"string"},"enabled":{"description":"True if the tool is enabled.","type":"boolean"},"meta":{"description":"The metadata related to method, url, input_schema to used with the Tool.","type":"object"},"name":{"description":"The name of the tool.","type":"string"},"policy":{"description":"The policy associated with the tool.","type":"object","required":["policy_details"],"refName":"assistants.v1.service.create_policy_request","modelName":"assistants_v1_service_create_policy_request","properties":{"description":{"description":"The description of the policy.","type":"string"},"id":{"type":"string","pattern":"^aia_plcy_.+$","description":"The Policy ID."},"name":{"description":"The name of the policy.","type":"string"},"policy_details":{},"type":{"description":"The description of the policy.","type":"string"}}},"type":{"description":"The type of the tool.","type":"string"}}},"encodingType":"application/json","conditionalParameterMap":{}}
```

Update a Tool

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function updateTool() {
  const tool = await client.assistants.v1.tools("aia_tool").update({
    description: "Updated Tool description.",
  });

  console.log(tool.accountSid);
}

updateTool();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
from twilio.rest.assistants.v1 import ToolList

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

tool = client.assistants.v1.tools("aia_tool").update(
    assistants_v1_service_update_tool_request=ToolList.AssistantsV1ServiceUpdateToolRequest(
        {"description": "Updated Tool description."}
    )
)

print(tool.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Assistants.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var tool = await ToolResource.UpdateAsync(new UpdateToolOptions("aia_tool") {
            AssistantsV1ServiceUpdateToolRequest =
                new ToolResource.AssistantsV1ServiceUpdateToolRequest.Builder()
                    .WithDescription("Updated Tool description.")
                    .Build()
        });

        Console.WriteLine(tool.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.HashMap;
import com.twilio.Twilio;
import com.twilio.rest.assistants.v1.Tool;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

        Tool.AssistantsV1ServiceUpdateToolRequest assistantsV1ServiceUpdateToolRequest =
            new Tool.AssistantsV1ServiceUpdateToolRequest();
        assistantsV1ServiceUpdateToolRequest.setDescription("Updated Tool description.");

        Tool tool = Tool.updater("aia_tool", assistantsV1ServiceUpdateToolRequest).update();

        System.out.println(tool.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	assistants "github.com/twilio/twilio-go/rest/assistants/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &assistants.UpdateToolParams{}
	params.SetAssistantsV1ServiceUpdateToolRequest(assistants.assistants_v1_service_update_tool_request{
		Description: "Updated Tool description.",
	})

	resp, err := client.AssistantsV1.UpdateTool("aia_tool",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		fmt.Println(resp.AccountSid)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;
use Twilio\Rest\Assistants\V1\ToolModels;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$tool = $twilio->assistants->v1->tools("aia_tool")->update(
    ToolModels::createAssistantsV1ServiceUpdateToolRequest([
        "description" => "Updated Tool description.",
    ])
);

print $tool->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

tool = @client
       .assistants
       .v1
       .tools('aia_tool')
       .update(
         assistants_v1_service_update_tool_request: {
           'description' => 'Updated Tool description.'
         }
       )

puts tool.account_sid
```

```bash
# This endpoint is not currently supported by the Twilio CLI. You can open an issue to request it on https://github.com/twilio/twilio-cli/issues
  # For an alternative low-code solution, check out https://www.twilio.com/docs/openapi/using-twilio-postman-collections
```

```bash
ASSISTANTS_V1_SERVICE_UPDATE_TOOL_REQUEST_OBJ=$(cat << EOF
{
  "description": "Updated Tool description."
}
EOF
)
curl -X PUT "https://assistants.twilio.com/v1/Tools/aia_tool" \
--json "$ASSISTANTS_V1_SERVICE_UPDATE_TOOL_REQUEST_OBJ" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2009-07-06T20:30:00Z",
  "date_updated": "2009-07-06T20:30:00Z",
  "description": "Updated Tool description.",
  "enabled": false,
  "id": "aia_tool",
  "meta": {},
  "name": "Miss Christine Morgan",
  "requires_auth": false,
  "type": "type",
  "url": "https://www.example.com"
}
```

## Delete a Tool

`DELETE https://assistants.twilio.com/v1/Tools/{id}`

### Path parameters

```json
[{"in":"path","name":"id","description":"The tool ID.","required":true,"schema":{"type":"string"}}]
```

Delete a Tool

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deleteTool() {
  await client.assistants.v1.tools("aia_tool").remove();
}

deleteTool();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.assistants.v1.tools("aia_tool").delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Assistants.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await ToolResource.DeleteAsync(pathId: "aia_tool");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.assistants.v1.Tool;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Tool.deleter("aia_tool").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	err := client.AssistantsV1.DeleteTool("aia_tool")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->assistants->v1->tools("aia_tool")->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .assistants
  .v1
  .tools('aia_tool')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:assistants:v1:tools:remove \
   --id aia_tool
```

```bash
curl -X DELETE "https://assistants.twilio.com/v1/Tools/aia_tool" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
