From bf7aacb1a7b31f73cd7bba2f365e4494724a5eee Mon Sep 17 00:00:00 2001 From: L_DelOff Date: Tue, 30 Dec 2025 14:49:34 +0300 Subject: [PATCH] =?UTF-8?q?=D1=82=D1=83=D0=BB=D0=B7=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../currenttime/tool/CurrentTimeTool.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tool/current-time/src/main/java/ru/ldeloff/currenttime/tool/CurrentTimeTool.java diff --git a/tool/current-time/src/main/java/ru/ldeloff/currenttime/tool/CurrentTimeTool.java b/tool/current-time/src/main/java/ru/ldeloff/currenttime/tool/CurrentTimeTool.java new file mode 100644 index 0000000..e747fcc --- /dev/null +++ b/tool/current-time/src/main/java/ru/ldeloff/currenttime/tool/CurrentTimeTool.java @@ -0,0 +1,18 @@ +package ru.ldeloff.currenttime.tool; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.tool.annotation.Tool; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; + +@Slf4j +@Component +public class CurrentTimeTool { + + @Tool(description = "Get the current date in the ISO-8601 format yyyy-MM-dd HH:MM:ss") + String getCurrentDate() { + log.info("Getting current datetime: {}", LocalDateTime.now()); + return LocalDateTime.now().toString(); + } +} \ No newline at end of file