> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chataigne.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP tools and resources

> Reference for Chataigne's 24 restaurant-oriented MCP tools and six resource templates.

The restaurant MCP surface contains 18 read tools and 6 merchant operational actions. Inputs reject unknown properties, lists are bounded to 50 records, conversation transcripts to 100 messages, and analytics calls to eight metrics over at most 366 days. Additional platform-administration capabilities are documented only in the gated Admin section.

## Context and workspaces

| Tool                                     | Purpose                                                        | Main input                  |
| ---------------------------------------- | -------------------------------------------------------------- | --------------------------- |
| `chataigne_context_get`                  | Inspect delegated user, OAuth client, scopes and rollout state | No input                    |
| `chataigne_workspaces_list`              | Discover accessible business organizations and locations       | `cursor?`, `limit?`         |
| `chataigne_business_organization_get`    | Read a group and child locations                               | `business_organization_id`  |
| `chataigne_location_get`                 | Read one restaurant's safe operational summary                 | `location_id`               |
| `chataigne_location_settings_get`        | Read selected granular setting sections                        | `location_id`, `sections[]` |
| `chataigne_location_ordering_status_get` | Read Open, Closed, Rush or Paused state                        | `location_id`               |

The settings sections are `store`, `order`, `opening_hours`, `delivery`, `payment_methods`, `ai`, `loyalty`, `referrals`, `notifications`, and `privacy`.

## Catalog

| Tool                         | Purpose                                                          | Main input                                      |
| ---------------------------- | ---------------------------------------------------------------- | ----------------------------------------------- |
| `chataigne_catalogs_list`    | List compact catalog summaries                                   | `location_id`                                   |
| `chataigne_catalog_search`   | Search products and options without loading a complete menu tree | `location_id`, `query?`, `kinds?`, `available?` |
| `chataigne_catalog_item_get` | Read one product, option, option list, category or bundle        | `kind`, `item_id`                               |

Search results include a `chataigne://catalog-items/...` resource URI when applicable.

## Orders and customers

| Tool                       | Purpose                                               | Main input                                 |
| -------------------------- | ----------------------------------------------------- | ------------------------------------------ |
| `chataigne_orders_list`    | Search orders by owner, status, service type and date | `owner`, filters, cursor                   |
| `chataigne_order_get`      | Read lines, totals, fulfillment and status history    | `order_id`, `include_customer_contact?`    |
| `chataigne_customers_list` | Search owner-scoped profiles without contact points   | `owner`, filters, cursor                   |
| `chataigne_customer_get`   | Read one owner-scoped customer                        | `owner`, `customer_id`, `include_contact?` |

An owner is always explicit:

```json theme={null}
{ "type": "location", "id": "loc_..." }
```

or:

```json theme={null}
{ "type": "business_organization", "id": "org_..." }
```

Requesting contact details on an order requires both `orders.read` and `customers.read`.

## Conversations

| Tool                           | Purpose                                                | Main input                          |
| ------------------------------ | ------------------------------------------------------ | ----------------------------------- |
| `chataigne_conversations_list` | Search conversation summaries and chatbot/report state | `owner`, filters, cursor            |
| `chataigne_conversation_get`   | Read a merchant-safe bounded transcript                | `conversation_id`, `message_limit?` |

Internal tool traces, raw provider identities and provider payloads are never returned.

## Analytics and configuration

| Tool                          | Purpose                                                  | Main input                         |
| ----------------------------- | -------------------------------------------------------- | ---------------------------------- |
| `chataigne_analytics_query`   | Compute up to eight metrics in one query                 | `owner`, `metrics[]`, `from`, `to` |
| `chataigne_discounts_list`    | List owner-scoped discount definitions                   | `owner`                            |
| `chataigne_integrations_list` | List providers and non-sensitive activation/health hints | `location_id`, `categories?`       |

Supported analytics metric keys are:

```text theme={null}
total_orders, gross_volume, average_cart, orders_evolution,
orders_by_channel, average_cart_by_channel, orders_heatmap,
cancelled_orders, active_customers, new_customers,
repeat_customer_rate, interactions, conversion_rate,
top_products, trending_products, delivery_cities,
discount_usage, products_sold, products_per_order
```

## Operational actions

Merchant operational actions are available only when the platform write rollout is enabled and the token has the write scope.

| Tool                                      | Effect and safety precondition                                                |
| ----------------------------------------- | ----------------------------------------------------------------------------- |
| `chataigne_location_ordering_status_set`  | Sets Online, Rush or Paused; requires `expected_mode`                         |
| `chataigne_catalog_item_availability_set` | Atomically toggles a product/option; requires `expected_available`            |
| `chataigne_order_status_set`              | Advances to an allowlisted non-destructive status; requires `expected_status` |
| `chataigne_conversation_chatbot_set`      | Atomically enables/disables the AI clerk; requires `expected_active`          |
| `chataigne_conversation_message_send`     | Sends one plain-text manual message; requires `idempotency_key`               |
| `chataigne_conversation_instruction_send` | Sends an AI clerk instruction; requires `idempotency_key`                     |

`chataigne_order_status_set` accepts only `accepted`, `in_preparation`, `awaiting_shipment`, `awaiting_collection`, `in_delivery`, or `completed`. It cannot cancel, reject, mark delivery failure, or refund.

## Resource templates

The server advertises only resource templates covered by the token's scopes:

```text theme={null}
chataigne://business-organizations/{id}
chataigne://locations/{id}
chataigne://catalog-items/{kind}/{id}
chataigne://orders/{id}
chataigne://customers/{ownerType}/{ownerId}/{id}
chataigne://conversations/{id}
```

Resources return `application/json` and apply the same live authorization as their matching detail tool.
