NewWacht Bench is live — AI-assisted development for Wacht

listTools()

This method lists deployment AI tools.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function example() {  const client = await wachtClient();  const options: ListOptions & { search?: string } = {    limit: 20,    search: 'support',  };  return client.ai.listTools(options);}

Signature

function listTools(  options?: ListOptions & { search?: string },  client?: WachtClient,): Promise<PaginatedResponse<AiToolWithDetails>>

Parameters

options?: ListOptions & { search?: string } | undefined;
Optional query/filter object used to shape list/search behavior.
limit?: number | undefined;
limit value used by this request.
search?: string | undefined;
search value used by this request.

Return value

data?: AiToolWithDetails[] | undefined;
Current page result items.
has_more?: boolean | undefined;
Whether additional pages are available.
limit?: number | undefined;
Effective page size when returned by backend.
offset?: number | undefined;
Effective offset when returned by backend.

Examples

AI usage pattern

import { wachtClient } from '@wacht/nextjs/server';export async function attachTool(agentId: string) {  const client = await wachtClient();  const tool = await client.ai.createTool({    name: 'fetch-user-profile',    kind: 'api',    configuration: {},  });  await client.ai.attachAgentTool(agentId, tool.id);  return tool;}

On this page