LlmTool

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class LlmTool(val name: String = "", val description: String, val returnDirect: Boolean = false)

Marks a method as a tool that can be invoked by an LLM. Use with com.embabel.agent.api.tool.Tool.Companion.fromInstance or com.embabel.agent.api.tool.Tool.Companion.fromMethod to create Tool instances.

Types

Link copied to clipboard
annotation class Param(val description: String, val required: Boolean = true)

Describes a tool parameter. Apply to method parameters.

Properties

Link copied to clipboard

Description of what the tool does. Used by LLM to decide when to call it.

Link copied to clipboard

Tool name. Defaults to method name if empty.

Link copied to clipboard
val returnDirect: Boolean = false

Whether to return the result directly without further LLM processing.