Class: Pgbus::MCP::Tools::QueuesTool

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/pgbus/mcp/tools/queues_tool.rb

Overview

Lists every queue with depth, visible count, oldest-message age and throughput — the “are queues backed up?” diagnostic. Maps to DataSource#queues_with_metrics. No payloads are involved.

Class Method Summary collapse

Methods inherited from BaseTool

annotations_value, data_source_from, error_response, json_response, payloads_allowed?

Class Method Details

.call(server_context: nil) ⇒ Object



21
22
23
24
# File 'lib/pgbus/mcp/tools/queues_tool.rb', line 21

def self.call(server_context: nil)
  data_source = data_source_from(server_context)
  json_response({ queues: data_source.queues_with_metrics })
end