From 8d3fec08e59b100da036b685d20b080203ba3a4c Mon Sep 17 00:00:00 2001 From: moon jooho Date: Fri, 4 Jul 2025 09:13:02 +0900 Subject: Add and improve JSDoc comments for core tool methods (#3128) --- packages/core/src/tools/web-search.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'packages/core/src/tools/web-search.ts') diff --git a/packages/core/src/tools/web-search.ts b/packages/core/src/tools/web-search.ts index c4dcc54a..5ee8e85c 100644 --- a/packages/core/src/tools/web-search.ts +++ b/packages/core/src/tools/web-search.ts @@ -81,7 +81,12 @@ export class WebSearchTool extends BaseTool< ); } - validateParams(params: WebSearchToolParams): string | null { + /** + * Validates the parameters for the WebSearchTool. + * @param params The parameters to validate + * @returns An error message string if validation fails, null if valid + */ + validateToolParams(params: WebSearchToolParams): string | null { if ( this.schema.parameters && !SchemaValidator.validate( @@ -105,7 +110,7 @@ export class WebSearchTool extends BaseTool< params: WebSearchToolParams, signal: AbortSignal, ): Promise { - const validationError = this.validateParams(params); + const validationError = this.validateToolParams(params); if (validationError) { return { llmContent: `Error: Invalid parameters provided. Reason: ${validationError}`, -- cgit v1.2.3