diff options
| author | Olcan <[email protected]> | 2025-04-27 10:25:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-27 10:25:12 -0700 |
| commit | 9de2e82b8f9547149d5940dd2c65ea2a6458db3f (patch) | |
| tree | ef8edf230d4e0d11fd6ddea69e5847d131b076cb /packages/server/src/tools/tools.ts | |
| parent | 7828e813a81778d9eda1942af9c9eedf09e56f4e (diff) | |
don't confirm invalid params in terminal tool, or in general (added comments to base class) (#187)
Diffstat (limited to 'packages/server/src/tools/tools.ts')
| -rw-r--r-- | packages/server/src/tools/tools.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/server/src/tools/tools.ts b/packages/server/src/tools/tools.ts index 448ea206..57a388d8 100644 --- a/packages/server/src/tools/tools.ts +++ b/packages/server/src/tools/tools.ts @@ -36,6 +36,8 @@ export interface Tool< /** * Validates the parameters for the tool + * Should be called from both `shouldConfirmExecute` and `execute` + * `shouldConfirmExecute` should return false immediately if invalid * @param params Parameters to validate * @returns An error message string if invalid, null otherwise */ @@ -102,6 +104,8 @@ export abstract class BaseTool< /** * Validates the parameters for the tool * This is a placeholder implementation and should be overridden + * Should be called from both `shouldConfirmExecute` and `execute` + * `shouldConfirmExecute` should return false immediately if invalid * @param params Parameters to validate * @returns An error message string if invalid, null otherwise */ |
