summaryrefslogtreecommitdiff
path: root/packages/core/src/tools/tools.ts
diff options
context:
space:
mode:
authorWanlin Du <[email protected]>2025-08-11 16:12:41 -0700
committerGitHub <[email protected]>2025-08-11 23:12:41 +0000
commitd9fb08c9da3d2e8c501ec9badb2e2bd79eb15b93 (patch)
tree7d07e1586b736c1b6c44e28828aa29205af335ac /packages/core/src/tools/tools.ts
parentf52d073dfbfa4d5091a74bf33ac1c66e51265247 (diff)
feat: migrate tools to use parametersJsonSchema. (#5330)
Diffstat (limited to 'packages/core/src/tools/tools.ts')
-rw-r--r--packages/core/src/tools/tools.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/core/src/tools/tools.ts b/packages/core/src/tools/tools.ts
index 8e064973..4b13174c 100644
--- a/packages/core/src/tools/tools.ts
+++ b/packages/core/src/tools/tools.ts
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import { FunctionDeclaration, PartListUnion, Schema } from '@google/genai';
+import { FunctionDeclaration, PartListUnion } from '@google/genai';
import { ToolErrorType } from './tool-error.js';
import { DiffUpdateResult } from '../ide/ideContext.js';
@@ -186,7 +186,7 @@ export abstract class DeclarativeTool<
readonly displayName: string,
readonly description: string,
readonly icon: Icon,
- readonly parameterSchema: Schema,
+ readonly parameterSchema: unknown,
readonly isOutputMarkdown: boolean = true,
readonly canUpdateOutput: boolean = false,
) {}
@@ -195,7 +195,7 @@ export abstract class DeclarativeTool<
return {
name: this.name,
description: this.description,
- parameters: this.parameterSchema,
+ parametersJsonSchema: this.parameterSchema,
};
}
@@ -281,14 +281,14 @@ export abstract class BaseTool<
* @param description Description of what the tool does
* @param isOutputMarkdown Whether the tool's output should be rendered as markdown
* @param canUpdateOutput Whether the tool supports live (streaming) output
- * @param parameterSchema Open API 3.0 Schema defining the parameters
+ * @param parameterSchema JSON Schema defining the parameters
*/
constructor(
readonly name: string,
readonly displayName: string,
readonly description: string,
readonly icon: Icon,
- readonly parameterSchema: Schema,
+ readonly parameterSchema: unknown,
readonly isOutputMarkdown: boolean = true,
readonly canUpdateOutput: boolean = false,
) {