Herramientas
Herramientas
Obtiene todas las herramientas
GET /tools
Recupera una lista de todas las herramientas.
- HTTP
- cURL
- JavaScript
- Python
GET /tools HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -L \
--url '/tools' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Accept: */*'
const response = await fetch('/tools', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Accept": "*/*"
},
});
const data = await response.json();
import requests
response = requests.get(
"/tools",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Accept":"*/*"},
)
data = response.json()
Obtiene una herramienta por ID
GET /tools/{id}
Recupera una herramienta específica por su ID.
- HTTP
- cURL
- JavaScript
- Python
GET /tools/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -L \
--url '/tools/{id}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Accept: */*'
const response = await fetch('/tools/{id}', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Accept": "*/*"
},
});
const data = await response.json();
import requests
response = requests.get(
"/tools/{id}",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Accept":"*/*"},
)
data = response.json()
Crea una nueva herramienta
POST /tools
Crea una nueva herramienta.
- HTTP
- cURL
- JavaScript
- Python
POST /tools HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"name": "My Tool",
"description": "Tool description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
}
curl -L \
--request POST \
--url '/tools' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Tool",
"description": "Tool description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
}'
const response = await fetch('/tools', {
method: 'POST',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "My Tool",
"description": "Tool description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
})
});
const data = await response.json();
import json
import requests
response = requests.post(
"/tools",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Content-Type":"application/json"},
data=json.dumps({
"name": "My Tool",
"description": "Tool description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
})
)
data = response.json()
Actualiza una herramienta por ID
PUT /tools/{id}
Actualiza una herramienta específica por su ID.
- HTTP
- cURL
- JavaScript
- Python
PUT /tools/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
{
"name": "My Tool",
"description": "Updated description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
}
curl -L \
--request PUT \
--url '/tools/{id}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Tool",
"description": "Updated description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
}'
const response = await fetch('/tools/{id}', {
method: 'PUT',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "My Tool",
"description": "Updated description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
})
});
const data = await response.json();
import json
import requests
response = requests.put(
"/tools/{id}",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Content-Type":"application/json"},
data=json.dumps({
"name": "My Tool",
"description": "Updated description",
"color": "#7C3AED",
"schema": "{}",
"func": "return true"
})
)
data = response.json()
Elimina una herramienta por ID
delete /tools/{id}
Elimina una herramienta específica por su ID.
- HTTP
- cURL
- JavaScript
- Python
DELETE /tools/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
curl -L \
--request DELETE \
--url '/tools/{id}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Accept: */*'
const response = await fetch('/tools/{id}', {
method: 'DELETE',
headers: {
"Authorization": "Bearer YOUR_SECRET_TOKEN",
"Accept": "*/*"
},
});
const data = await response.json();
import requests
response = requests.delete(
"/tools/{id}",
headers={"Authorization":"Bearer YOUR_SECRET_TOKEN","Accept":"*/*"},
)
data = response.json()