Interface: AnthropicWebSearchTool
@providerprotocol/ai / anthropic / AnthropicWebSearchTool
Interface: AnthropicWebSearchTool
Section titled “Interface: AnthropicWebSearchTool”Defined in: src/providers/anthropic/types.ts:869
Web search tool for real-time web information retrieval.
Enables Claude to search the web for up-to-date information. No beta header required - this is a GA feature.
Example
Section titled “Example”const tool: AnthropicWebSearchTool = { type: 'web_search_20250305', name: 'web_search', max_uses: 5, allowed_domains: ['wikipedia.org', 'github.com'],};Properties
Section titled “Properties”allowed_domains?
Section titled “allowed_domains?”
optionalallowed_domains:string[]
Defined in: src/providers/anthropic/types.ts:877
Whitelist domains (mutually exclusive with blocked_domains)
blocked_domains?
Section titled “blocked_domains?”
optionalblocked_domains:string[]
Defined in: src/providers/anthropic/types.ts:879
Blacklist domains (mutually exclusive with allowed_domains)
max_uses?
Section titled “max_uses?”
optionalmax_uses:number
Defined in: src/providers/anthropic/types.ts:875
Maximum searches per request (default: unlimited)
name:
"web_search"
Defined in: src/providers/anthropic/types.ts:873
Tool name - must be ‘web_search’
type:
"web_search_20250305"
Defined in: src/providers/anthropic/types.ts:871
Tool type identifier
user_location?
Section titled “user_location?”
optionaluser_location:AnthropicUserLocation
Defined in: src/providers/anthropic/types.ts:881
User location for localized results