Class: Prescient::MCP::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/prescient/mcp/configuration.rb

Overview

Policy and capability configuration for the optional MCP adapter.

Constant Summary collapse

DEFAULT_MAX_INPUT_BYTES =

Returns Maximum default MCP input size in bytes.

Returns:

  • (Integer)

    Maximum default MCP input size in bytes

64_000
DEFAULT_TOOLS =

Returns Default MCP tools.

Returns:

  • (Array<String>)

    Default MCP tools

%w[
  prescient_generate prescient_embed prescient_providers prescient_health prescient_agent
].freeze
SUPPORTED_RESOURCES =

Returns Resources supported by the adapter.

Returns:

  • (Array<String>)

    Resources supported by the adapter

["prescient://providers", "prescient://health"].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: "prescient", version: Prescient::VERSION, max_input_bytes: DEFAULT_MAX_INPUT_BYTES, tools: DEFAULT_TOOLS, resources: ["prescient://providers", "prescient://health"]) ⇒ Configuration

Returns a new instance of Configuration.



18
19
20
21
22
23
24
25
26
27
# File 'lib/prescient/mcp/configuration.rb', line 18

def initialize(name: "prescient", version: Prescient::VERSION,
               max_input_bytes: DEFAULT_MAX_INPUT_BYTES,
               tools: DEFAULT_TOOLS,
               resources: ["prescient://providers", "prescient://health"])
  @name = name
  @version = version
  @max_input_bytes = validate_limit(max_input_bytes)
  @tools = Array(tools).map(&:to_s).freeze
  @resources = Array(resources).map(&:to_s).freeze
end

Instance Attribute Details

#max_input_bytesObject (readonly)

Returns the value of attribute max_input_bytes.



16
17
18
# File 'lib/prescient/mcp/configuration.rb', line 16

def max_input_bytes
  @max_input_bytes
end

#nameObject (readonly)

Returns the value of attribute name.



16
17
18
# File 'lib/prescient/mcp/configuration.rb', line 16

def name
  @name
end

#resourcesObject (readonly)

Returns the value of attribute resources.



16
17
18
# File 'lib/prescient/mcp/configuration.rb', line 16

def resources
  @resources
end

#toolsObject (readonly)

Returns the value of attribute tools.



16
17
18
# File 'lib/prescient/mcp/configuration.rb', line 16

def tools
  @tools
end

#versionObject (readonly)

Returns the value of attribute version.



16
17
18
# File 'lib/prescient/mcp/configuration.rb', line 16

def version
  @version
end