JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const response = await client.agents.listTools('agent_abc123');
console.log(response.tools);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
response = client.agents.list_tools(
"agent_abc123",
)
print(response.tools)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Agents.ListTools(context.TODO(), "agent_abc123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Tools)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
response = cerca.agents.list_tools("agent_abc123")
puts(response)cerca agents list-tools \
--api-key 'My API Key' \
--agent-id agent_abc123curl --request GET \
--url https://api.cerca.dev/agents/{agentId}/tools \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cerca.dev/agents/{agentId}/tools")
.header("Authorization", "Bearer <token>")
.asString();{
"tools": [
{
"description": "<string>",
"inputSchema": {
"type": "object"
},
"requiresApproval": true
}
],
"sourceWarnings": [
{
"message": "<string>",
"source": "<string>",
"sourceId": "<string>"
}
]
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Tools
List tools
GET
/
agents
/
{agentId}
/
tools
JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const response = await client.agents.listTools('agent_abc123');
console.log(response.tools);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
response = client.agents.list_tools(
"agent_abc123",
)
print(response.tools)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Agents.ListTools(context.TODO(), "agent_abc123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Tools)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
response = cerca.agents.list_tools("agent_abc123")
puts(response)cerca agents list-tools \
--api-key 'My API Key' \
--agent-id agent_abc123curl --request GET \
--url https://api.cerca.dev/agents/{agentId}/tools \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/tools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cerca.dev/agents/{agentId}/tools")
.header("Authorization", "Bearer <token>")
.asString();{
"tools": [
{
"description": "<string>",
"inputSchema": {
"type": "object"
},
"requiresApproval": true
}
],
"sourceWarnings": [
{
"message": "<string>",
"source": "<string>",
"sourceId": "<string>"
}
]
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Example:
"agent_abc123"
Response
Unified list of runtime and external tools currently available to an agent.
Response for GET /agents/{agentId}/tools. The tools field is an inspection list, not a configuration request field.
Unified list of runtime and external tools currently available to the agent.
A unified available tool entry. Runtime tools include requiresApproval; external tools include approval.
- RuntimeInternalTool
- RuntimeExternalTool
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I