Skill instructions
dealer-setup6.99 KB
View saved version →
---
name: dealer-setup
description: >
Configure an existing Motive dealer via api_docs + execute: resolve the dealer,
audit baseline site config (CMS, nav, feeds, pricing, AI), apply identity and
feature updates with change sets, then verify. Use when onboarding/launching a
dealer, finishing setup checklist items, or the user asks to set up / configure
a dealership (not for creating a brand-new dealer record — that is outside MCP).
---
# Dealer setup (via execute)
There is **no** `ctx.create_dealer`. Setup means configuring a dealer that already
exists. Do all work with `api_docs` / `search_docs` + `execute`. Do not invent APIs.
## Tools you will use
| Tool | Role |
| -------------------------- | ------------------------------------------------------------ |
| `search_docs` / `api_docs` | MCP tools (not `ctx.*`) — confirm kwargs before writing code |
| `execute` | All reads and writes through `async def run(ctx): ...` |
| `report_issue` | Docs wrong, unexpected errors, bad shapes |
Optional visual inventory Apps (`browse_inventory`, `show_vehicle`) are
**not** part of setup — ignore them unless the user asks to look at cars.
## Change-set rules (writes)
- Read-only `execute` calls never open a change set.
- First mutating call: omit `change_set_id`, pass a clear `commit=...`.
- Later mutating calls in the same prompt: reuse returned `change_set_id`.
- Prefer small commits per concern (`Update sales phone`, `Enable chat`, …).
## Workflow
Work phase-by-phase. Stop and ask the user when an attribute is ambiguous or
owner-only access fails.
### 1. Resolve dealer_id
If the user gave a name/domain, search; if they gave an id, still confirm it.
```python
async def run(ctx):
return await ctx.search_dealers(name="Example Motors", page=1, per_page=25)
```
Confirm with:
```python
async def run(ctx):
return await ctx.get_dealer(dealer_id)
```
Record `id`, `name`, `domain` / `launch_domain`, `oem_type`, phones, address, and
feature/page flags from the DTO for the rest of the checklist.
### 2. Baseline audit (single gather)
Pull a snapshot before changing anything. Adjust the set if the user only asked
for a slice (e.g. “just feeds”).
```python
async def run(ctx):
dealer, pages, nav_settings, nav_links, feeds, pricing, ai, srp = await ctx.gather(
ctx.get_dealer(dealer_id),
ctx.list_cms_pages(dealer_id),
ctx.get_nav_settings(dealer_id),
ctx.list_nav_links(dealer_id),
ctx.get_import_feeds(dealer_id),
ctx.get_pricing_stack(dealer_id),
ctx.get_ai_config(dealer_id),
ctx.get_srp_config(dealer_id),
)
return {
"dealer": {
"id": dealer.get("id"),
"name": dealer.get("name"),
"domain": dealer.get("domain"),
"sales_phone": dealer.get("sales_phone"),
"service_phone": dealer.get("service_phone"),
"oem_type": dealer.get("oem_type"),
"chat_enabled": dealer.get("chat_enabled"),
"credit_enabled": dealer.get("credit_enabled"),
"new_page": dealer.get("new_page"),
"used_page": dealer.get("used_page"),
},
"cms_page_count": len(pages or []),
"nav_link_count": len(nav_links or []),
"nav_settings": nav_settings,
"feed_summary": feeds,
"pricing_stack": pricing,
"ai_mode": ((ai or {}).get("ai_config") or {}).get("ai_mode"),
"has_srp_config": srp is not None,
}
```
Summarize gaps for the user (missing phones, chat off, no feeds, empty nav, etc.)
before writing.
### 3. Identity / contact / feature flags
**Owner-only.** Use `update_dealer` with only fields the user requested.
Look up allowed fields with `search_docs` → `update_dealer` if unsure.
Image uploads (logo, favicon, …) are **not** supported via MCP.
```python
async def run(ctPreview of the first 4,000 characters. Read full instructions →
Referenced files: 3 — file references are metadata, not package contents.
inventory-import-setup11.8 KB
View saved version →
---
name: inventory-import-setup
description: >
Configures a V2 inventory import (feed pipeline) for an existing Motive dealer
through api_docs and execute: reads the dealer, finds the feed source, enables
Inventory Feed V2, creates the pipeline and the pipeline step, creates the V1
import feed record, reads the vendor file, and starts the inventory sync. Use
when the user asks to set up, add, configure, or fix an inventory import,
import feed, feed pipeline, or vendor feed (vAuto, HomeNet, DealerOn, and
others) for a dealer, or gives a dealer id with a vendor name and a filename
or dealer code.
---
# Inventory import configuration (V2 feed pipeline)
This skill connects one dealer to one vendor inventory file. You do all work with the MCP tools `search_docs`, `api_docs`, and `execute`. No MCP method creates a dealer or a feed source. Those records must exist before you start.
The procedure has five phases. Each phase that writes data is one `execute` call. Do not divide a phase into more calls. Each call costs time.
## Terms
Use these words. Do not use a different word for the same object.
- Feed source: the saved definition of a vendor file. It has the host, the file format, and the default field mappings. Motive owners manage feed sources. You only read them.
- Pipeline: the ordered list of pipeline steps for one dealer. One dealer has one pipeline or no pipeline.
- Pipeline step: one feed source and one filename, attached to one pipeline.
- V1 import feed record: the older feed record on the dealer. A V2 import needs this record.
- Inventory sync: one manual import of the vendor file.
- Change set: the audit group for all writes in one task.
## Values you need before you write
Get these three values from the user:
- The dealer id, or a dealer name that you can search.
- The feed source name (for example, vAuto).
- The filename or dealer code from the vendor (for example, MP4131).
If the feed source needs a secret or a username, and the user did not give it, stop and ask. Do not write credentials that the user did not give.
## Tools
| Tool | Use |
| ------------- | ------------------------------------------------- |
| `api_docs` | Read one method. This tool is not `ctx.api_docs`. |
| `search_docs` | Find a method by keyword. |
| `execute` | Send `async def run(ctx): ...`. No imports. |
Read `api_docs` for a method the first time that you use it in a session. Read it again if a call fails with HTTP 422. Do not read every method before you start.
`commit` is a short string. `commit=True` fails.
## Change set rules
- A read-only call does not open a change set.
- The first write does not send `change_set_id`. It sends `commit="..."`.
- Each later write sends the same `change_set_id`.
- One `commit` string for each phase.
- If you also configure pricing for this dealer, use the same `change_set_id` for both skills.
## Procedure
Copy this checklist and mark each phase when it is done.
```
- [ ] Phase 1. Get the values from the user
- [ ] Phase 2. Read the dealer and the feeds
- [ ] Phase 3. Write the import
- [ ] Phase 4. Start the inventory sync
- [ ] Phase 5. Report
```
### Phase 1. Get the values from the user
Get the three values in "Values you need before you write". If a value is missing, ask for it. Ask one time, in one message.
### Phase 2. Read the dealer and the feeds
This phase is one read-only `execute` call. Do not send `commit`.
```python
async def run(ctx):
dealer, feeds, sources, connections = await ctx.gather(
ctx.get_dealer(dealer_id),
ctx.get_import_feeds(dealer_id),
ctx.list_feed_sources(),
ctx.get_feed_connections(dealer_id),
)
v2_on = bool(dealer.get("inventory_feed_v2_enabled"))
pipeline = None
if v2_on:
pipeline = await ctx.get_feed_pipeline(dealer_id)
source = None
for s in sources or []:
if s.get("naPreview of the first 4,000 characters. Read full instructions →
pricing-config-setup19.6 KB
View saved version →
---
name: pricing-config-setup
description: >
Configures Vehicle Pricing V2 for an existing Motive dealer through api_docs
and execute: enables canonical pricing, sets the document fee, builds New
(Price, Payment, Lease) and Used (Price, Payment only — no Lease) pricing
configs, publishes them, and checks the Payment Estimate app. Use when the
user asks to set up, copy, or fix a pricing config, pricing stack, payment
tab, lease tab, document fee, or canonical price mappings for a dealer.
---
# Pricing config configuration
This skill builds the standard Vehicle Pricing V2 pricing config for one dealer. You do all work with the MCP tools `api_docs`, `search_docs`, and `execute`. No MCP method creates a dealer. No MCP method installs the Payment Estimate app.
The procedure has seven phases. Each phase that writes data is one `execute` call. Do not divide a phase into more calls. Each call costs time.
Copy the Price tab from a source dealer. Use [references/reference-config.md](references/reference-config.md) for dealer flags, final price rules, Payment and Lease tabs, and save shape. If the user does not name a source dealer, ask for one before Phase 5. Obey the rules in this skill when you adapt the copy.
**Hard rule — no lease on Used.** The Lease tab (`tab_kind: "lease"`) is New-only. Used pricing configs get Price and Payment only. Never copy, create, or keep a Lease tab on a Used config. If a source Used config has a Lease tab, drop it.
Read [references/gotchas.md](references/gotchas.md) before the first write.
## Terms
Use these words. Do not use a different word for the same object.
- Pricing config: one saved price display for one vehicle condition. A dealer has one pricing config for New and one for Used.
- Price tab: the cash price lines (`tab_kind` null/omitted).
- Payment tab: the finance estimate lines (`tab_kind: "finance"`).
- Lease tab: the lease estimate lines (`tab_kind: "lease"`). New configs only.
- Canonical pricing: `v2_pricing_enabled` is true and `price_mapping_compute_enabled` is true. The stack field `canonical_pricing_enabled` is true only when both flags are true.
- Canonical mapping: a `price_mappings` row. It writes a line result into a vehicle field (`msrp` or `price`).
- Document fee: the dealer fee in `document_fee` (New) and `used_document_fee` (Used). The line label is `Documentary Service Fee`.
- Hide condition: `visibility_conditions.expression`. When the expression is true, the site hides the element or the tab.
- Change set: the audit group for the writes in one task.
- Payment Estimate app: the Admin feature that fills `[[monthly_payment]]`, `[[apr]]`, `[[term]]`, and `[[money_down]]`. MCP cannot install it.
## Values you need before you write
Get these values from the user. If a value is missing, ask. Do not guess.
1. The dealer id, or a dealer name that you can search.
2. The document fee in dollars. Use one amount for New and for Used, unless the user gives two amounts.
3. The final price rule. See "Ask how the final price works".
Optional:
- A source dealer id, only when the user says to copy the pricing config of another dealer.
## Ask how the final price works
Price math is different for each dealer. Do not assume the rule. Ask the user these questions before Phase 5. Ask them one time, in one message.
1. Is the final price the price from the feed (`price`, `discount_price`, or another feed field)? Which field?
2. Does that feed price include the document fee?
3. Must we add the document fee to that feed price?
4. Must we ignore the feed price and compute the final price as MSRP minus OEM incentives?
5. How does the dealer compute Dealer Discount? How does the dealer compute Market Adjustment?
Map the answers to one rule in [references/reference-config.md](references/reference-config.md), section "Final price rules". If the answers do not match a rule, or if the answers conflict, stop and ask again. Do not write a formula that the user did not agree to.
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.