From 1608565c808c9136bdc6930a356649bd9824cc69 Mon Sep 17 00:00:00 2001 From: Spoon <212802214+spoons-and-mirrors@users.noreply.github.com> Date: Fri, 13 Feb 2026 05:52:17 +0100 Subject: feat(hook): add tool.definition hook for plugins to modify tool description and parameters (#4956) --- packages/plugin/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/plugin/src') diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 664f2c967..bd4ba5304 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -224,4 +224,8 @@ export interface Hooks { input: { sessionID: string; messageID: string; partID: string }, output: { text: string }, ) => Promise + /** + * Modify tool definitions (description and parameters) sent to LLM + */ + "tool.definition"?: (input: { toolID: string }, output: { description: string; parameters: any }) => Promise } -- cgit v1.2.3