Atualizar ferramenta de uso durante a chamada
curl --request PUT \
--url https://api.example.com/user/tools/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"endpoint": "<string>",
"method": "<string>",
"timeout": 123,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
'import requests
url = "https://api.example.com/user/tools/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"endpoint": "<string>",
"method": "<string>",
"timeout": 123,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
endpoint: '<string>',
method: '<string>',
timeout: 123,
headers: [{name: '<string>', value: '<string>'}],
schema: [{name: '<string>', type: '<string>', description: '<string>'}]
})
};
fetch('https://api.example.com/user/tools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/user/tools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'endpoint' => '<string>',
'method' => '<string>',
'timeout' => 123,
'headers' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'schema' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/user/tools/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/user/tools/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/user/tools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Ferramenta atualizada com sucesso",
"data": {
"id": 1,
"name": "update_customer_info",
"description": "Use esta ferramenta para atualizar informações do cliente no sistema.",
"endpoint": "https://api.suaempresa.com/clientes/atualizar",
"method": "POST",
"timeout": 15,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"schema": [
{
"name": "customer_name",
"type": "string",
"description": "Nome completo do cliente"
},
{
"name": "customer_age",
"type": "number",
"description": "Idade do cliente"
},
{
"name": "newsletter_subscription",
"type": "boolean",
"description": "Indica se o cliente deseja receber a newsletter"
}
],
"created_at": "2025-10-10T12:00:00.000000Z",
"updated_at": "2025-10-10T14:30:00.000000Z"
}
}
{
"message": "Ferramenta não encontrada"
}
{
"message": "Falha na validação",
"errors": {
"name": [
"O nome da ferramenta deve conter apenas letras minúsculas e underscores, e iniciar com uma letra."
]
}
}
Mid Call Tools
Atualizar ferramenta de uso durante a chamada
Atualiza uma ferramenta de uso durante a chamada existente, alterando nome, descrição, parâmetros ou endpoint sem precisar recriar a integração.
PUT
/
user
/
tools
/
{id}
Atualizar ferramenta de uso durante a chamada
curl --request PUT \
--url https://api.example.com/user/tools/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"endpoint": "<string>",
"method": "<string>",
"timeout": 123,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
'import requests
url = "https://api.example.com/user/tools/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"endpoint": "<string>",
"method": "<string>",
"timeout": 123,
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"schema": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
endpoint: '<string>',
method: '<string>',
timeout: 123,
headers: [{name: '<string>', value: '<string>'}],
schema: [{name: '<string>', type: '<string>', description: '<string>'}]
})
};
fetch('https://api.example.com/user/tools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/user/tools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'endpoint' => '<string>',
'method' => '<string>',
'timeout' => 123,
'headers' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'schema' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/user/tools/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/user/tools/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/user/tools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"endpoint\": \"<string>\",\n \"method\": \"<string>\",\n \"timeout\": 123,\n \"headers\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Ferramenta atualizada com sucesso",
"data": {
"id": 1,
"name": "update_customer_info",
"description": "Use esta ferramenta para atualizar informações do cliente no sistema.",
"endpoint": "https://api.suaempresa.com/clientes/atualizar",
"method": "POST",
"timeout": 15,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"schema": [
{
"name": "customer_name",
"type": "string",
"description": "Nome completo do cliente"
},
{
"name": "customer_age",
"type": "number",
"description": "Idade do cliente"
},
{
"name": "newsletter_subscription",
"type": "boolean",
"description": "Indica se o cliente deseja receber a newsletter"
}
],
"created_at": "2025-10-10T12:00:00.000000Z",
"updated_at": "2025-10-10T14:30:00.000000Z"
}
}
{
"message": "Ferramenta não encontrada"
}
{
"message": "Falha na validação",
"errors": {
"name": [
"O nome da ferramenta deve conter apenas letras minúsculas e underscores, e iniciar com uma letra."
]
}
}
Este endpoint permite atualizar uma ferramenta de uso durante a chamada já existente. Todos os campos são opcionais — informe apenas os campos que deseja alterar.
Gerenciamento de Atribuição da Ferramenta
Para anexar ou remover esta ferramenta de assistentes, utilize a API de Assistentes:
Criar Assistente – Use o parâmetro tool_ids para anexar ferramentas
Atualizar Assistente – Gerencie quais ferramentas estão atribuídas a um assistente
Parâmetros de Caminho
Identificador único da ferramenta a ser atualizada
Parâmetros do Corpo
Nome da ferramenta — deve conter apenas letras minúsculas e underscores, e iniciar com uma letra
Explicação detalhada de quando e como a IA deve utilizar esta ferramenta (máx. 255 caracteres)
URL válida do endpoint da API a ser chamada
Método HTTP:
GET, POST, PUT, PATCH ou DELETETempo limite da requisição em segundos (1–30)
Campos da Resposta
Mensagem de sucesso
Objeto da ferramenta atualizada com todos os valores atuais
{
"message": "Ferramenta atualizada com sucesso",
"data": {
"id": 1,
"name": "update_customer_info",
"description": "Use esta ferramenta para atualizar informações do cliente no sistema.",
"endpoint": "https://api.suaempresa.com/clientes/atualizar",
"method": "POST",
"timeout": 15,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
}
],
"schema": [
{
"name": "customer_name",
"type": "string",
"description": "Nome completo do cliente"
},
{
"name": "customer_age",
"type": "number",
"description": "Idade do cliente"
},
{
"name": "newsletter_subscription",
"type": "boolean",
"description": "Indica se o cliente deseja receber a newsletter"
}
],
"created_at": "2025-10-10T12:00:00.000000Z",
"updated_at": "2025-10-10T14:30:00.000000Z"
}
}
{
"message": "Ferramenta não encontrada"
}
{
"message": "Falha na validação",
"errors": {
"name": [
"O nome da ferramenta deve conter apenas letras minúsculas e underscores, e iniciar com uma letra."
]
}
}
⌘I