# Class ExitLoopTool

Tool for exiting execution of a LoopAgent.

When called by an LLM agent inside a LoopAgent, this tool sets the `escalate` and `skipSummarization` flags on the event actions, causing the LoopAgent to stop iterating and exit the loop.

#### Hierarchy (View Summary)

- BaseTool
  - ExitLoopTool

- Defined in tools/exit_loop_tool.ts:20

## Constructors

### constructor

- new ExitLoopTool(): ExitLoopTool

  #### Returns ExitLoopTool

  Overrides BaseTool.constructor

  - Defined in tools/exit_loop_tool.ts:21

## Properties

### `Readonly`[BASE_TOOL_SIGNATURE_SYMBOL]

"[BASE_TOOL_SIGNATURE_SYMBOL]": true

A unique symbol to identify ADK base tool class.

Inherited from BaseTool.[BASE_TOOL_SIGNATURE_SYMBOL]

- Defined in tools/base_tool.ts:64

### `Readonly` description

description: string

Inherited from BaseTool.description

- Defined in tools/base_tool.ts:67

### `Readonly` isLongRunning

isLongRunning: boolean

Inherited from BaseTool.isLongRunning

- Defined in tools/base_tool.ts:68

### `Readonly` name

name: string

Inherited from BaseTool.name

- Defined in tools/base_tool.ts:66

## Accessors

### apiVariant

- get apiVariant(): GoogleLLMVariant

  The Google API LLM variant to use.

  #### Returns GoogleLLMVariant

  Inherited from BaseTool.apiVariant

  - Defined in tools/base_tool.ts:151

## Methods

### _getDeclaration

- _getDeclaration(): FunctionDeclaration

  Gets the OpenAPI specification of this tool in the form of a FunctionDeclaration.

  NOTE

  - Required if subclass uses the default implementation of `processLlmRequest` to add function declaration to LLM request.
  - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for Gemini.

  #### Returns FunctionDeclaration

  The FunctionDeclaration of this tool, or undefined if it doesn't need to be added to LlmRequest.config.

  Overrides BaseTool._getDeclaration

  - Defined in tools/exit_loop_tool.ts:29

### processLlmRequest

- processLlmRequest(request: ToolProcessLlmRequest): Promise<void>

  Processes the outgoing LLM request for this tool.

  Use cases:

  - Most common use case is adding this tool to the LLM request.
  - Some tools may just preprocess the LLM request before it's sent out.

  #### Parameters

  - request: ToolProcessLlmRequest

    The request to process the LLM request.

  #### Returns Promise<void>

  Inherited from BaseTool.processLlmRequest

  - Defined in tools/base_tool.ts:120

### runAsync

- runAsync(request: RunAsyncToolRequest): Promise<unknown>

  Runs the tool with the given arguments and context.

  NOTE

  - Required if this tool needs to run at the client side.
  - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for Gemini.

  #### Parameters

  - request: RunAsyncToolRequest

    The request to run the tool.

  #### Returns Promise<unknown>

  A promise that resolves to the tool response.

  Overrides BaseTool.runAsync

  - Defined in tools/exit_loop_tool.ts:36