LlmTool

interface LlmTool

A tool the LLM may call during a completion.

Implementations are suspend so I/O-bound tools can integrate cleanly with structured concurrency. Cancellation of the surrounding coroutine cancels the tool execution cooperatively — implementations should honour ensureActive() in long-running loops.

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val name: String

Functions

Link copied to clipboard
abstract suspend fun execute(arguments: JsonObject): String
Link copied to clipboard
open fun matches(toolName: String): Boolean