mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
20 lines
417 B
TypeScript
20 lines
417 B
TypeScript
import { z } from "zod"
|
|
import { Tool } from "./tool"
|
|
|
|
export const ExampleTool = Tool.define({
|
|
id: "opencode.example",
|
|
description: "Example tool",
|
|
parameters: z.object({
|
|
foo: z.string().describe("The foo parameter"),
|
|
bar: z.number().describe("The bar parameter"),
|
|
}),
|
|
async execute(params) {
|
|
return {
|
|
metadata: {
|
|
lol: "hey",
|
|
},
|
|
output: "Hello, world!",
|
|
}
|
|
},
|
|
})
|