ZIm/crates/scripting_tool/src/scripting_tool_description.md
Antonio Scandurra f3f97895a9
Improve script tool description and add lines iterator to Lua file objects (#26529)
Release Notes:

- N/A

---------

Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-03-12 07:58:11 +00:00

976 B

Evaluates the given Lua script in an interpreter with access to the Lua standard library. The tool returns the scripts output to stdout and any error that may have occurred.

Use this tool to explore the current project and edit the user's codebase or operating system as requested.

Additional functions provided:

--- Search for matches of a regular expression in files.
-- @param pattern The regex pattern to search for (uses Rust's regex syntax)
-- @return An array of tables with 'path' (file path) and 'matches' (array of matching strings)
-- @usage local results = search("function\\s+\\w+")
function search(pattern)
  -- Implementation provided by the tool
end

--- Generates an outline for the given file path, extracting top-level symbols such as functions, classes, exports, and other significant declarations. This provides a structural overview of the file's contents.
-- @param path
function outline(path)
  -- Implementation provided by the tool
end