Class: GetExceptionTool
- Inherits:
-
MCP::Tool
- Object
- MCP::Tool
- GetExceptionTool
- Defined in:
- lib/generators/maquina/solid_errors/templates/app/agents/get_exception_tool.rb
Overview
MCP tool: full detail for one error by fingerprint — backtrace, redacted context, and (for job failures) the replayable arguments the agent can turn into a regression test.
Class Method Summary collapse
Class Method Details
.call(fingerprint:, server_context: nil) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/generators/maquina/solid_errors/templates/app/agents/get_exception_tool.rb', line 17 def self.call(fingerprint:, server_context: nil) payload = FailureTriage.exception(fingerprint) MCP::Tool::Response.new([{type: "text", text: JSON.pretty_generate(payload)}]) rescue ActiveRecord::RecordNotFound MCP::Tool::Response.new( [{type: "text", text: JSON.pretty_generate(error: "No unresolved error found for fingerprint #{fingerprint}")}], error: true ) end |