Chat Associations
Endpoints for enabling/disabling toolkits in specific chats.
GET /api/chats/{chatId}/toolkits
List toolkits enabled for a chat.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
chatId | string | Chat ID |
Response:
{
"_links": {
"self": { "href": "/api/chats/{chatId}/toolkits" }
},
"_embedded": {
"inf:chat-toolkit": [
{
"chatId": "chat-123",
"toolkitId": "team:github-toolkit",
"toolkit": {
"id": "team:github-toolkit",
"name": "GitHub Integration",
"type": "mcp-remote",
"description": "Access GitHub repositories"
},
"createdAt": "2024-02-09T10:00:00Z"
}
]
},
"start": 0,
"count": 1,
"total": 1
}
PUT /api/chats/{chatId}/toolkits/{id}
Enable a toolkit for a chat.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
chatId | string | Chat ID |
id | string | Toolkit ID |
Response:
{
"chatId": "chat-123",
"toolkitId": "team:github-toolkit",
"createdAt": "2024-02-09T10:00:00Z"
}
Status: 201 Created (or 200 OK if already enabled)
Side Effects:
- Toolkit tools become available in the chat
- AI can now use tools from this toolkit in responses
DELETE /api/chats/{chatId}/toolkits/{id}
Disable a toolkit for a chat.
Authentication: Required
Path Parameters:
| Parameter | Type | Description |
|---|---|---|
chatId | string | Chat ID |
id | string | Toolkit ID |
Response: 204 No Content
Side Effects:
- Toolkit tools are no longer available in the chat
- Existing chat history remains unchanged
Use Cases
Project-Specific Tools
Enable different toolkits for different chats:
# Sales chat - enable CRM toolkit
PUT /api/chats/sales-chat-123/toolkits/team:hubspot-toolkit
# Dev chat - enable GitHub toolkit
PUT /api/chats/dev-chat-456/toolkits/team:github-toolkit
Dynamic Tool Access
Control tool availability based on chat context:
// Enable filesystem access for code review chat
await fetch(`/api/chats/${chatId}/toolkits/team:filesystem`, {
method: 'PUT'
});
// Disable after review complete
await fetch(`/api/chats/${chatId}/toolkits/team:filesystem`, {
method: 'DELETE'
});
Security Boundaries
Limit sensitive tool access to specific chats:
# Only enable database toolkit for admin chats
PUT /api/chats/admin-chat/toolkits/team:database-admin
Best Practices
- Minimal Access - Only enable toolkits needed for the chat's purpose
- Context-Aware - Match toolkits to chat topics
- Cleanup - Disable toolkits when no longer needed
- Audit - Review which toolkits are enabled for sensitive chats