Class: Anthropic::Models::Beta::BetaRequestToolRemovalBlock

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_request_tool_removal_block.rb,
sig/anthropic/models/beta/beta_request_tool_removal_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:, cache_control: nil, type: :tool_removal) ⇒ Object

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

Mid-conversation directive to withdraw a tool.

tool references a tool (or MCP toolset) by name from the request's tools; it is no longer offered to the model from this point in the conversation onward.

Parameters:



# File 'lib/anthropic/models/beta/beta_request_tool_removal_block.rb', line 26

Instance Attribute Details

#cache_controlAnthropic::Models::Beta::BetaCacheControlEphemeral?

Create a cache control breakpoint at this content block.

Parameters:

  • value (Anthropic::Beta::BetaCacheControlEphemeral, nil)

Returns:



24
# File 'lib/anthropic/models/beta/beta_request_tool_removal_block.rb', line 24

optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true

#toolAnthropic::Models::Beta::BetaToolChangeToolReference, ...

Reference to a single tool the caller declared directly in tools[]. Does not accept the composed {server}_{name} form the server assigns to MCP-resolved tools — use mcp_tool_reference or mcp_toolset_reference for those.



13
# File 'lib/anthropic/models/beta/beta_request_tool_removal_block.rb', line 13

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

#typeSymbol, :tool_removal

Parameters:

  • value (:tool_removal)

Returns:

  • (Symbol, :tool_removal)


18
# File 'lib/anthropic/models/beta/beta_request_tool_removal_block.rb', line 18

required :type, const: :tool_removal

Instance Method Details

#to_hash{

Returns:

  • ({)


26
# File 'sig/anthropic/models/beta/beta_request_tool_removal_block.rbs', line 26

def to_hash: -> {