Returns a TOOL object for Claude's builtin web_search tool. The default tool
version is web_search_20260318, which adds the response_inclusion control
on top of the dynamic result filtering introduced in web_search_20260209.
claude_websearch(
.max_uses = NULL,
.allowed_domains = NULL,
.blocked_domains = NULL,
.allowed_callers = "direct",
.response_inclusion = NULL,
.version = "web_search_20260318"
)Integer; maximum number of searches the model may run per request.
Character vector of domains to restrict search results to.
Character vector of domains to exclude from search results.
Character vector of callers allowed to invoke the tool;
"direct" (default) or "code_execution_20260120". Pass NULL to let the API
apply its own default. Ignored for "web_search_20250305", which has no such field.
Character; "full" or "excluded", controlling whether
search results enter the model context. Requires web_search_20260318 or newer.
Character; the Anthropic web search tool version (default: "web_search_20260318").
From web_search_20260209 onwards the API defaults allowed_callers to the
code execution tool, which only models with programmatic tool calling support.
tidyllm therefore sends allowed_callers = "direct" by default, so web search
works on every model. Pass .allowed_callers = "code_execution_20260120" to
opt into the dynamic filtering path on Sonnet 4.6, Opus 4.6 or newer.