Class WebFetchTool20260309
-
- All Implemented Interfaces:
public final class WebFetchTool20260309Web fetch tool with use_cache parameter for bypassing cached content.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWebFetchTool20260309.BuilderA builder for WebFetchTool20260309.
public final classWebFetchTool20260309.AllowedCallerSpecifies who can invoke a tool.
Values: direct: The model can call this tool directly. code_execution_20250825: The tool can be called from the code execution environment (v1). code_execution_20260120: The tool can be called from the code execution environment (v2 with persistence).
-
Method Summary
Modifier and Type Method Description final JsonValue_name()Name of the tool. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("web_fetch_20260309")final Optional<List<WebFetchTool20260309.AllowedCaller>>allowedCallers()final Optional<List<String>>allowedDomains()List of domains to allow fetching from final Optional<List<String>>blockedDomains()List of domains to block fetching from final Optional<CacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<CitationsConfigParam>citations()Citations configuration for fetched documents. final Optional<Boolean>deferLoading()If true, tool will not be included in initial system prompt. final Optional<Long>maxContentTokens()Maximum number of tokens used by including web page text content in the context. final Optional<Long>maxUses()Maximum number of times the tool can be used in the API request. final Optional<Boolean>strict()When true, guarantees schema validation on tool names and inputs final Optional<Boolean>useCache()Whether to use cached content. final JsonField<List<WebFetchTool20260309.AllowedCaller>>_allowedCallers()Returns the raw JSON value of allowedCallers. final JsonField<List<String>>_allowedDomains()Returns the raw JSON value of allowedDomains. final JsonField<List<String>>_blockedDomains()Returns the raw JSON value of blockedDomains. final JsonField<CacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<CitationsConfigParam>_citations()Returns the raw JSON value of citations. final JsonField<Boolean>_deferLoading()Returns the raw JSON value of deferLoading. final JsonField<Long>_maxContentTokens()Returns the raw JSON value of maxContentTokens. final JsonField<Long>_maxUses()Returns the raw JSON value of maxUses. final JsonField<Boolean>_strict()Returns the raw JSON value of strict. final JsonField<Boolean>_useCache()Returns the raw JSON value of useCache. final Map<String, JsonValue>_additionalProperties()final WebFetchTool20260309.BuildertoBuilder()final WebFetchTool20260309validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebFetchTool20260309.Builderbuilder()Returns a mutable builder for constructing an instance of WebFetchTool20260309. -
-
Method Detail
-
_name
final JsonValue _name()
Name of the tool.
This is how the tool will be called by the model and in
tool_useblocks.Expected to always return the following:
JsonValue.from("web_fetch")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("web_fetch_20260309")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<WebFetchTool20260309.AllowedCaller>> allowedCallers()
-
allowedDomains
final Optional<List<String>> allowedDomains()
List of domains to allow fetching from
-
blockedDomains
final Optional<List<String>> blockedDomains()
List of domains to block fetching from
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
citations
final Optional<CitationsConfigParam> citations()
Citations configuration for fetched documents. Citations are disabled by default.
-
deferLoading
final Optional<Boolean> deferLoading()
If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
-
maxContentTokens
final Optional<Long> maxContentTokens()
Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.
-
maxUses
final Optional<Long> maxUses()
Maximum number of times the tool can be used in the API request.
-
strict
final Optional<Boolean> strict()
When true, guarantees schema validation on tool names and inputs
-
useCache
final Optional<Boolean> useCache()
Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.
-
_allowedCallers
final JsonField<List<WebFetchTool20260309.AllowedCaller>> _allowedCallers()
Returns the raw JSON value of allowedCallers.
Unlike allowedCallers, this method doesn't throw if the JSON field has an unexpected type.
-
_allowedDomains
final JsonField<List<String>> _allowedDomains()
Returns the raw JSON value of allowedDomains.
Unlike allowedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_blockedDomains
final JsonField<List<String>> _blockedDomains()
Returns the raw JSON value of blockedDomains.
Unlike blockedDomains, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_citations
final JsonField<CitationsConfigParam> _citations()
Returns the raw JSON value of citations.
Unlike citations, this method doesn't throw if the JSON field has an unexpected type.
-
_deferLoading
final JsonField<Boolean> _deferLoading()
Returns the raw JSON value of deferLoading.
Unlike deferLoading, this method doesn't throw if the JSON field has an unexpected type.
-
_maxContentTokens
final JsonField<Long> _maxContentTokens()
Returns the raw JSON value of maxContentTokens.
Unlike maxContentTokens, this method doesn't throw if the JSON field has an unexpected type.
-
_maxUses
final JsonField<Long> _maxUses()
Returns the raw JSON value of maxUses.
Unlike maxUses, this method doesn't throw if the JSON field has an unexpected type.
-
_strict
final JsonField<Boolean> _strict()
Returns the raw JSON value of strict.
Unlike strict, this method doesn't throw if the JSON field has an unexpected type.
-
_useCache
final JsonField<Boolean> _useCache()
Returns the raw JSON value of useCache.
Unlike useCache, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final WebFetchTool20260309.Builder toBuilder()
-
validate
final WebFetchTool20260309 validate()
-
builder
final static WebFetchTool20260309.Builder builder()
Returns a mutable builder for constructing an instance of WebFetchTool20260309.
-
-
-
-