# Rack Attack — Agent Guide

> Rack Attack is a specialist retailer of vehicle rack systems: roof racks, hitch & bike racks, kayak/canoe/SUP carriers, ski & snowboard racks, cargo boxes & baskets, truck bed racks, and tonneau covers. The defining challenge of this catalog is **fitment** — products fit only specific vehicles in specific configurations.

This guide tells you (an AI agent) how to find the right product for a shopper's vehicle.

## Capabilities

You can: find products that fit a specific vehicle, search the catalog, and create a cart that checks out on `checkout.rackattack.com`.

## Connect (recommended): MCP server

This store exposes a Model Context Protocol server over streamable HTTP:

```
https://rackattack.teifi.dev/api/mcp
```

Add it as a connector and call the tools below. No API key required.

## Tools

- `search_products` — Keyword search the Rack Attack catalog (roof racks, hitches, bike/kayak/ski carriers, cargo boxes, truck bed racks, tonneau covers, accessories).
- `list_categories` — List Rack Attack product categories (id + name).
- `list_manufacturers` — List Rack Attack brands/manufacturers (id + name).
- `get_fit_types` — List the fitment categories Rack Attack supports for a vehicle (roof, hitch, tonneau / truck bed cover, truck bed rack, bed liners, floor mats, hood protection).
- `get_vehicle_makes` — List vehicle makes available for a given year.
- `get_vehicle_models` — List models for a year + make.
- `get_vehicle_bodies` — List body styles for a year + make + model (e.g.
- `get_fitment_options` — List the vehicle PROPERTIES required to resolve fitment for a year/make/model/body + fitType — for roof racks this is the roof type (naked, raised-rail, track, fixed-mounting-point).
- `find_fitting_racks` — THE fitment answer.
- `get_catalog_for_vehicle` — Resolve a vehicle's fitment into the Shopify PRODUCT/VARIANT records a Catalog API exposes to agents — every fitting component mapped to its real Shopify variantId, title, and price.
- `suggest_addons` — Returns compatible accessories and upsells for a given fitType — bike/kayak carriers, cargo boxes, ski racks, locks, and more — each with a Shopify variantId so they can be passed directly to add_to_cart.
- `add_to_cart` — Create a real Rack Attack cart from one or more Shopify variantIds (from search_products / suggest_addons, or a rack system's component SKUs resolved to variantIds) and return a LIVE checkout URL on checkout.rackattack.com with those items pre-loaded, plus the order total.
- `list_store_locations` — List Rack Attack's real retail store locations (45 across US + Canada) with addresses + Google Maps links — use to find the nearest store for installation or pickup..
- `get_installation_slots` — List available rack INSTALLATION appointment slots (professional install, powered by WorkmatePOS).
- `book_installation` — Book a rack installation appointment in a chosen slot (powered by WorkmatePOS).

## The fitment flow (do not skip steps)

Fitment cannot be guessed from a product description — it must be queried. To recommend a rack that genuinely fits a vehicle:

1. **Fit type** — call `get_fit_types` and map the shopper's intent to a Name (e.g. "roof rack" → `roof`, "bike rack on the back" → `hitch`, "bed cover" → `tonneau`).
2. **Year / Make / Model** — use `get_vehicle_makes` and `get_vehicle_models` to validate. Accept natural language ("a 2020 Tacoma").
3. **Body** — call `get_vehicle_bodies` and select the body style. This is usually **required**; fitment returns nothing for trucks/SUVs without it.
4. **Disambiguating property** — call `get_fitment_options`. For roof racks this returns the **roof type** (`naked`, `raised-rail`, `track`, `fixed-mounting-point`). If a property is required and you don't know it, **ask the shopper a short plain-language question** — do not guess. One vehicle fits different racks depending on this.
5. **Answer** — call `find_fitting_racks` with everything. Each result is a complete kit (brand, components, fit notes, weight limit). An empty list means the body or property is missing — resolve it and retry.
6. **Buy** — when ready, use `search_products` to get a `variantId`, then `add_to_cart` to get a real checkout link.

## REST (if you cannot use MCP)

The same tools are available as a JSON proxy (no key required):

```
GET  https://rackattack.teifi.dev/api/tool                 # list tools
POST https://rackattack.teifi.dev/api/tool                 # { "name": "<tool>", "args": { ... } }
```

Example — find roof racks for a 2020 Toyota Tacoma with a naked roof:

```
POST https://rackattack.teifi.dev/api/tool
{ "name": "find_fitting_racks",
  "args": { "year": "2020", "make": "Toyota", "model": "Tacoma", "fitType": "roof", "body": "4DR Double Cab", "property": "naked" } }
```

## Rules

- Never claim a product fits unless `find_fitting_racks` returned it for that exact vehicle.
- If a required property is unknown, ask the shopper — don't assume.
- Prices and availability come from the live catalog; don't invent them.
