Class: ListFailuresTool

Inherits:
MCP::Tool
  • Object
show all
Defined in:
lib/generators/maquina/solid_errors/templates/app/agents/list_failures_tool.rb

Overview

MCP tool: the agent’s entry point. Lists unresolved errors (request failures and failed jobs alike), most recent first, with redacted job context where present.

Class Method Summary collapse

Class Method Details

.call(limit: ErrorsQuery::DEFAULT_LIMIT, server_context: nil) ⇒ Object



16
17
18
19
# File 'lib/generators/maquina/solid_errors/templates/app/agents/list_failures_tool.rb', line 16

def self.call(limit: ErrorsQuery::DEFAULT_LIMIT, server_context: nil)
  payload = FailureTriage.overview(limit: limit)
  MCP::Tool::Response.new([{type: "text", text: JSON.pretty_generate(payload)}])
end