web_search_tool_20250305_param.py — anthropic-sdk-python Source File
Architecture documentation for web_search_tool_20250305_param.py, a python file in the anthropic-sdk-python codebase. 5 imports, 3 dependents.
Entity Profile
Dependency Diagram
graph LR 1803970f_f89e_9dee_2cec_267d05b0b743["web_search_tool_20250305_param.py"] c200b525_3039_1d0b_d858_f0f2859bd98e["_types"] 1803970f_f89e_9dee_2cec_267d05b0b743 --> c200b525_3039_1d0b_d858_f0f2859bd98e 7b6a56f6_ac0b_b2be_9a30_e7e1bb30529a["cache_control_ephemeral_param.py"] 1803970f_f89e_9dee_2cec_267d05b0b743 --> 7b6a56f6_ac0b_b2be_9a30_e7e1bb30529a f1f58cbf_75c8_98cd_2b10_51b503d83961["CacheControlEphemeralParam"] 1803970f_f89e_9dee_2cec_267d05b0b743 --> f1f58cbf_75c8_98cd_2b10_51b503d83961 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875["typing"] 1803970f_f89e_9dee_2cec_267d05b0b743 --> 89ddcdd7_3ae1_4c7b_41bb_9f1e25f16875 37c05070_ca59_d596_7250_de9d1939227f["typing_extensions"] 1803970f_f89e_9dee_2cec_267d05b0b743 --> 37c05070_ca59_d596_7250_de9d1939227f 2eb1aa7f_c778_4d68_0a26_a102fadd9638["__init__.py"] 2eb1aa7f_c778_4d68_0a26_a102fadd9638 --> 1803970f_f89e_9dee_2cec_267d05b0b743 297c2067_cd78_c65b_b9eb_ee1696eac623["message_count_tokens_tool_param.py"] 297c2067_cd78_c65b_b9eb_ee1696eac623 --> 1803970f_f89e_9dee_2cec_267d05b0b743 454d11cb_0b86_9e73_f884_ace481771106["tool_union_param.py"] 454d11cb_0b86_9e73_f884_ace481771106 --> 1803970f_f89e_9dee_2cec_267d05b0b743 style 1803970f_f89e_9dee_2cec_267d05b0b743 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
from typing import Optional
from typing_extensions import Literal, Required, TypedDict
from .._types import SequenceNotStr
from .cache_control_ephemeral_param import CacheControlEphemeralParam
__all__ = ["WebSearchTool20250305Param", "UserLocation"]
class UserLocation(TypedDict, total=False):
"""Parameters for the user's location.
Used to provide more relevant search results.
"""
type: Required[Literal["approximate"]]
city: Optional[str]
"""The city of the user."""
country: Optional[str]
"""
The two letter
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
user.
"""
region: Optional[str]
"""The region of the user."""
timezone: Optional[str]
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""
class WebSearchTool20250305Param(TypedDict, total=False):
name: Required[Literal["web_search"]]
"""Name of the tool.
This is how the tool will be called by the model and in `tool_use` blocks.
"""
type: Required[Literal["web_search_20250305"]]
allowed_domains: Optional[SequenceNotStr[str]]
"""If provided, only these domains will be included in results.
Cannot be used alongside `blocked_domains`.
"""
blocked_domains: Optional[SequenceNotStr[str]]
"""If provided, these domains will never appear in results.
Cannot be used alongside `allowed_domains`.
"""
cache_control: Optional[CacheControlEphemeralParam]
"""Create a cache control breakpoint at this content block."""
max_uses: Optional[int]
"""Maximum number of times the tool can be used in the API request."""
strict: bool
"""When true, guarantees schema validation on tool names and inputs"""
user_location: Optional[UserLocation]
"""Parameters for the user's location.
Used to provide more relevant search results.
"""
Domain
Dependencies
- CacheControlEphemeralParam
- _types
- cache_control_ephemeral_param.py
- typing
- typing_extensions
Imported By
Source
Frequently Asked Questions
What does web_search_tool_20250305_param.py do?
web_search_tool_20250305_param.py is a source file in the anthropic-sdk-python codebase, written in python. It belongs to the AnthropicClient domain.
What does web_search_tool_20250305_param.py depend on?
web_search_tool_20250305_param.py imports 5 module(s): CacheControlEphemeralParam, _types, cache_control_ephemeral_param.py, typing, typing_extensions.
What files import web_search_tool_20250305_param.py?
web_search_tool_20250305_param.py is imported by 3 file(s): __init__.py, message_count_tokens_tool_param.py, tool_union_param.py.
Where is web_search_tool_20250305_param.py in the architecture?
web_search_tool_20250305_param.py is located at src/anthropic/types/web_search_tool_20250305_param.py (domain: AnthropicClient, directory: src/anthropic/types).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free