BotServer compiles BASIC scripts (`.bas` files) into tool definitions that can be called by the LLM. The compilation process extracts parameters, descriptions, and generates metadata for tool discovery.
## Overview
The compilation process:
1. Reads `.bas` files from `.gbdialog` directories
2. Parses parameter declarations and descriptions
3. Generates tool definitions in MCP and OpenAI formats
4. Stores compiled tools in the database
5. Makes tools available for LLM invocation
## The Compilation Pipeline
### 1. File Detection
The `DriveMonitor` service watches for changes in `.gbdialog` directories:
3.**Provide LIKE examples**: Improves LLM parameter filling
4.**Test after changes**: Verify compilation succeeded
5.**Check logs**: Monitor for compilation errors
## Limitations
- Parameters must be declared at script start
- Only supports basic types (string, number, boolean)
- Cannot have optional parameters (all are required)
- No nested object parameters
- No array parameters
## Summary
The compilation process transforms BASIC scripts into callable tools that the LLM can discover and invoke. This automatic compilation ensures that changes to scripts are immediately available for use in conversations, making development iteration fast and seamless.