Class BetaWebFetchTool20250910
-
- All Implemented Interfaces:
public final class BetaWebFetchTool20250910
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaWebFetchTool20250910.BuilderA builder for BetaWebFetchTool20250910.
public final classBetaWebFetchTool20250910.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_20250910")final Optional<List<BetaWebFetchTool20250910.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<BetaCacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<BetaCitationsConfigParam>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<BetaWebFetchTool20250910.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<BetaCacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<BetaCitationsConfigParam>_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 BetaWebFetchTool20250910.BuildertoBuilder()final BetaWebFetchTool20250910validate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaWebFetchTool20250910.Builderbuilder()Returns a mutable builder for constructing an instance of BetaWebFetchTool20250910. -
-
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_20250910")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
allowedCallers
final Optional<List<BetaWebFetchTool20250910.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<BetaCacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
citations
final Optional<BetaCitationsConfigParam> 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<BetaWebFetchTool20250910.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<BetaCacheControlEphemeral> _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<BetaCitationsConfigParam> _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 BetaWebFetchTool20250910.Builder toBuilder()
-
validate
final BetaWebFetchTool20250910 validate()
-
builder
final static BetaWebFetchTool20250910.Builder builder()
Returns a mutable builder for constructing an instance of BetaWebFetchTool20250910.
-
-
-
-