Adding Tools

Adaline enables you to add tools to LLM that support function calling.

Tools are part of the prompt and are sent to the LLM alongside your messages. You can add multiple tools in your prompt, each representing a unique external function and service that the LLM can invoke.

To add tools, follow these steps:

1

Choose supported model

Select an appropriate model from dropdown that supports tool calling.

2

Access Tool Configuration

Navigate to the add tool button to open the tool editor.

3

Add your tool definition

Create your tool using the provided interface:

  • Enter the function name (e.g., get_windspeed)
  • Define variables with appropriate data types
  • Add descriptions for both the function and its parameters
4

Enable Tool Choice

Ensure the ‘tool choice’ configuration parameter is properly set in your model settings to allow the LLM to generate tool calls effectively.

  • none instructs the LLM to not invoke any tools even though they’re available in the prompt
  • auto lets the LLM decide which tools to use and how many based on the conversation context
  • required forces the LLM to invoke at least one tool in its response.

For learning about “Tool Response” follow Tool Calling.

JSON Schema Configuration

Adaline supports advanced tool configuration using JSON schema format, giving you precise control over tool definitions and parameter validation.

JSON Schema Structure

When using JSON schema mode, define your tools using the following OpenAI JSON schema structure:

JSON Schema Structure

{
  "type": "function",
  "schema": {
    "name": "get_weather_from_location",
    "description": "Get the current weather of a location",
    "parameters": {
      "type": "object",
      "properties": {
        "location": {
          "description": "location to get weather of, e.g. San Francisco, CA",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "location"
      ]
    },
    "strict": true
  }
}

Key Schema Components

  • Function Definition
    • type: Always set to “function” for tool definitions
    • schema: Contains the complete tool specification
  • Tool Metadata
    • name: The function name that the LLM will call
    • description: Clear explanation of what the tool does
  • Parameter Configuration
    • parameters.type: Defines the parameter structure (typically “object”)
    • properties: Individual parameter definitions with types and descriptions
    • required: Array of mandatory parameter names
    • additionalProperties: Set to false to restrict parameters to defined ones only
    • strict: Enables strict schema validation

This JSON approach provides more granular control over tool behavior and ensures precise parameter validation during execution.