Add configurable exception reporter Avoid leaking tool exceptions by sending them to a configurable exception reporter Add optional context to pass to tools Add basic instrumentation data/labels
13 lines
351 B
Ruby
13 lines
351 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ModelContextProtocol
|
|
class Configuration
|
|
attr_accessor :exception_reporter
|
|
attr_accessor :instrumentation_callback
|
|
|
|
def initialize
|
|
@exception_reporter = ->(exception, context) {} # Default no-op reporter
|
|
@instrumentation_callback = ->(data) {} # Default no-op callback
|
|
end
|
|
end
|
|
end
|