Overview

The Tools API allows you to manage AI tools within the Wacht platform. You can list, retrieve, create, update, and delete AI tools.

fetchTools(options?: ListToolsOptions)

Lists all AI tools.

Parameters

  • options (optional): An object containing pagination and filtering options.
    • page (number): The page number to retrieve.
    • per_page (number): The number of items per page.
    • search (string): Search term for tools.
    • is_active (boolean): Filter by active status.

Returns

Promise<ToolListResponse>: A promise that resolves to a list of AI tools and pagination information.

createTool(request: CreateAiToolRequest)

Creates a new AI tool.

Parameters

  • request (CreateAiToolRequest): The request body containing the details of the new AI tool.

Returns

Promise<AiTool>: A promise that resolves to the newly created AI tool object.

fetchTool(toolId: string)

Retrieves a specific AI tool by its ID.

Parameters

  • toolId (string): The unique identifier of the AI tool.

Returns

Promise<AiTool>: A promise that resolves to the AI tool object.

updateTool(toolId: string, request: UpdateAiToolRequest)

Updates an existing AI tool.

Parameters

  • toolId (string): The unique identifier of the AI tool to update.
  • request (UpdateAiToolRequest): The request body containing the updated details of the AI tool.

Returns

Promise<AiTool>: A promise that resolves to the updated AI tool object.

deleteTool(toolId: string)

Deletes an AI tool by its ID.

Parameters

  • toolId (string): The unique identifier of the AI tool to delete.

Returns

Promise<void>: A promise that resolves when the tool is successfully deleted.