ADK TypeScript Documentation - v0.0.4
    Preparing search index...

    Class GoogleSearch

    Simple GoogleSearch tool implementation

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    baseRetryDelay: number = 1000

    Base delay for retry in ms (will be used with exponential backoff)

    description: string

    Description of the tool

    isLongRunning: boolean

    Whether the tool is a long running operation

    maxRetryAttempts: number

    Maximum retry attempts

    maxRetryDelay: number = 10000

    Maximum delay for retry in ms

    name: string

    Name of the tool

    shouldRetryOnFailure: boolean

    Whether the tool execution should be retried on failure

    Methods

    • Execute the search This is a simplified implementation that doesn't actually search, just returns mock results

      Parameters

      • args: { num_results?: number; query: string }
      • _context: ToolContext

      Returns Promise<any>

    • Executes the tool with error handling and retries

      Parameters

      • args: Record<string, any>

        Arguments for the tool

      • context: ToolContext

        Tool execution context

      Returns Promise<any>

      Result of the tool execution or error information

    • Validates the arguments against the schema in the function declaration

      Parameters

      • args: Record<string, any>

        Arguments to validate

      Returns boolean

      True if arguments are valid