Class: StatusMcp::Server::ListServicesTool
- Defined in:
- lib/status_mcp/server.rb
Instance Method Summary collapse
Instance Method Details
#call(limit: 50) ⇒ Object
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/status_mcp/server.rb', line 201 def call(limit: 50) services = load_data limit ||= 50 list = services.take(limit).map { |s| s["name"] } response = "Available services (#{list.size}/#{services.size}):\n" response += list.join(", ") if services.size > limit response += "\n... and #{services.size - limit} more." end response end |