> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/getting-started/tools.md). Agents can also search and read this documentation through its [MCP server](https://docs.umbraco.com/~gitbook/mcp).

# Tools

The full set of read-only tools Umbraco Commerce AI makes available to a Copilot agent.

Umbraco Commerce AI ships read-only tools, grouped under the **Commerce (Read)** tool scope. The scope's alias is `commerce-read`. An agent with this scope can read stores, orders, customers, products, stock, discounts, gift cards, and store configuration. It cannot create, change, or delete anything.

Every tool name starts with `commerce_`, so the tools don't collide with tools from Umbraco AI or other packages. Each tool checks that the signed-in user has access to the **Commerce** section and to the store being asked about.

You don't need to name tools when you ask a question. The AI model picks a tool from its description. The example questions in the tables show the kind of question each tool answers.

## Stores and setup

| Tool                          | Returns                                                                   | Answers questions like                                     |
| ----------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `commerce_get_stores`         | The stores the user can access, with base currency and all-time totals.   | "What stores do I have?"                                   |
| `commerce_get_store_config`   | The store's payment methods, shipping methods, currencies, and countries. | "What payment and shipping methods does my store support?" |
| `commerce_get_order_statuses` | The store's order statuses in sort order.                                 | "What order statuses do we have?"                          |

## Sales overview

| Tool                                      | Returns                                                                                                                  | Answers questions like                                |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| `commerce_get_store_pulse`                | Revenue, orders, average order value, cart conversion, and refund rate, against the previous period.                     | "How's the shop doing this week?"                     |
| `commerce_get_conversion_and_abandonment` | Carts created, reaching checkout, and ordered, including how carts sent a recovery email converted.                      | "What's my cart abandonment rate?"                    |
| `commerce_get_refund_insights`            | The refund rate against the previous period, and up to 10 products with the highest refund rates, with their top reason. | "What's my refund rate and why are people refunding?" |

## Orders

| Tool                                 | Returns                                                                                                | Answers questions like                                  |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `commerce_search_orders`             | Placed orders filtered by period, order status, payment status, customer, SKU, discount code, or tag.  | "Which orders used code AUTUMN10?"                      |
| `commerce_get_order`                 | One order or cart by its number: lines, totals, order and payment status, payment and shipping method. | "What's the status of order `ORDER-00974-51182-57Y7C`?" |
| `commerce_get_order_pipeline_health` | Order counts by order status and payment status, with orders in error and orders waiting long.         | "Are any orders failing or stuck?"                      |

## Customers

| Tool                                | Returns                                                                                          | Answers questions like                                  |
| ----------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| `commerce_search_customers`         | The store's customers found by name or tag, with their tags.                                     | "Find customers tagged 'wholesale'."                    |
| `commerce_get_customer`             | One customer's order counts, spend per currency, recent orders, tags, and recent communications. | "How much has this customer spent?"                     |
| `commerce_get_customer_insights`    | Top customers, the share of repeat customers, and revenue concentration for a period.            | "Who are my best customers over the last 90 days?"      |
| `commerce_get_customer_base_health` | New and active customers, spend, and orders per customer, by month.                              | "How is my customer base doing over the last 6 months?" |
| `commerce_get_customer_segments`    | The customer tags in use, how many customers have each, and the saved customer filters.          | "What customer segments do I have?"                     |

## Products and stock

| Tool                               | Returns                                                                                     | Answers questions like                 |
| ---------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------- |
| `commerce_get_product_performance` | The top 5 products by units sold for a period, with the change against the previous period. | "What are my best sellers this month?" |
| `commerce_get_stock_risk`          | Low-stock products with sales per day and an estimate of the days until they run out.       | "What am I about to run out of?"       |

## Discounts and gift cards

| Tool                                  | Returns                                                                                     | Answers questions like                       |
| ------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------- |
| `commerce_get_discounts`              | The store's discounts with their codes, status, and rule and reward types.                  | "What discounts do we have running?"         |
| `commerce_explain_discount`           | A plain-language explanation of when one discount applies and what it gives.                | "What does the SUMMER25 discount do?"        |
| `commerce_get_discount_effectiveness` | The most-used discounts and whether discounts per order are rising, for a period.           | "Which promo codes are popular this month?"  |
| `commerce_get_gift_cards`             | The outstanding gift card balance per currency, with the active cards' balances and expiry. | "How much gift card balance is outstanding?" |

## How the tools report figures

* **Periods are resolved on the server.** Tools that report on a period take a fixed set of periods, such as "today", the last 7 days, or last month. See [Reporting periods](https://docs.umbraco.com/umbraco-commerce-ai/17.latest/getting-started/configuration.md#reporting-periods).
* **Amounts always have a currency.** Every amount is returned with its currency. A single customer's spend is listed per currency. Store-level figures are in the store's base currency.
* **A missing value is not zero.** When a figure isn't measured or isn't available, the tool returns an empty value instead of 0.
* **Rate changes are reported in percentage points.** A conversion rate going from 66.7% to 63.6% is a change of −3.0 points.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/umbraco-commerce-ai/17.latest/getting-started/tools.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
