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

# Tool reference

> Read-only Keystone MCP tools shared with Gus (AI Assistant).

<Note>
  **Who this is for:** Brand users and reps evaluating what Claude, Cursor, or ChatGPT can ask Keystone. MCP is a **Pro / Enterprise** feature (Basic keeps Gus in-app only).
</Note>

Keystone MCP exposes the **same read-only data tools** as [Gus](/features/ai-assistant), plus three identity/brand tools for multi-brand connections. Every call runs as **you** under Postgres RLS — reps only see their book of business.

Write / browser-handoff tools (`create_catalog`, `create_suggested_order`, `escalate_to_support`) stay **Gus-only** and are not available over MCP.

## Identity & brand (MCP-only)

| Tool               | What it does                                                                 |
| ------------------ | ---------------------------------------------------------------------------- |
| `whoami`           | Role, email, active brand, plan, whether MCP is ready for that brand         |
| `list_brands`      | Brands you can access (multi-brand reps) and each brand's `mcp_enabled` flag |
| `set_active_brand` | Switch active brand for later tool calls (same as the in-app switcher)       |

These three stay available even when the active brand has MCP off or is on Basic, so you can switch to an eligible brand without reconnecting.

## Orders & shipments

| Tool                       | What it does                                                     |
| -------------------------- | ---------------------------------------------------------------- |
| `find_sales_orders`        | Search orders by document #, PO, customer, status, or date range |
| `lookup_sales_order_lines` | Line items (SKUs) for one sales order                            |
| `find_shipments`           | Fulfillments / tracking; optional unshipped-only filter          |

## Invoices & AR

| Tool                    | What it does                                                           |
| ----------------------- | ---------------------------------------------------------------------- |
| `find_invoices`         | Search invoices by number, customer, status, or dates                  |
| `get_invoice_links`     | PDF and payment URLs for one invoice or recent invoices for a customer |
| `list_overdue_invoices` | Past-due open invoices (sorted most overdue first)                     |
| `lookup_invoice_lines`  | Line items for one invoice (or invoice tied to a sales order #)        |

## Accounts & sales

| Tool                       | What it does                                                             |
| -------------------------- | ------------------------------------------------------------------------ |
| `lookup_customer_profile`  | Account identity, health metrics, recent orders/invoices                 |
| `get_account_crm_snapshot` | Contacts, recent outreach/activities, notes, follow-up status            |
| `rank_top_accounts`        | Top accounts by invoiced / on-order dollars for a period (**brand/rep**) |
| `compare_customer_sales`   | Period-over-period growth or shrink by account (**brand/rep**)           |
| `find_lapsed_customers`    | Accounts with no order in N days (**brand/rep**)                         |
| `get_commission_report`    | Monthly or invoice-level rep commissions (**brand/rep**)                 |

## Products & inventory

| Tool                        | What it does                                                      |
| --------------------------- | ----------------------------------------------------------------- |
| `search_products`           | Catalog search by SKU or name — price and on-hand inventory       |
| `lookup_restock_timeline`   | Incoming PO restock ETAs from `inventory_incoming`                |
| `find_inventory_shortages`  | Open SKU shortages from Inventory Truth (**brand/rep**)           |
| `get_inventory_by_location` | Warehouse facility stock + regional / ship-date ATS for a product |
| `rank_top_skus`             | Top SKUs by invoiced or booked quantity                           |
| `find_product_coverage`     | Whether an account or its locations ordered a named product       |
| `get_d2c_recommendations`   | D2C demand assortment near an account (requires D2C Insights)     |

## Help

| Tool               | What it does                                                        |
| ------------------ | ------------------------------------------------------------------- |
| `search_help_docs` | Search Keystone help documentation (needs OpenAI on the MCP server) |

## Limits & notes

* Tool calls are rate-limited (\~60/minute per session).
* Most list tools return a small page of rows; ask for a higher `limit` when the tool supports it.
* MCP never places orders, sends email, or changes settings (aside from your active brand switch).
* Turning off **Enable MCP** or dropping to Basic blocks data tools immediately; revoke sessions under **Settings → MCP connections**.

## Related

* [Overview](/mcp/overview)
* [Connecting clients](/mcp/connecting-clients)
* [Authentication & security](/mcp/authentication)
* [Platform Settings](/settings/platform-settings)
