Class: Prescient::MCP::Configuration
- Inherits:
-
Object
- Object
- Prescient::MCP::Configuration
- 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.
64_000- DEFAULT_TOOLS =
Returns Default MCP tools.
%w[ prescient_generate prescient_embed prescient_providers prescient_health prescient_agent ].freeze
- SUPPORTED_RESOURCES =
Returns Resources supported by the adapter.
["prescient://providers", "prescient://health"].freeze
Instance Attribute Summary collapse
-
#max_input_bytes ⇒ Object
readonly
Returns the value of attribute max_input_bytes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
-
#tools ⇒ Object
readonly
Returns the value of attribute tools.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name: "prescient", version: Prescient::VERSION, max_input_bytes: DEFAULT_MAX_INPUT_BYTES, tools: DEFAULT_TOOLS, resources: ["prescient://providers", "prescient://health"]) ⇒ Configuration
constructor
A new instance of Configuration.
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_bytes ⇒ Object (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 |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/prescient/mcp/configuration.rb', line 16 def name @name end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
16 17 18 |
# File 'lib/prescient/mcp/configuration.rb', line 16 def resources @resources end |
#tools ⇒ Object (readonly)
Returns the value of attribute tools.
16 17 18 |
# File 'lib/prescient/mcp/configuration.rb', line 16 def tools @tools end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
16 17 18 |
# File 'lib/prescient/mcp/configuration.rb', line 16 def version @version end |