Class: LittleGhost::MCP::Call
- Inherits:
-
Data
- Object
- Data
- LittleGhost::MCP::Call
- Defined in:
- lib/little_ghost/mcp/types.rb,
lib/little_ghost/mcp/types.rb
Overview
Describes one MCP Tool invocation. It combines the server's Definition, the copied arguments, and the Tool::Binding used to execute the generated Tool.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#binding ⇒ Object
readonly
Returns the value of attribute binding.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
Instance Method Summary collapse
-
#initialize(definition:, arguments:, context: nil, binding: Tool::Binding.new) ⇒ Call
constructor
A new instance of Call.
Constructor Details
#initialize(definition:, arguments:, context: nil, binding: Tool::Binding.new) ⇒ Call
Returns a new instance of Call.
133 134 135 136 137 138 139 140 141 142 |
# File 'lib/little_ghost/mcp/types.rb', line 133 def initialize(definition:, arguments:, context: nil, binding: Tool::Binding.new) raise ArgumentError, "definition must be a LittleGhost::MCP::Definition" unless definition.is_a?(Definition) super( definition:, arguments: ImmutableValue.mapping(arguments, field: "tool call arguments"), context:, binding: ) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments
132 133 134 |
# File 'lib/little_ghost/mcp/types.rb', line 132 def arguments @arguments end |
#binding ⇒ Object (readonly)
Returns the value of attribute binding
132 133 134 |
# File 'lib/little_ghost/mcp/types.rb', line 132 def binding @binding end |
#context ⇒ Object (readonly)
Returns the value of attribute context
132 133 134 |
# File 'lib/little_ghost/mcp/types.rb', line 132 def context @context end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition
132 133 134 |
# File 'lib/little_ghost/mcp/types.rb', line 132 def definition @definition end |