Class: Chatwerk::Tools::PackagesTool

Inherits:
MCP::Tool
  • Object
show all
Defined in:
lib/chatwerk/tools/packages_tool.rb

Overview

List packages tool

Class Method Summary collapse

Class Method Details

.call(server_context:, package_path: nil) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/chatwerk/tools/packages_tool.rb', line 25

def call(server_context:, package_path: nil)
  Helpers.chdir
  result = Api.packages(package_path: package_path)

  MCP::Tool::Response.new([{
                            type: 'text',
                            text: result
                          }])
end