diff options
| author | Spoon <[email protected]> | 2026-02-13 05:52:17 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-12 22:52:17 -0600 |
| commit | 1608565c808c9136bdc6930a356649bd9824cc69 (patch) | |
| tree | 125ff9d5559fdf5686445a1c527da016ddefcb6e /packages/plugin/src | |
| parent | b06afd657d59c2c88394513e3b633060ec6f454b (diff) | |
| download | opencode-1608565c808c9136bdc6930a356649bd9824cc69.tar.gz opencode-1608565c808c9136bdc6930a356649bd9824cc69.zip | |
feat(hook): add tool.definition hook for plugins to modify tool description and parameters (#4956)
Diffstat (limited to 'packages/plugin/src')
| -rw-r--r-- | packages/plugin/src/index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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<void> + /** + * Modify tool definitions (description and parameters) sent to LLM + */ + "tool.definition"?: (input: { toolID: string }, output: { description: string; parameters: any }) => Promise<void> } |
