src / tools / getCurrentTime.ts
import { tool } from "@lmstudio/sdk";
import { formatCurrentDateTimeContext } from "../utils/DateTimeFormatter";
/**
* Creates the get_current_time tool instance.
* Mapped from DateTimeFormatter utility to return the user's current local date/time.
*/
export function createGetCurrentTimeTool() {
return tool({
name: "Get Current Time",
description: "Returns the user's current local date and time with timezone.",
parameters: {},
implementation: async () => {
return formatCurrentDateTimeContext();
},
});
}
export const getCurrentTimeTool = createGetCurrentTimeTool();
src / tools / getCurrentTime.ts
import { tool } from "@lmstudio/sdk";
import { formatCurrentDateTimeContext } from "../utils/DateTimeFormatter";
/**
* Creates the get_current_time tool instance.
* Mapped from DateTimeFormatter utility to return the user's current local date/time.
*/
export function createGetCurrentTimeTool() {
return tool({
name: "Get Current Time",
description: "Returns the user's current local date and time with timezone.",
parameters: {},
implementation: async () => {
return formatCurrentDateTimeContext();
},
});
}
export const getCurrentTimeTool = createGetCurrentTimeTool();