CurrentDateTimeTool

class CurrentDateTimeTool(clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault()) : LlmTool

Returns the current date / time in the host time zone.

Output is a small JSON object: { "iso_datetime": "...", "epoch_millis": N, "timezone": "..." }.

Parameters

clock

Clock source. Override in tests for determinism.

timeZone

Time zone for the formatted output. Defaults to the system TZ.

Constructors

Link copied to clipboard
constructor(clock: Clock = Clock.System, timeZone: TimeZone = TimeZone.currentSystemDefault())

Properties

Link copied to clipboard
Link copied to clipboard
open override val descriptor: ToolDescriptor
Link copied to clipboard
open val name: String

Functions

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