Class ToolAttributes
java.lang.Object
com.oracle.database.selectai.model.agent.ToolAttributes
Attributes used to create or update a Select AI Agent tool.
toolParams uses immutable ToolParams models, such as
SqlToolParams. toolInputs uses an immutable list of
ToolInput entries containing input names and descriptions.
The builder snapshots both when supplied, so later changes to caller-owned
collections cannot change the configuration or JSON sent to the database.
Additional tool parameters are preserved when loading database metadata;
unrecognized parameter schemas use GenericToolParams.
The database validates whether the attributes are semantically valid for the
selected tool type and database release.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolAttributes.Builderbuilder()Creates a builder for tool attributes.Returns the custom PL/SQL function or procedure name.Returns the tool instruction.Returns immutable tool input metadata in the supplied or database order.Returns typed built-in tool parameters, including additional database fields.Returns the built-in or database-defined tool type.Returns the raw database tool type value.toJson()Serializes attributes using the snake-case names expected byDBMS_CLOUD_AI_AGENT.
-
Method Details
-
getInstruction
Returns the tool instruction.- Returns:
- tool instruction, or
nullwhen unset - See Also:
-
getFunction
Returns the custom PL/SQL function or procedure name.- Returns:
- function or procedure name, or
nullwhen unset - See Also:
-
getToolType
Returns the built-in or database-defined tool type.The returned
ToolTypepreserves a value introduced by a newer database release, even when this SDK does not yet define a named constant for it.- Returns:
- tool type, or
nullwhen unset - See Also:
-
getToolTypeValue
Returns the raw database tool type value.- Returns:
- database tool type value, or
nullwhen unset - See Also:
-
getToolParams
Returns typed built-in tool parameters, including additional database fields. UseToolParams.toMap()for a complete immutable parameter map.- Returns:
- immutable tool parameters, or
nullwhen unset - See Also:
-
getToolInputs
Returns immutable tool input metadata in the supplied or database order.- Returns:
- immutable tool input metadata, or
nullwhen unset - See Also:
-
builder
Creates a builder for tool attributes.- Returns:
- mutable builder for tool attributes
- See Also:
-
toJson
Serializes attributes using the snake-case names expected byDBMS_CLOUD_AI_AGENT. Null attributes and unset input fields are omitted; explicit null values inside parameter maps are retained.- Returns:
- JSON object containing non-null attributes
- Throws:
IllegalStateException- when the attributes cannot be serialized- See Also:
-