Skip to main content
Follow these steps to create a new Function Tool
1

Add a new Tool to a Project

Use the + button to add a new Entity to a Project.
Tool Add

Select Function Tool

2

Enter Tool Details

Enter the main details of the tool:
  • Key, used by models to reference the tool
  • Name, used in the studio to find the tool
  • Description, used to describe the tool
    Make the Description as precise as possible, it is used notably by Agents when looking up relevant tools for their tasks.
Function Tool Configure

Configure all fields

3

Configure your Function Tool

Function Tools are defined using JSON.Here is an example of a JSON schema for a function get_current_weather that declares the fields location (string)and unit (string):
{
  "type": "object",
  "properties": {
    "unit": {
      "type": "string",
      "description": "The temperature unit, e.g. Celsius"
    },
    "location": {
      "type": "string",
      "description": "The city and state, e.g. San Francisco, CA"
    }
  },
  "required": [
    "location",
    "unit"
  ]
}
The object defined here is based on JSON Schema. This framework allows for extensible definition that fit your ideal function definition.

Field Details

Type

Use here any of the valid JSON types: object, string, integer, number, array, etc… The top-level type will most commonly be an object holding other properties.Learn more about all JSON types in the JSON Schema definition.

Properties

Properties are definition of fields within an object. Here you can define any new variable. Nested properties are allowed.

Required

The required array within an object defines which fields must be entered for a JSON payload to be validated.