Class: Pgbus::MCP::Tools::ProcessesTool

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

Overview

Lists every pgbus process (worker/consumer/dispatcher/scheduler/ supervisor/outbox/streamer) with kind, pid, heartbeat age, derived status and the claim-loop “stalled” verdict. Maps to DataSource#processes — which already computes :status as :healthy, :stale, or :stalled (the silent-wedge signal from #179/#181).

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



25
26
27
28
# File 'lib/pgbus/mcp/tools/processes_tool.rb', line 25

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