Anthropic::WebFetchTool
Inherits JSON::Serializable < Anthropic::ServerTool < JSON::Serializable < Struct < Value < Object
Web fetch tool - allows Claude to fetch and read web pages
A server-side tool that enables Claude to retrieve content from URLs.
message = client.messages.create(
model: Anthropic::Model::CLAUDE_SONNET_4_6,
max_tokens: 4096,
server_tools: [Anthropic::WebFetchTool.new],
messages: [{role: "user", content: "Read the content at https://example.com"}]
)
Constructors
new(pull : JSON::PullParser)
Web fetch tool - allows Claude to fetch and read web pages
A server-side tool that enables Claude to retrieve content from URLs.
message = client.messages.create(
model: Anthropic::Model::CLAUDE_SONNET_4_6,
max_tokens: 4096,
server_tools: [Anthropic::WebFetchTool.new],
messages: [{role: "user", content: "Read the content at https://example.com"}]
)
new(allowed_callers : Array(String) | Nil = nil, cache_control : CacheControl | Nil = nil, defer_loading : Bool | Nil = nil, strict : Bool | Nil = nil, max_uses : Int32 | Nil = nil, allowed_domains : Array(String) | Nil = nil, blocked_domains : Array(String) | Nil = nil, max_content_tokens : Int32 | Nil = nil, citations : CitationConfig | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
allowed_callers
Sourcecache_control
Sourcedefer_loading
Sourcename
Sourcestrict
Sourcetype
Source