Class: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb,
sig/anthropic/models/beta/beta_managed_agents_web_fetch_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, max_content_tokens: nil, permission_policy: nil, type: nil, url_sources: nil, name: :web_fetch) ⇒ BetaManagedAgentsWebFetchToolConfigParams

Configuration override for the web_fetch tool.

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

Parameters:

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

    Only fetch URLs whose host is one of these domains or a subdomain of one. Each e

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

    Never fetch URLs whose host is one of these domains or a subdomain of one. Each

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

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

  • max_content_tokens (Integer, nil) (defaults to: nil) —

    Maximum number of tokens of fetched text content to include in context per call.

  • 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::BetaManagedAgentsWebFetchToolConfigParams::Type) (defaults to: nil)
  • url_sources (Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourcesParams, nil) (defaults to: nil) —

    Which sources contribute URLs the tool may fetch. Omit to allow every source.

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

    Must be "web_fetch".

  • allowed_domains: (::Array[String]) (defaults to: nil)
  • blocked_domains: (::Array[String]) (defaults to: nil)
  • enabled: (Boolean, nil) (defaults to: nil)
  • max_content_tokens: (Integer, nil) (defaults to: nil)
  • permission_policy: (Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::permission_policy, nil) (defaults to: nil)
  • type: (Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::type_) (defaults to: nil)
  • url_sources: (Anthropic::Beta::BetaManagedAgentsWebFetchURLSourcesParams, nil) (defaults to: nil)
  • name: (:web_fetch) (defaults to: :web_fetch)


# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb', line 65

Instance Attribute Details

#allowed_domains ⇒ Array<String>?

Only fetch URLs whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "docs.example.com" (no scheme, port, or path). 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_fetch_tool_config_params.rb', line 20

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

#blocked_domains ⇒ Array<String>?

Never fetch URLs whose host is one of these domains or a subdomain of one. Each entry is a plain hostname like "ads.example.com" (no scheme, port, or path). 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_fetch_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_fetch_tool_config_params.rb', line 36

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

#max_content_tokens ⇒ Integer?

Maximum number of tokens of fetched text content to include in context per call. Does not apply to binary content such as PDFs.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


43
# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb', line 43

optional :max_content_tokens, Integer, nil?: true

#name ⇒ Symbol, :web_fetch

Must be "web_fetch".

Parameters:

  • value (:web_fetch)

Returns:

  • (Symbol, :web_fetch)


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

required :name, const: :web_fetch

#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::BetaManagedAgentsWebFetchToolConfigParams::permission_policy, nil)

Returns:



50
51
52
# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb', line 50

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

#type ⇒ Symbol, ...

Parameters:

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

Returns:



57
# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb', line 57

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

#url_sources ⇒ Anthropic::Models::Beta::BetaManagedAgentsWebFetchURLSourcesParams?

Which sources contribute URLs the tool may fetch. Omit to allow every source.

Parameters:

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

Returns:



63
# File 'lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb', line 63

optional :url_sources, -> { Anthropic::Beta::BetaManagedAgentsWebFetchURLSourcesParams }, nil?: true

Instance Method Details

#to_hash ⇒ { name: :web_fetch, allowed_domains: ::Array[String], blocked_domains: ::Array[String], enabled: bool?, max_content_tokens: Integer?, permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::permission_policy?, type: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::type_, url_sources: Anthropic::Beta::BetaManagedAgentsWebFetchURLSourcesParams? }

Returns:

  • ({ name: :web_fetch, allowed_domains: ::Array[String], blocked_domains: ::Array[String], enabled: bool?, max_content_tokens: Integer?, permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::permission_policy?, type: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::type_, url_sources: Anthropic::Beta::BetaManagedAgentsWebFetchURLSourcesParams? })


54
55
56
57
58
59
60
61
62
63
# File 'sig/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rbs', line 54

def to_hash: -> {
  name: :web_fetch,
  allowed_domains: ::Array[String],
  blocked_domains: ::Array[String],
  enabled: bool?,
  max_content_tokens: Integer?,
  permission_policy: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::permission_policy?,
  type: Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams::type_,
  url_sources: Anthropic::Beta::BetaManagedAgentsWebFetchURLSourcesParams?
}