Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

USE TOOL

Syntax

USE TOOL tool-name

Parameters

ParameterTypeDescription
tool-nameStringName of the tool to load (without .bas extension)

Description

Loads a tool definition and makes it available to the LLM for the current session. Tools extend the bot’s capabilities with specific functions like calculations, API calls, or data processing.

Examples

Basic Usage

' Load weather tool
USE TOOL "weather"

' Now system AI can use weather functions during conversations
TALK "What weather information would you like?"
' System AI automatically uses the tool when needed

Multiple Tools

' Load several tools
USE TOOL "calculator"
USE TOOL "translator"
USE TOOL "date-time"

' System AI has access to all loaded tools during conversations
TALK "I can help you with calculations, translations, and date/time information."
' System AI automatically uses the appropriate tools when needed

Tool Definition Format

Tools are defined as BASIC scripts with PARAM declarations:

' weather.bas
PARAM location AS string LIKE "Tokyo" DESCRIPTION "City name"
DESCRIPTION "Get current weather for a location"

' Tool logic here
temp = GET_TEMPERATURE(location)
conditions = GET_CONDITIONS(location)
result = location + ": " + temp + "°, " + conditions
RETURN result

Notes

  • Tools remain active for the entire session
  • Use CLEAR TOOLS to remove all loaded tools
  • Tool names should be descriptive
  • Tools are loaded from the .gbdialog/tools/ directory