Class: TopExceptionsTool

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

Overview

MCP tool: the most frequent unresolved errors by occurrence count — lets the agent prioritize what is failing most, not just what failed most recently.

Class Method Summary collapse

Class Method Details

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



14
15
16
17
# File 'lib/generators/maquina/solid_errors/templates/app/agents/top_exceptions_tool.rb', line 14

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