docs(core): plugin tool context updates

This commit is contained in:
adamelmore
2026-01-27 06:29:14 -06:00
parent 095328faf4
commit b4e0cdbe8e
2 changed files with 9 additions and 5 deletions

View File

@@ -269,8 +269,9 @@ export const CustomToolsPlugin: Plugin = async (ctx) => {
args: {
foo: tool.schema.string(),
},
async execute(args, ctx) {
return `Hello ${args.foo}!`
async execute(args, context) {
const { directory, worktree } = context
return `Hello ${args.foo} from ${directory} (worktree: ${worktree})`
},
}),
},