Advanced Features

Custom Tools

Extend your AI's capabilities with custom function calling tools.

Custom tools allow your AI to perform actions beyond just answering questions. Connect to external APIs, fetch live data, submit forms, or integrate with your existing business systems.

What are Tools?

Tools are functions that the AI can call during a conversation. When a user asks something that requires external data or actions, the AI will:

  1. 1

    Recognize the need

    The AI identifies that it needs external data to answer

  2. 2

    Call the tool

    It invokes your custom tool with the appropriate parameters

  3. 3

    Process the response

    The tool executes and returns data to the AI

  4. 4

    Formulate answer

    The AI uses the data to provide a natural response

Example Use Cases

Package Tracking

"Where is my order?" → Fetches shipping status from your logistics API

Inventory Check

"Is this in stock?" → Queries your inventory system for real-time availability

Booking System

"Book a demo" → Creates appointments in your calendar system

CRM Integration

"Update my contact info" → Modifies customer records in your CRM

Creating a Custom Tool

Tools are defined in JSON format with the following structure:

{
  "name": "track_package",
  "description": "Track a package by its tracking number",
  "parameters": {
    "type": "object",
    "properties": {
      "tracking_number": {
        "type": "string",
        "description": "The package tracking number"
      }
    },
    "required": ["tracking_number"]
  },
  "endpoint": "https://your-api.com/track",
  "method": "GET"
}

Tool Properties

PropertyDescription
nameUnique identifier for the tool (snake_case)
descriptionExplains when and why to use this tool
parametersJSON Schema defining the tool's input parameters
endpointURL to call when the tool is invoked
methodHTTP method (GET, POST, PUT, DELETE)

Built-in Tools

hej! comes with several built-in tools that are always available:

search_knowledge

Searches your indexed website content for relevant information

get_document

Retrieves a specific page's content by URL

Best Practices

Write clear descriptions

The AI uses descriptions to decide when to call tools. Be specific about the tool's purpose.

Return structured data

Your endpoints should return clean JSON that's easy for the AI to interpret.

Handle errors gracefully

Return meaningful error messages that help the AI explain issues to users.

Secure your endpoints

Use authentication and rate limiting to protect your APIs from abuse.

Plan Availability

Custom tools are available on Business, Pro, and Enterprise plans. Built-in search tools are available on all plans.

Feedback

Route: /docs/custom-tools