BoxLang AI 3.0 introduces a structured tool ecosystem for LLM function calling built around a three-layer hierarchy: ITool interface, BaseTool abstract class, and concrete implementations like ClosureTool and MCPTool. BaseTool makes invoke() final to guarantee lifecycle events, execution timing, and result serialization across all tools. ClosureTool auto-introspects closure parameters to generate OpenAI-compatible schemas with zero boilerplate. The AIToolRegistry singleton enables named tool registration with module namespacing, @AITool annotation scanning, and two-step name resolution. Built-in tools include now@bxai (auto-registered for temporal awareness) and httpGet@bxai (opt-in for security). MCPTool proxies MCP server tools into the same ITool interface, and withMCPServer() APIs make connecting to entire MCP ecosystems trivial.
Table of contents
The Tool HierarchyBaseTool — The Abstract FoundationClosureTool — Zero-Boilerplate Tool CreationThe Global AI Tool RegistryBuilt-In Core Tools — now@bxaiMCPTool — MCP Server ProxyBuilding a Custom Class-Based ToolMCP Server SeedingPutting It All TogetherWhat's NextSort: