For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tool Controller

Controller for querying available AI tools and tool scopes from custom backoffice elements.

UaiToolController provides a frontend API for querying the available AI tools and tool scopes. Use this to build custom UI for tool selection or to display tool information in your backoffice extensions.

Import

Import
import { UaiToolController, UaiToolScope, UaiToolItem } from "@umbraco-ai/core";

Constructor

Constructor
new UaiToolController(host: UmbControllerHost)
Parameter
Type
Description

host

UmbControllerHost

The controller host (usually this in a Lit element)

Methods

getToolScopes

Gets all available tool scopes.

Signature
async getToolScopes(): Promise<{ data?: UaiToolScope[]; error?: unknown }>

Returns: Promise resolving to { data?, error? } where data is an array of tool scopes.

getTools

Gets all available tools.

Signature
async getTools(): Promise<{ data?: UaiToolItem[]; error?: unknown }>

Returns: Promise resolving to { data?, error? } where data is an array of tools.

getToolCountsByScope

Gets the number of tools in each scope, including both backend and frontend tools.

Returns: Promise resolving to a record mapping scope IDs to tool counts. Returns {} on error.

Types

Example

Last updated

Was this helpful?