List an agent's tools
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tools": [
{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"agent_id": null,
"name": "transfer_to_support",
"description": "Transfer the caller to a support agent when they ask for a person.",
"type": "builtin",
"configs": {
"action": "connect_to_human",
"transfer_mode": "cold",
"destination_number": "+14155550199"
},
"parameters": {},
"parameter_mapping": null,
"hold_message": null,
"hold_messages": null,
"async_config": null,
"session": null,
"updated_at": 1794393600000,
"library_tool_id": null,
"library_revision": null,
"library_channels": null,
"used_by_count": 3
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "Agent not found"
}Tools
List an agent's tools
Returns the tools attached to the agent, in attachment order: the project-wide tools it uses and its private tools. This is the agent’s current tool set, which its next published version gets. used_by_count counts every agent of the project that uses the tool, not only this one.
GET
/
v1
/
projects
/
{projectId}
/
agents
/
{id}
/
tools
List an agent's tools
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tools": [
{
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"agent_id": null,
"name": "transfer_to_support",
"description": "Transfer the caller to a support agent when they ask for a person.",
"type": "builtin",
"configs": {
"action": "connect_to_human",
"transfer_mode": "cold",
"destination_number": "+14155550199"
},
"parameters": {},
"parameter_mapping": null,
"hold_message": null,
"hold_messages": null,
"async_config": null,
"session": null,
"updated_at": 1794393600000,
"library_tool_id": null,
"library_revision": null,
"library_channels": null,
"used_by_count": 3
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "Agent not found"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.