Class: Evilution::MCP::MutateTool Private

Inherits:
MCP::Tool
  • Object
show all
Defined in:
lib/evilution/mcp/mutate_tool.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: ConfigBuilder, ErrorPayload, OptionParser, ProgressStreamer, ReportTrimmer, SurvivedEnricher

Class Method Summary collapse

Class Method Details

.call(server_context:, files: [], verbosity: nil, **opts) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



127
128
129
130
131
132
133
134
135
136
137
# File 'lib/evilution/mcp/mutate_tool.rb', line 127

def call(server_context:, files: [], verbosity: nil, **opts)
  config = build_config(files, opts)
  on_result = build_progress_streamer(server_context, opts, config)
  summary = Evilution::Runner.new(config: config, on_result: on_result).call
  compact = build_compact_report(summary, verbosity, opts, config)

  ::MCP::Tool::Response.new([{ type: "text", text: compact }])
rescue Evilution::Error => e
  payload = Evilution::MCP::MutateTool::ErrorPayload.build(e)
  ::MCP::Tool::Response.new([{ type: "text", text: ::JSON.generate(payload) }], error: true)
end