A tool is a function that an agent can call to perform actions like accessing databases, making API calls, or processing data. For an agent to have access to a tool, the prompt associated with that agent should be linked to the tool and include instructions to use it.

Example Usage

import { ToolDetailResponse } from "syllable-sdk/models/components";

let value: ToolDetailResponse = {
  name: "Weather Fetcher",
  definition: {
    tool: {
      function: {
        name: "weather_fetcher",
        description: "Fetches weather data",
        parameters: "<value>",
      },
    },
    endpoint: {
      url: "https://api.example.com",
      method: "get",
      argumentLocation: "body",
    },
    defaults: "<value>",
  },
  serviceId: 265039,
  id: 66149,
  lastUpdated: new Date("2023-03-13T21:40:13.537Z"),
  lastUpdatedBy: "user@email.com",
  fields: [
    "<value>",
  ],
};

Fields

FieldTypeRequiredDescriptionExample
namestringTRUEThe name of the toolWeather Fetcher
definitioncomponents.ToolDefinitionTRUEA tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
serviceIdnumberTRUEThe service to which this tool belongs
idnumberTRUEThe ID of the tool
lastUpdatedCommentsstringFALSEUpdate comments
serviceNamestringFALSEThe name of the service to which the tool belongs
lastUpdatedDateTRUEThe timestamp of the most recent update to the service
lastUpdatedBystringTRUEThe email of the user who last updated the tooluser@email.com
fieldsstring[]TRUEFields that the tool accepts as input