Custom Tools
Extend agent capabilities with custom tools written in Lua or exposed via MCP.
Overview
Section titled “Overview”Tools are functions that agents can call to interact with the world:
- Search notes
- Read/write files
- Execute commands
- Call external APIs
Lua Tools
Section titled “Lua Tools”Create tools using the Lua scripting language:
-- tools/search_web.lua
--- Search the web for information-- @tool name="search_web" description="Search the web for information"-- @param query string "Search query"function search_web(args) local response = cru.http.get("https://api.search.com?q=" .. args.query) return { results = response.body }endMCP Tools
Section titled “MCP Tools”Expose tools via Model Context Protocol:
[[mcp.servers]]name = "my-tools"command = "my-mcp-server"Tool Definition
Section titled “Tool Definition”name: search_webdescription: Search the web for informationparameters: query: type: string description: Search query required: trueSee Also
Section titled “See Also”- Creating Plugins - Plugin development guide
- MCP Gateway - External tool integration
- Language Basics - Lua syntax