Class: LLM::Tool::Which
Overview
The LLM::Tool::Which class implements a tool that locates an executable on the system PATH.
This lets an agent discover whether a command it intends
to use is actually available before attempting to run it.
For example, checking which("rg") before a search, or
which("git") before a version control operation, avoids
a failed subprocess and lets the agent adapt its strategy
when a tool is missing.
Instance Method Summary collapse
Methods inherited from LLM::Tool
a2a, a2a?, #a2a?, clear_registry!, description, find_by_name!, function, #function, inherited, mcp, mcp?, #mcp?, name, #on_cancel, #on_interrupt, params, register, registry, skill?, #skill?, unregister
Methods included from Param
Methods included from Function::Registry
#clear_registry!, extended, #find_by_name, #lock, #register, #registry, #registry_key, #tool_name, #unregister