Class: Rubyagents::ListGems
- Defined in:
- lib/rubyagents/tools/list_gems.rb
Instance Method Summary collapse
Methods inherited from Tool
description, inherited, input, inputs, output_type, to_prompt, to_schema, tool_name
Instance Method Details
#call(**_kwargs) ⇒ Object
9 10 11 12 13 |
# File 'lib/rubyagents/tools/list_gems.rb', line 9 def call(**_kwargs) specs = Gem::Specification.sort_by(&:name) lines = specs.map { |s| "#{s.name} (#{s.version}) - #{s.summary&.slice(0, 80)}" } lines.join("\n") end |