> ## Documentation Index
> Fetch the complete documentation index at: https://www.narev.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ConfigureChatTools

[**@ai-billing/nextjs**](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index.md)

***

[@ai-billing/nextjs](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/index.md) / [server](https://www.narev.ai/docs/ai-billing/reference/nextjs/typedoc/server/index) / configureChatTools

# Function: configureChatTools()

> **configureChatTools**\<`T`>(`config`): `void`

Defined in: [packages/nextjs/src/chat/chatTools.ts:19](https://github.com/narevai/ai-billing/blob/main/packages/nextjs/src/chat/chatTools.ts#L19)

Registers tools and step limit for the chat server action.
Call this at module level before any chat requests.

Generic to avoid TypeScript's deep-union instantiation limit on ToolSet
while still accepting any record of tool objects at the call site.

## Type Parameters

### T

`T` *extends* `Record`\<`string`, `object`>

## Parameters

### config

Tools configuration with optional step limit.

#### tools

`T`

#### maxSteps?

`number`

## Returns

`void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.