返回 CodeWhale
tools.mjs
1 // First entry of a two-entry plugin: a tool.
2 export const name = 'two-entries-tools'
3 export const inject = ['tools']
4
5 export function apply(ctx) {
6 ctx.tools.register({
7 name: 'two_first',
8 description: 'A tool from the first entry.',
9 parameters: { type: 'object', properties: {} },
10 execute: () => 'first',
11 })
12 }
13
13 lines Plain Text