v1

latestOpenAPI 3.0.02026-07-268285163.6 KB
Assistant Tools

Get assistant tool by ID

Retrieve detailed information about a specific assistant tool

get/assistantTool/{tool_id}

Path parameters

tool_idstring required

ID of the assistant tool to retrieve

Response

Successful operation

Example response

{
  "tool": {
    "_id": "60a1b2c3d4e5f6g7h8i9j0k1",
    "name": "Weather Lookup",
    "icon_url": "assets/img/integrations/custom-tool.png",
    "definition": "{\n  \"name\": \"get_weather_forecast\",\n  \"description\": \"Retrieves the weather forecast for a specific location.\",\n  \"strict\": true,\n  \"parameters\": {\n    \"type\": \"object\",\n    \"required\": [\n      \"location\"\n    ],\n    \"properties\": {\n      \"location\": {\n        \"type\": \"string\",\n        \"description\": \"The city or location for which to fetch the weather forecast.\"\n      },\n      \"days\": {\n        \"type\": \"integer\",\n        \"description\": \"Number of days for the forecast (1-7).\",\n        \"minimum\": 1,\n        \"maximum\": 7\n      }\n    },\n    \"additionalProperties\": false\n  }\n}",
    "function": "// Available nodejs environment with pre-installed libraries\n// https://docs.example.com/custom-code\nlet location = {{location}};\nlet days = {{days}} || 3;\nlet response = '';\n\nif(location) {\n  response = `Weather forecast for ${location} for ${days} days: Sunny with temperatures between 20-25°C`;\n} else {\n  response = 'Location parameter is required';\n}\n\noutput.answer = response;\ncallback(output);",
    "user_id": "5a1b2c3d4e5f6g7h8i9j0k11",
    "type": "custom",
    "createdAt": "2024-03-15T10:30:00.000Z",
    "updatedAt": "2024-03-15T10:30:00.000Z"
  }
}