Class: BundlerMCP::Tools::ListProjectGems
- Inherits:
-
FastMcp::Tool
- Object
- FastMcp::Tool
- BundlerMCP::Tools::ListProjectGems
- Defined in:
- lib/bundler_mcp/tools/list_project_gems.rb
Overview
Informs the client of all bundled Ruby gems with their versions, descriptions, installation paths, documentation, and (optionally) source code locations
Class Method Summary collapse
-
.name ⇒ String
Tool name exposed by FastMCP to clients.
Instance Method Summary collapse
-
#call ⇒ Array<Hash>
Invoke the tool to list all installed gems.
-
#initialize(collection = ResourceCollection.instance) ⇒ ListProjectGems
constructor
A new instance of ListProjectGems.
Constructor Details
#initialize(collection = ResourceCollection.instance) ⇒ ListProjectGems
Returns a new instance of ListProjectGems.
26 27 28 29 |
# File 'lib/bundler_mcp/tools/list_project_gems.rb', line 26 def initialize(collection = ResourceCollection.instance) @resource_collection = collection super() end |
Class Method Details
.name ⇒ String
Returns Tool name exposed by FastMCP to clients.
21 22 23 |
# File 'lib/bundler_mcp/tools/list_project_gems.rb', line 21 def self.name "list_project_gems" end |
Instance Method Details
#call ⇒ Array<Hash>
Invoke the tool to list all installed gems
33 34 35 36 |
# File 'lib/bundler_mcp/tools/list_project_gems.rb', line 33 def call data = resource_collection.map(&:to_h) JSON.generate(data) end |