Class WebFetchTool20260209
-
- All Implemented Interfaces:
public final class WebFetchTool20260209
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classWebFetchTool20260209.BuilderA builder for WebFetchTool20260209.
public final classWebFetchTool20260209.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_20260209")final Optional<List<WebFetchTool20260209.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 JsonField<List<WebFetchTool20260209.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 Map<String, JsonValue>_additionalProperties()final WebFetchTool20260209.BuildertoBuilder()final WebFetchTool20260209validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebFetchTool20260209.Builderbuilder()Returns a mutable builder for constructing an instance of WebFetchTool20260209. -
-
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_20260209")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<WebFetchTool20260209.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
-
_allowedCallers
final JsonField<List<WebFetchTool20260209.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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final WebFetchTool20260209.Builder toBuilder()
-
validate
final WebFetchTool20260209 validate()
-
builder
final static WebFetchTool20260209.Builder builder()
Returns a mutable builder for constructing an instance of WebFetchTool20260209.
-
-
-
-