diff options
| author | Jaana Dogan <[email protected]> | 2025-04-21 13:29:36 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-21 13:29:36 -0700 |
| commit | ddaa21c750dd47a5e9cd488375b249ac3a72a9d5 (patch) | |
| tree | 43c3bbfe3797d4893ecfb56e82cfc94c28004ce0 | |
| parent | d4614619b4ab2183004ad2b2e140cdf6960908e7 (diff) | |
Remove dead methods from ToolRegistry (#91)
* getToolSchemas is deprecated.
* listAvailableTools is now getAllTools.
| -rw-r--r-- | packages/server/src/tools/tool-registry.ts | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/packages/server/src/tools/tool-registry.ts b/packages/server/src/tools/tool-registry.ts index 387a7d29..9ae41802 100644 --- a/packages/server/src/tools/tool-registry.ts +++ b/packages/server/src/tools/tool-registry.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ToolListUnion, FunctionDeclaration } from '@google/genai'; +import { FunctionDeclaration } from '@google/genai'; import { Tool } from './tools.js'; export class ToolRegistry { @@ -38,18 +38,6 @@ export class ToolRegistry { } /** - * Deprecated/Internal? Retrieves schemas in the ToolListUnion format. - * Kept for reference, prefer getFunctionDeclarations. - */ - getToolSchemas(): ToolListUnion { - const declarations = this.getFunctionDeclarations(); - if (declarations.length === 0) { - return []; - } - return [{ functionDeclarations: declarations }]; - } - - /** * Returns an array of all registered tool instances. */ getAllTools(): Tool[] { @@ -57,13 +45,6 @@ export class ToolRegistry { } /** - * Optional: Get a list of registered tool names. - */ - listAvailableTools(): string[] { - return Array.from(this.tools.keys()); - } - - /** * Get the definition of a specific tool. */ getTool(name: string): Tool | undefined { |
