src / toolsProvider.ts
import { text, tool, type ToolsProviderController } from "@lmstudio/sdk";
import { z } from "zod";
export async function toolsProvider(ctl: ToolsProviderController) {
const rollDiceTool = tool({
name: "tell_time",
description: text`
Get current time.
`,
parameters: {
},
implementation: async ({}) => {
const now = new Date();
return now.toLocaleString();
},
});
return [rollDiceTool];
}