> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Add App Tools Extensions with the Wix CLI

## Article: Add App Tools Extensions with the Wix CLI

## Article Link: https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/app-tools/add-app-tools-extensions-with-the-wix-cli.md

## Article Content:

# Add App Tools Extensions with the Wix CLI

[App Tools extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/app-tools/about-app-tools-extensions.md) let your app expose custom tools that [Aria](https://dev.wix.com/docs/overview/ai-the-wix-platform/about-aria.md) can discover and run on behalf of Wix users in the site dashboard.

App Tools requires **2 separate extensions** working together. This task walks you through creating both:

1. The **App Tools** declaration extension tells Aria what tools your app provides.
2. The **[Tools Provider](https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/introduction.md)** service plugin handles the runtime call when Aria invokes a tool.

You must create and configure both extensions.

## Before you begin

- You must have a project created using the [CLI](https://dev.wix.com/docs/wix-cli/cli-for-headless/about-the-wix-cli-for-headless.md).
- You must be logged into your Wix account. If you don't have one, [sign up for a Wix account](https://manage.wix.com/account/custom-apps).

## Step 1 | Create the App Tools extension

Generate the extension file where you declare the tools your app exposes to Aria.

In the terminal:

1. Navigate to your project repo.
2. Run the [generate](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/generate.md) command:

    ```bash
    wix generate
    ```

3. Select **App Tools** from the menu and press Enter.
4. Enter a name for your extension when prompted.

The CLI generates the extension file and registers it in `src/extensions.ts`. For the generated folder structure and file contents, see [App Tools Extension Files and Code](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/app-tools/app-tools-extension-files-and-code.md).

## Step 2 | Declare your tools

Configure the tools Aria can discover and call. Each tool configuration includes a name, a description, and optional request and response schemas.

Open the generated `<your-extension-name>.extension.ts` file and replace the stub tool declaration with your own. For field guidance and examples, see [App Tools Extension Files and Code](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/app-tools/app-tools-extension-files-and-code.md#app-tools-extensions-config).

## Step 3 | Create the Tools Provider service plugin

This step generates the runtime handler that Wix calls when Aria selects one of your declared tools. Creating a [Tools Provider](https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/introduction.md) follows the same flow as any other service plugin. For details, see [Add Service Plugin Extensions with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/service-plugins/add-service-plugin-extensions-with-the-wix-cli.md).

In the terminal:

1. Run the generate command again:

    ```bash
    wix generate
    ```

1. Select **Service Plugin** from the menu and press Enter.
1. Select **Tools Provider** from the list of service plugin types.
1. Enter a name for your service plugin when prompted.

The CLI generates the extension files and registers them in `src/extensions.ts`.

## Step 4 | Implement the handler

This step adds the business logic that runs when Aria calls one of your tools.

Open `<your-provider-name>.ts` and implement the `runTool` handler. Route on `methodName` to run the correct logic for each tool. Handle missing or unexpected fields in your implementation. For the generated file structure, see [Service Plugin Extension Files and Code](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/service-plugins/service-plugin-extension-files-and-code.md). For Tools Provider details and examples, see [About the Tools Provider Service Plugin](https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/introduction.md) and the [sample flows](https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/sample-flows.md) in the reference.

## Step 5 | Build and deploy your project

Changes to App Tools extensions don't take effect until you build and release your project:

```bash
wix build
wix release
```

> **Note:** When you release a project, you create a new app version. You can view your app's versions in the [app dashboard](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fversions-app).

## Delete App Tools extensions

To remove App Tools extensions from your project:

1. Delete the folder under `src/extensions` that contains your App Tools extension files.
1. Delete the folder under `src/extensions` that contains your Tools Provider service plugin files.
1. Remove the import and `.use()` statements for both extensions from your [`extensions.ts`](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/about-the-extensions-ts-file.md) file.

If you already have a released version of your app, build and release again after removing the files.

## See also

- [About App Tools Extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/app-tools/about-app-tools-extensions.md)
- [App Tools extension files and code](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/backend/app-tools/app-tools-extension-files-and-code.md)
- [About the Tools Provider Service Plugin](https://dev.wix.com/docs/api-reference/app-management/app-tools/tools-provider-v1/introduction.md)
- [About Service Plugin Extensions](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/service-plugins/about-service-plugin-extensions.md)