Class: Pgbus::MCP::Tools::LocksTool

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

Overview

Lists active job uniqueness locks (the leaked-uniqueness-lock diagnostic). Maps to DataSource#job_locks — lock_key, queue_name, msg_id, created_at, age_seconds. No payloads 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/locks_tool.rb', line 21

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