Skip to main content
PATCH
/
ai-agents
/
agent-builder
/
agents
/
{uid}
/
tools
/
add
Add Tools to Agent
curl --request PATCH \
  --url https://{appId}.api-{region}.cometchat.io/v3/ai-agents/agent-builder/agents/{uid}/tools/add \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "tools": [
    "gmail",
    "google-sheets",
    "slack"
  ]
}
'
{
  "success": true,
  "data": {
    "uid": "agent-uuid-1234",
    "appId": "my-app-id",
    "name": "Support Agent",
    "icon": "https://example.com/icon.png",
    "isActive": true,
    "description": "A helpful support agent",
    "tools": [
      "gmail",
      "slack"
    ],
    "files": [],
    "websites": [],
    "otherKbIntegrations": [],
    "apiTools": [],
    "mcpServers": [],
    "frontendActions": [],
    "ragVersion": "v2",
    "lastMessageAt": null,
    "instruction": "You are a helpful assistant",
    "formattedInstruction": "You are a helpful assistant",
    "metaData": {},
    "model": "gpt-4o-mini",
    "modelMetaData": {},
    "createdAt": 1700000000000,
    "updatedAt": 1700000000000
  }
}
For the complete error reference, see Error Guide.

Authorizations

apikey
string
header
required

API Key (i.e. Rest API Key from the Dashboard).

Path Parameters

uid
string
required

Unique identifier of the agent

Body

application/json
tools
string[]
required

Array of tool names to add or remove

Example:
["gmail", "google-sheets", "slack"]

Response

200 - application/json

Tools successfully added to the agent.

success
boolean
Example:

true

data
object