Class: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams

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

Defined Under Namespace

Modules: PermissionPolicy, Type

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(allowed_domains: nil, blocked_domains: nil, enabled: nil, permission_policy: nil, type: nil, user_location: nil, name: :web_search) ⇒ BetaManagedAgentsWebSearchToolConfigParams

Configuration override for the web_search tool.

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

Parameters:

  • allowed_domains (Array<String>) (defaults to: nil) —

    Only return search results whose host is one of these domains or a subdomain of

  • blocked_domains (Array<String>) (defaults to: nil) —

    Never return search results whose host is one of these domains or a subdomain of

  • enabled (Boolean, nil) (defaults to: nil) —

    Whether this tool is enabled and available to Claude. Overrides the default_conf

  • permission_policy (Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, Anthropic::Models::Beta::BetaManagedAgentsAutoPolicy, nil) (defaults to: nil) —

    Permission policy for this tool. Controls whether tool calls are auto-approved o

  • type (Symbol, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::Type) (defaults to: nil)
  • user_location (Anthropic::Models::Beta::BetaManagedAgentsUserLocation, nil) (defaults to: nil) —

    Approximate user location for search result localization.

  • name (Symbol, :web_search) (defaults to: :web_search) —

    Must be "web_search".

  • allowed_domains: (::Array[String]) (defaults to: nil)
  • blocked_domains: (::Array[String]) (defaults to: nil)
  • enabled: (Boolean, nil) (defaults to: nil)
  • permission_policy: (Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::permission_policy, nil) (defaults to: nil)
  • type: (Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::type_) (defaults to: nil)
  • user_location: (Anthropic::Beta::BetaManagedAgentsUserLocation, nil) (defaults to: nil)
  • name: (:web_search) (defaults to: :web_search)


# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 58

Instance Attribute Details

#allowed_domains ⇒ Array<String>?

Only return search results whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme or port; an optional path suffix is accepted). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with blocked_domains.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


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

optional :allowed_domains, Anthropic::Internal::Type::ArrayOf[String]

#blocked_domains ⇒ Array<String>?

Never return search results whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "ads.example.com" (no scheme or port; an optional path suffix is accepted). At most 64 entries; an empty list is rejected (omit the field instead). Cannot be combined with allowed_domains.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


29
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 29

optional :blocked_domains, Anthropic::Internal::Type::ArrayOf[String]

#enabled ⇒ Boolean?

Whether this tool is enabled and available to Claude. Overrides the default_config setting.

Parameters:

Returns:



36
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 36

optional :enabled, Anthropic::Internal::Type::Boolean, nil?: true

#name ⇒ Symbol, :web_search

Must be "web_search".

Parameters:

  • value (:web_search)

Returns:

  • (Symbol, :web_search)


11
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 11

required :name, const: :web_search

#permission_policy ⇒ Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, ...

Permission policy for this tool. Controls whether tool calls are auto-approved or require confirmation.

Parameters:

  • value (Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::permission_policy, nil)

Returns:



43
44
45
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 43

optional :permission_policy,
union: -> { Anthropic::Beta::BetaManagedAgentsWebSearchToolConfigParams::PermissionPolicy },
nil?: true

#type ⇒ Symbol, ...

Parameters:

  • (Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::type_)

Returns:



50
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 50

optional :type, enum: -> { Anthropic::Beta::BetaManagedAgentsWebSearchToolConfigParams::Type }

#user_location ⇒ Anthropic::Models::Beta::BetaManagedAgentsUserLocation?

Approximate user location for search result localization.

Parameters:

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

Returns:



56
# File 'lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb', line 56

optional :user_location, -> { Anthropic::Beta::BetaManagedAgentsUserLocation }, nil?: true

Instance Method Details

#to_hash ⇒ { name: :web_search, allowed_domains: ::Array[String], blocked_domains: ::Array[String], enabled: bool?, permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::permission_policy?, type: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::type_, user_location: Anthropic::Beta::BetaManagedAgentsUserLocation? }

Returns:

  • ({ name: :web_search, allowed_domains: ::Array[String], blocked_domains: ::Array[String], enabled: bool?, permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::permission_policy?, type: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::type_, user_location: Anthropic::Beta::BetaManagedAgentsUserLocation? })


50
51
52
53
54
55
56
57
58
# File 'sig/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rbs', line 50

def to_hash: -> {
  name: :web_search,
  allowed_domains: ::Array[String],
  blocked_domains: ::Array[String],
  enabled: bool?,
  permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::permission_policy?,
  type: Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams::type_,
  user_location: Anthropic::Beta::BetaManagedAgentsUserLocation?
}