---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/validation/types/interfaces/ToolIdentityRule.md
description: Requires a replayed tool result to name a tool the request actually declares.
---

# Interface: ToolIdentityRule

Defined in: [src/batteries/validation/types.ts:370](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/validation/types.ts#L370)

Requires a replayed tool result to name a tool the request actually declares.

## Remarks

A ROOT CAUSE of the silent empty-generation class. Gemini matches a `functionResponse.name`
against its `functionDeclarations`; a name that resolves to nothing — an opaque call id, or a
tool no longer offered this turn — makes it return an empty candidate
(`parts: [{text: ''}]`, `STOP`, no `candidatesTokenCount`) a large fraction of the time. The
gateway then forwards that as an ordinary `finish_reason: stop` with `content: null` and NO
error, so the caller sees a successful turn that produced nothing.

Requires the tool registry; the evaluator skips this rule when none is supplied.

## Properties

| Property                                   | Type                         | Description                                                                       | Defined in                                                                                                                   |
| ------------------------------------------ | ---------------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|  `id`              | `string`                     | Stable identifier used in findings.                                               | [src/batteries/validation/types.ts:374](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/validation/types.ts#L374) |
|  `severity?` | `"blocking"` | `"advisory"` | See [OrderRule.severity](OrderRule.md#property-severity). Omitted means advisory. | [src/batteries/validation/types.ts:376](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/validation/types.ts#L376) |
|  `type`          | `"toolIdentity"`             | Discriminator selecting the tool-identity evaluator.                              | [src/batteries/validation/types.ts:372](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/validation/types.ts#L372) |
