From e65ea596306721d3a2327cf6230e7106db77a414 Mon Sep 17 00:00:00 2001 From: T Date: Tue, 26 May 2026 11:10:15 -0600 Subject: basic lua tools --- examples/extensions/echo.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/extensions/echo.lua (limited to 'examples/extensions/echo.lua') diff --git a/examples/extensions/echo.lua b/examples/extensions/echo.lua new file mode 100644 index 0000000..d13920e --- /dev/null +++ b/examples/extensions/echo.lua @@ -0,0 +1,22 @@ +-- A trivial Lua tool that echoes back whatever the LLM asks it to. +-- Useful for exercising the panto CLI's Lua extension path end-to-end. +-- +-- Load with: panto --lua examples/extensions/echo.lua + +panto.register_tool { + name = "echo", + description = "Echo back the given message. Useful for testing whether tools work.", + schema = { + type = "object", + properties = { + message = { + type = "string", + description = "The text to echo back.", + }, + }, + required = { "message" }, + }, + handler = function(input) + return "echo: " .. input.message + end, +} -- cgit v1.3