Skip to main content
PUT
/
api
/
v1
/
agents
/
{agent_id}
/
tools
/
{tool_id}
Update Agent Tool
curl --request PUT \
  --url https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "configuration": {},
  "is_enabled": true
}
'
import requests

url = "https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}"

payload = {
"configuration": {},
"is_enabled": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({configuration: {}, is_enabled: true})
};

fetch('https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_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([
'configuration' => [

],
'is_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}"

payload := strings.NewReader("{\n \"configuration\": {},\n \"is_enabled\": true\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-api-key", "<api-key>")
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://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"configuration\": {},\n \"is_enabled\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://agent-studio.thena.ai/api/v1/agents/{agent_id}/tools/{tool_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configuration\": {},\n \"is_enabled\": true\n}"

response = http.request(request)
puts response.read_body
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174001",
  "configuration": {
    "include_metadata": true,
    "max_results": 10
  },
  "created_at": "2023-01-01T00:00:00Z",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "is_enabled": true,
  "tool_name": "knowledge_base_search",
  "tool_type": "built_in",
  "updated_at": "2023-01-01T00:00:00Z"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string
required
tool_id
string<uuid>
required

Body

application/json

Model for updating an agent tool configuration.

configuration
Configuration · object | null

Updated configuration

is_enabled
boolean | null

Whether the tool is enabled

Response

Successful Response

Model for an agent tool configuration.

tool_name
string
required

Name of the tool

tool_type
string
required

Type of tool: 'built_in', 'mcp_server', 'external_tool'

id
string<uuid>
required

Unique identifier for the agent tool

agent_id
string<uuid>
required

ID of the agent this tool belongs to

created_at
string<date-time>
required

When the tool was configured

updated_at
string<date-time>
required

When the tool was last updated

configuration
Configuration · object | null

Tool-specific configuration settings

is_enabled
boolean
default:true

Whether the tool is enabled

mcp_server_id
string<uuid> | null

ID of the MCP server (if tool_type is 'mcp_server')

external_tool_connection_id
string<uuid> | null

ID of the external tool connection (if tool_type is 'external_tool')