Replaces all of the agent's tools. Each id is a tool (GET /v1/tenants/{tenantId}/tools) of the agent's
tenant, and the tool's availability must include the phase it is placed in:
before: run in order when the conversation starts (e.g. look up the caller).during: offered to the AI model as functions it can call during the conversation.after: run in order after the conversation ends (e.g. post a summary to a CRM). Output of earlier tools is
available to later ones through dynamic variables, so before and after can form tool chains.To take a tool away from the agent, send the lists without it. Send three empty lists to remove all.
Required permission: agents:write
BearerAuthorizationBearer <token>Tenant API key (evk_…), created in Studio → Vault → API keys.
tenantId*stringTenant id, or current for the key's own tenant. Must be the key's tenant or one of its sub-tenants.
id*stringAgent id.
The agent's tools per phase, complete.
The tools an agent uses, per phase, as tool ids (GET /v1/tenants/{tenantId}/tools). A list left out is empty.
before?array<>Run in this order when the conversation starts, before the AI speaks (e.g. look up the caller in a CRM).
during?array<>Offered to the AI model as functions it may call during the conversation. Order does not matter.
after?array<>Run in this order after the conversation ends (e.g. post a summary or create a ticket).
Saved.
curl -X PUT 'https://api.envocal.ai/v1/tenants/string/agents/string/tools' \ -H 'Content-Type: application/json' \ -d '{ "before": [ "0b7c2d9e-3a41-4f68-9c25-6d1e8f3a7b52" ], "during": [ "5e2a9c14-7d36-4b80-a1f9-2c4d6e8f0a13", "9f3b1d27-6c58-4e02-b7a4-8d0e2f4a6c35" ], "after": []}'curl -X PUT 'https://api.envocal.ai/v1/tenants/string/agents/string/tools' \
-H 'Content-Type: application/json' \
-d '{
"before": [
"0b7c2d9e-3a41-4f68-9c25-6d1e8f3a7b52"
],
"during": [
"5e2a9c14-7d36-4b80-a1f9-2c4d6e8f0a13",
"9f3b1d27-6c58-4e02-b7a4-8d0e2f4a6c35"
],
"after": []
}'