Class: Anthropic::Models::Beta::BetaMCPToolUseBlockParam

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

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 ⇒ BetaMCPToolUseBlockParam

Returns a new instance of BetaMCPToolUseBlockParam.

Parameters:

  • id: (String)
  • input: (::Hash[Symbol, top])
  • name: (String)
  • server_name: (String)
  • cache_control: (Anthropic::Beta::BetaCacheControlEphemeral, nil)
  • type: (:mcp_tool_use)


29
30
31
32
33
34
35
36
# File 'sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs', line 29

def initialize: (
  id: String,
  input: ::Hash[Symbol, top],
  name: String,
  server_name: String,
  ?cache_control: Anthropic::Beta::BetaCacheControlEphemeral?,
  ?type: :mcp_tool_use
) -> void

Instance Attribute Details

#cache_control ⇒ Anthropic::Models::Beta::BetaCacheControlEphemeral?

Create a cache control breakpoint at this content block.

Parameters:

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

Returns:



37
# File 'lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb', line 37

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

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb', line 10

required :id, String

#input ⇒ Hash{Symbol=>Object}

Parameters:

  • value (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object})


15
# File 'lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb', line 15

required :input, Anthropic::Internal::Type::HashOf[Anthropic::Internal::Type::Unknown]

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb', line 20

required :name, String

#server_name ⇒ String

The name of the MCP server

Parameters:

  • value (String)

Returns:

  • (String)


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

required :server_name, String

#type ⇒ Symbol, :mcp_tool_use

Parameters:

  • value (:mcp_tool_use)

Returns:

  • (Symbol, :mcp_tool_use)


31
# File 'lib/anthropic/models/beta/beta_mcp_tool_use_block_param.rb', line 31

required :type, const: :mcp_tool_use

Instance Method Details

#to_hash ⇒ { id: String, input: ::Hash[Symbol, top], name: String, server_name: String, type: :mcp_tool_use, cache_control: Anthropic::Beta::BetaCacheControlEphemeral? }

Returns:

  • ({ id: String, input: ::Hash[Symbol, top], name: String, server_name: String, type: :mcp_tool_use, cache_control: Anthropic::Beta::BetaCacheControlEphemeral? })


38
39
40
41
42
43
44
45
# File 'sig/anthropic/models/beta/beta_mcp_tool_use_block_param.rbs', line 38

def to_hash: -> {
  id: String,
  input: ::Hash[Symbol, top],
  name: String,
  server_name: String,
  type: :mcp_tool_use,
  cache_control: Anthropic::Beta::BetaCacheControlEphemeral?
}