(ctx)
| 2 | import { tool } from "./tool" |
| 3 | |
| 4 | export const ExamplePlugin: Plugin = async (ctx) => { |
| 5 | return { |
| 6 | tool: { |
| 7 | mytool: tool({ |
| 8 | description: "This is a custom tool", |
| 9 | args: { |
| 10 | foo: tool.schema.string().describe("foo"), |
| 11 | }, |
| 12 | async execute(args) { |
| 13 | return `Hello ${args.foo}!` |
| 14 | }, |
| 15 | }), |
| 16 | }, |
| 17 | } |
| 18 | } |