> ## Documentation Index
> Fetch the complete documentation index at: https://colin-feat-client-cache-mode.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ListChangedHandler

```ts theme={null}
type ListChangedHandler<T> = {
  autoRefresh?: boolean;
  debounceMs?: number;
  onChanged: (error, items) => void | Promise<void>;
};
```

Defined in: [client/handlers.ts:32](https://github.com/PrefectHQ/fastmcp-ts/blob/8976c37f79efa6b87809b884f29a1f235a8c4ad1/src/client/handlers.ts#L32)

Config for receiving server-initiated list-change notifications.
Set debounceMs: 0 in tests for instant delivery.

## Type Parameters

### T

`T`

## Properties

### autoRefresh?

```ts theme={null}
optional autoRefresh?: boolean;
```

Defined in: [client/handlers.ts:35](https://github.com/PrefectHQ/fastmcp-ts/blob/8976c37f79efa6b87809b884f29a1f235a8c4ad1/src/client/handlers.ts#L35)

Whether to auto-fetch the updated list before calling onChanged. Default: true.

***

### debounceMs?

```ts theme={null}
optional debounceMs?: number;
```

Defined in: [client/handlers.ts:37](https://github.com/PrefectHQ/fastmcp-ts/blob/8976c37f79efa6b87809b884f29a1f235a8c4ad1/src/client/handlers.ts#L37)

Debounce window in ms. Default: 300. Set to 0 to disable.

***

### onChanged

```ts theme={null}
onChanged: (error, items) => void | Promise<void>;
```

Defined in: [client/handlers.ts:33](https://github.com/PrefectHQ/fastmcp-ts/blob/8976c37f79efa6b87809b884f29a1f235a8c4ad1/src/client/handlers.ts#L33)

#### Parameters

##### error

`Error` | `null`

##### items

`T`\[] | `null`

#### Returns

`void` | `Promise`\<`void`>
