# Tool

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

Annotates a function to be exposed as an executable tool by the Google ADK Kotlin. KSP will generate a corresponding com.google.adk.kt.tools.FunctionTool wrapper for annotated functions.

Note: this annotation shares its simple name with com.google.adk.kt.types.Tool, the GenAI tool definition data class. Files that need to reference both should use an import alias.

## Properties

description
Link copied to clipboard
val description: String

An optional explicit description. If not provided, the KDoc summary is used.

isLongRunning
Link copied to clipboard
val isLongRunning: Boolean = false

If true, indicates the tool returns a Pending state and resumes later.

name
Link copied to clipboard
val name: String

An optional explicit name for the tool. If not provided, the function name is used.

requireConfirmation
Link copied to clipboard
val requireConfirmation: Boolean = false

If true, the tool execution requires user confirmation.