Skip to content

Tools API

Manage agent tools.

Endpoints

MethodEndpointDescription
GET/api/agents/{id}/toolsList tools
POST/api/agents/{id}/toolsCreate tool
GET/api/agents/{id}/tools/{toolId}Get tool
PUT/api/agents/{id}/tools/{toolId}Update tool
DELETE/api/agents/{id}/tools/{toolId}Delete tool

List Tools

bash
GET /api/agents/{id}/tools

Response

json
{
  "tools": [
    {
      "id": "tool-123",
      "name": "search_database",
      "description": "Search the knowledge base",
      "type": "function",
      "created_at": "2024-12-01T00:00:00Z"
    }
  ]
}

Create Tool

bash
POST /api/agents/{id}/tools
Content-Type: application/json

Request Body

json
{
  "name": "search_database",
  "description": "Search the knowledge base for information",
  "type": "function",
  "config": {
    "parameters": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search query"
        }
      },
      "required": ["query"]
    }
  }
}

Update Tool

bash
PUT /api/agents/{id}/tools/{toolId}

Delete Tool

bash
DELETE /api/agents/{id}/tools/{toolId}

Tool Types

TypeDescription
apiExternal API call
functionCustom function
mcpMCP server tool

Released under the MIT License.