Class ToolConfiguration
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ToolConfiguration.Builder,ToolConfiguration>
Configuration settings for a tool used by AI Agents.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal AnnotationAnnotations for the tool configuration.static ToolConfiguration.Builderbuilder()final StringThe description of the tool configuration.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final booleanFor responses, this returns true if the service returned a value for the OutputFilters property.final booleanFor responses, this returns true if the service returned a value for the OverrideInputValues property.final DocumentThe input schema for the tool configuration.final ToolInstructionInstructions for using the tool.final List<ToolOutputFilter> Output filters applies to the tool result.final DocumentThe output schema for the tool configuration.final List<ToolOverrideInputValue> Override input values for the tool configuration.static Class<? extends ToolConfiguration.Builder> final Stringtitle()The title of the tool configuration.Take this object and create a builder that contains all of the current property values of this object.final StringtoolId()The identifier of the tool, for example toolName from Model Context Provider server.final StringtoolName()The name of the tool.final ToolTypetoolType()The type of the tool.final StringThe type of the tool.final StringtoString()Returns a string representation of this object.Configuration for user interaction with the tool.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
toolName
-
toolType
The type of the tool.
If the service returns an enum value that is not available in the current SDK version,
toolTypewill returnToolType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtoolTypeAsString().- Returns:
- The type of the tool.
- See Also:
-
toolTypeAsString
The type of the tool.
If the service returns an enum value that is not available in the current SDK version,
toolTypewill returnToolType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromtoolTypeAsString().- Returns:
- The type of the tool.
- See Also:
-
title
The title of the tool configuration.
- Returns:
- The title of the tool configuration.
-
toolId
The identifier of the tool, for example toolName from Model Context Provider server.
- Returns:
- The identifier of the tool, for example toolName from Model Context Provider server.
-
description
The description of the tool configuration.
- Returns:
- The description of the tool configuration.
-
instruction
Instructions for using the tool.
- Returns:
- Instructions for using the tool.
-
hasOverrideInputValues
public final boolean hasOverrideInputValues()For responses, this returns true if the service returned a value for the OverrideInputValues property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
overrideInputValues
Override input values for the tool configuration.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOverrideInputValues()method.- Returns:
- Override input values for the tool configuration.
-
hasOutputFilters
public final boolean hasOutputFilters()For responses, this returns true if the service returned a value for the OutputFilters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
outputFilters
Output filters applies to the tool result.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOutputFilters()method.- Returns:
- Output filters applies to the tool result.
-
inputSchema
The input schema for the tool configuration.
- Returns:
- The input schema for the tool configuration.
-
outputSchema
The output schema for the tool configuration.
- Returns:
- The output schema for the tool configuration.
-
annotations
Annotations for the tool configuration.
- Returns:
- Annotations for the tool configuration.
-
userInteractionConfiguration
Configuration for user interaction with the tool.
- Returns:
- Configuration for user interaction with the tool.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<ToolConfiguration.Builder,ToolConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-