Package org.wildfly.mcp.api
Annotation Interface Tool
Annotates a business method of a CDI bean as an exposed tool.
The result of a "tool call" operation is always represented as a ToolResponse. However, the annotated method can also
return other types that are converted according to the following rules.
- If the method returns
Stringthen the reponse issuccessand contains the singleTextContentobject. - If the method returns an implementation of
Contentthen the reponse issuccessand contains the single content object. - If the method returns a
ListofContentimplementations orStrings then the reponse issuccessand contains the list of relevant content objects. - The method may return a
Unithat wraps any of the type mentioned above.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionAn optional description.Each tool must have a unique name. -
Field Summary
Fields
-
Field Details
-
ELEMENT_NAME
Constant value forname()indicating that the annotated element's name should be used as-is.- See Also:
-
-
Element Details