Tools are functions or APIs the agent can call upon to perform actions like accessing databases or manipulating data. They let your agent schedule an appointment on behalf of your user, request a prescription refill, or do countless other tasks.

The tools list page shows all of the tools currently available to your organization.

If you want an agent to reference a specific tool during sessions with users, then you need to provide those instructions in the prompt. For example, if you want to provide hangup instructions to your agent, it might look something like:

Before a call ends, make sure to always ask user whether they need anything else. If user doesn’t need anything else, use “hangup” tool.

Creating a tool

To create a tool, click the “New tool” button on the top right of the list screen.

  • Name: The name of the tool is used to reference it elsewhere in Console, including in prompts and agents, so you should pick something that’s easily identifiable. It shouldn’t contain any whitespace.
  • Service: A service is a grouping of tools. You can select any available service here to add your new tool to that service.

Tool schema

You define the behavior and capabilities of a tool using the Tool Schema. More details on the structure of the schema are available here. An example schema to call the Open-Meteo API to look up weather information is below. (Note that the value of the “parameters” field must be defined as a JSON Schema per the OpenAI API.)

{
  "type": "endpoint",
  "tool": {
    "type": "function",
    "function": {
      "name": "get_weather",
      "description": "Get the weather for a city",
      "parameters": {
        "type": "object",
        "properties": {
          "longitude": {
            "type": "number",
            "description": "The longitude of the city"
          },
          "latitude": {
            "type": "number",
            "description": "The latitude of the city"
          }
        },
        "required": [
          "longitude",
          "latitude"
        ]
      }
    }
  },
  "endpoint": {
    "url": "https://api.open-meteo.com/v1/forecast",
    "method": "get",
    "argumentLocation": "query"
  },
  "defaults": null,
  "staticParameters": [
    {
      "name": "current",
      "description": "Information to retrieve from the Open-Meteo API, comma-separated",
      "required": true,
      "type": "string",
      "default": "temperature_2m,relative_humidity_2m,precipitation,rain,showers,snowfall"
    }
  ],
  "result": null
}
  • The “endpoint” object gives the agent details on what API endpoint to call and how to pass the parameters (in the body of a POST request).
  • The “tool” object includes a description of the tool, which should be written as instructions to the agent regarding what the tool does. It also includes a “parameters” object, which describes the various parameters that the agent should gather from the user’s input and send to the API endpoint in the “endpoint” object. (In this case, if the user says, for example, “What is the weather in New York City?”, the agent can determine the relevant latitude and longitude from the city name.)
  • The “staticParameters” object also describes parameters that should be sent to the API, but are predetermined at configuration time, rather than gathered by the agent from the user’s input. They can be configured here at the tool level, but can also be overridden at the agent level, so that different agents can use the same tool (by using a prompt that has been linked to that tool), but specify different behavior for that tool. For more information, see the Tool Configuration section.

Note that the name of each parameter (both static and non-static) in the tool definition must match the name of the parameter on the API endpoint side.