Class: Anthropic::Models::Beta::BetaResponseToolAdditionBlock

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_response_tool_addition_block.rb,
sig/anthropic/models/beta/beta_response_tool_addition_block.rbs

Defined Under Namespace

Modules: Tool

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(tool:, type: :tool_addition) ⇒ void

An entry of a compaction block's tool_changes: a tool the compacted range made available, as a reference to a tools entry or MCP toolset, or as the tool definition in effect at the end of the range, by value. Send it back unchanged.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaResponseToolAdditionBlock for more details.

Parameters:



# File 'lib/anthropic/models/beta/beta_response_tool_addition_block.rb', line 19

Instance Attribute Details

#toolAnthropic::Models::Beta::BetaResponseToolChangeToolReference, ...

The tool made available: a reference to a tools entry or MCP toolset, or a tool_definition carrying the definition by value.



12
# File 'lib/anthropic/models/beta/beta_response_tool_addition_block.rb', line 12

required :tool, union: -> { Anthropic::Beta::BetaResponseToolAdditionBlock::Tool }

#typeSymbol, :tool_addition

Parameters:

  • value (:tool_addition)

Returns:

  • (Symbol, :tool_addition)


17
# File 'lib/anthropic/models/beta/beta_response_tool_addition_block.rb', line 17

required :type, const: :tool_addition

Instance Method Details

#to_hash{

Returns:

  • ({)


22
# File 'sig/anthropic/models/beta/beta_response_tool_addition_block.rbs', line 22

def to_hash: -> {