Package org.machanism.machai.ai.tools
Annotation Type Tool
Annotation to mark a method as a tool function within the AI provider framework.
Methods annotated with @Tool are recognized as callable tools, typically exposed
for dynamic invocation or registration in tool catalogs. The annotation provides metadata
such as the tool's name and description.
- name: Optional tool name. If not specified,
NOT_DEFINEDis used as a placeholder. - description: Required description of the tool's purpose and functionality.
The annotation is retained at runtime and applicable to methods only.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDescription of the tool's purpose and functionality. -
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPlaceholder value indicating that the tool name is not defined.
-
Field Details
-
NOT_DEFINED
Placeholder value indicating that the tool name is not defined.- See Also:
-
-
Element Details
-
name
String nameOptional tool name. If not specified,NOT_DEFINEDis used.- Returns:
- the name of the tool, or
NOT_DEFINEDif not set
- Default:
"___NOT_DEFINED___"
-
description
String descriptionDescription of the tool's purpose and functionality.- Returns:
- the tool description
-