[ ABORT TO HUD ]
SEQ. 1
Native Search Integration
First-Party Web Search Tool
Anthropic provides a built-in Web Search Tool (web_search_20250305) that allows Claude to search the public internet dynamically when responding to queries requiring real-time information.
API Configuration
const response = await anthropic.messages.create({
model: "claude-3-7-sonnet-20250219",
max_tokens: 4096,
tools: [{
type: "web_search_20250305",
name: "web_search",
max_uses: 5,
allowed_domains: ["docs.anthropic.com", "github.com"]
}],
messages: [{ role: "user", content: "What are the latest Claude 3.7 Sonnet features?" }]
});
Domain Governance
Enterprise applications can constrain the search space using allowed_domains (allowlist) and blocked_domains (denylist) to ensure content is retrieved only from verified knowledge sources.
⌨ HANDS-ON LABGive Claude Live Web Access
⭐ +200 XPYour model's knowledge has a cutoff - the news doesn't. Enable the server-side web_search tool with curl, then lock it down to a single trusted domain.
1Call /v1/messages with the web_search tool in the tools array.
2Re-run the request restricted to a single trusted domain with allowed_domains.
OBJECTIVE 1 / 2 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 2
How is the built-in web search tool enabled in the Messages API?
By passing an external MCP URL
By adding the built-in tool object with type web_search_20250305 to the tools array
By adding 'search: true' to the system prompt
By setting temperature to 0