Skip to content

Tools ​

Manage tools that agents can use during conversations.

Tools define functions that agents can call to perform actions like searching knowledge, processing data, or integrating with external systems.

Base URL: /tools


Endpoints ​

MethodEndpointDescription
GET/toolsList tools
POST/toolsCreate a new tool
GET/tools/{tool_id}Get tool by ID
PUT/tools/{tool_id}Update a tool
DELETE/tools/{tool_id}Delete a tool

List Tools ​

GET /tools

Retrieve all tools for the authenticated account.

Authentication: Required

Query Parameters:

  • skip (integer): Pagination offset (default: 0)
  • limit (integer): Results per page (default: 50, max: 200)

Response:

json
{
  "data": [
    {
      "id": 1,
      "name": "Knowledge Search",
      "identifier": "knowledge-search",
      "description": "Search the knowledge base for relevant information",
      "tool_type": "function",
      "configuration": {
        "max_results": 10,
        "threshold": 0.7
      },
      "created_at": "2024-01-10T09:00:00Z",
      "updated_at": "2024-01-15T11:20:00Z",
      "account_id": 42
    }
  ],
  "pagination": { "total": 15, "skip": 0, "limit": 50, "has_more": false }
}

Example:

bash
curl -X GET "https://api.gnosari.com/api/v1/tools" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Create Tool ​

POST /tools

Create a new tool for the authenticated account.

Authentication: Required

Request:

json
{
  "name": "Knowledge Search",
  "identifier": "knowledge-search",
  "description": "Search the knowledge base for relevant information",
  "tool_type": "function",
  "configuration": {
    "max_results": 10,
    "threshold": 0.7
  }
}

Status: 201 Created

Response: Created tool object

Example:

bash
curl -X POST "https://api.gnosari.com/api/v1/tools" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Knowledge Search",
    "identifier": "knowledge-search",
    "tool_type": "function"
  }'

Get Tool ​

GET /tools/{tool_id}

Retrieve a specific tool by ID.

Authentication: Required

Response: Tool object

Error Responses:

  • 404 Not Found: Tool does not exist
  • 403 Forbidden: Tool belongs to another account

Update Tool ​

PUT /tools/{tool_id}

Update a tool's properties.

Authentication: Required

Request (partial update supported):

json
{
  "description": "Updated description",
  "configuration": {
    "max_results": 20,
    "threshold": 0.8
  }
}

Response: Updated tool object


Delete Tool ​

DELETE /tools/{tool_id}

Permanently delete a tool.

Authentication: Required

Response: No response body (204 No Content)

Warning: Deleting a tool does NOT remove it from agents using it. Agents with deleted tools may fail at runtime.


Tool Fields ​

FieldTypeDescription
idintegerUnique tool ID
namestringTool name (required)
identifierstringUnique identifier within account (required)
descriptionstringTool purpose and usage
tool_typestringTool type (e.g., "function", "api", "mcp")
configurationobjectTool-specific configuration (JSON)
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp
account_idintegerAccount ID (set automatically)

Base URL: /tools


Endpoints ​

MethodEndpointDescription
Endpoint table will be populated in Phase 5

List Tools ​

Endpoint documentation will be populated in Phase 5.


Get Tool ​

Endpoint documentation will be populated in Phase 5.


Create Tool ​

Endpoint documentation will be populated in Phase 5.


Update Tool ​

Endpoint documentation will be populated in Phase 5.


Delete Tool ​

Endpoint documentation will be populated in Phase 5.