tool rework
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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!",
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user