Class: LLM::Tool::Git
Overview
The LLM::Tool::Git class implements a tool that can perform a select number of git actions. The actions it can perform are read-only - at least for the time being.
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
Instance Method Details
#call(action:, arguments: nil) ⇒ Hash
23 24 25 26 |
# File 'lib/llm/tools/git.rb', line 23 def call(action:, arguments: nil) command = spawn(action:, arguments:) {ok: command.success?, stdout: command.stdout, stderr: command.stderr} end |