Class: Clacky::Tools::Hello

Inherits:
Base
  • Object
show all
Defined in:
lib/clacky/extension/scaffold/templates/full/tools/hello.rb

Overview

Example extension-contributed tool. The file name maps to this class name (tools/hello.rb → Clacky::Tools::Hello); it is injected only into agents that declare tools: [hello].

Instance Attribute Summary

Attributes inherited from Base

#agent

Instance Method Summary collapse

Methods inherited from Base

#category, #description, #format_call, #format_result, #name, #parameters, #to_function_definition

Instance Method Details

#execute(name: nil) ⇒ Object



23
24
25
# File 'lib/clacky/extension/scaffold/templates/full/tools/hello.rb', line 23

def execute(name: nil, **)
  { message: "Hello, #{name || 'world'}!" }
end