Docs
Cloudflare
Railway
CodeRabbit
Clerk
WorkOS
AG Grid
Netlify
SerpAPI
OpenRouter
Electric
Prisma
Sentry
Unkey
Cloudflare
Railway
CodeRabbit
Clerk
WorkOS
AG Grid
Netlify
SerpAPI
OpenRouter
Electric
Prisma
Sentry
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

createFrozenRegistry

Function: createFrozenRegistry()

ts
function createFrozenRegistry<TTool>(tools): ToolRegistry<TTool>;
function createFrozenRegistry<TTool>(tools): ToolRegistry<TTool>;

Defined in: packages/ai/src/tool-registry.ts:119

Create a frozen (immutable) tool registry from a tools array.

This is used internally to wrap static tools arrays for backward compatibility. Add and remove operations are no-ops on frozen registries.

Type Parameters

TTool

TTool extends AnyTool = AnyTool

Parameters

tools

TTool[] = []

The static array of tools

Returns

ToolRegistry<TTool>

A frozen ToolRegistry