docs(core): plugin tool context updates

This commit is contained in:
adamelmore
2026-01-27 06:29:14 -06:00
parent c9b5b00daf
commit f7c2012516
2 changed files with 9 additions and 5 deletions
+3 -2
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})`
},
}),
},