@scavio/mcp-server 0.40.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -5
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +6 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kohls.d.ts +3 -0
- package/dist/tools/kohls.js +110 -0
- package/dist/tools/kohls.js.map +1 -0
- package/dist/tools/saks.d.ts +3 -0
- package/dist/tools/saks.js +111 -0
- package/dist/tools/saks.js.map +1 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|
|
|
6
|
-
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources.
|
|
6
|
+
[Scavio](https://scavio.dev?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) is a unified [Web Search API](https://scavio.dev/docs/search-api?utm_source=npm-mcp&utm_medium=package&utm_campaign=readme) and MCP server that gives AI agents web search, page extraction, and structured data from e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing sources. 426 tools across 66 platforms plus Extract, map, crawl and batch, one API key.
|
|
7
7
|
|
|
8
|
-
**The 22 platforms added in 0.13.0 are opt-in.** Registering all
|
|
8
|
+
**The 22 platforms added in 0.13.0 are opt-in.** Registering all 426 tools puts ~495KB of tool definitions — roughly 90k tokens — into every session before you type anything. So the default is the platform set 0.12.x already had, plus Extract: 142 tools, 112KB. Upgrading never removes a tool you were using. Everything else is one env var away: see [Choosing which tools load](#choosing-which-tools-load).
|
|
9
9
|
|
|
10
10
|
## Remote MCP Server
|
|
11
11
|
|
|
@@ -207,7 +207,7 @@ Add to settings (`Cmd+,`):
|
|
|
207
207
|
|
|
208
208
|
## Choosing which tools load
|
|
209
209
|
|
|
210
|
-
Scavio exposes
|
|
210
|
+
Scavio exposes 426 tools. Loading all of them costs ~495KB of `tools/list` —
|
|
211
211
|
roughly 90k tokens of context in every session before the user has said anything,
|
|
212
212
|
and more tools than some clients will accept at all. So the server registers a
|
|
213
213
|
curated subset by default and lets you pick the rest. The sizes below are
|
|
@@ -218,7 +218,7 @@ measured, not estimated: `npm run toolslist` reproduces them.
|
|
|
218
218
|
| Value | Registers |
|
|
219
219
|
|-------|-----------|
|
|
220
220
|
| *(unset)* or `default` | Every platform 0.12.x had, plus `extract` — **142 tools, 112KB** |
|
|
221
|
-
| `all` | every platform — **
|
|
221
|
+
| `all` | every platform — **426 tools, ~495KB** |
|
|
222
222
|
| `extract,sec,g2` | just those platforms — 18 tools, 21KB |
|
|
223
223
|
| `default,zillow,metaads` | the default set plus two more — 148 tools, 120KB |
|
|
224
224
|
| `default,chatgpt,gemini` | the default set plus ChatGPT and Gemini — 144 tools, 115KB |
|
|
@@ -233,7 +233,7 @@ tells you to call to check the server works.
|
|
|
233
233
|
|
|
234
234
|
**Platform keys:** `extract`, `google`, `chatgpt`, `gemini`, `youtube`, `tiktok`, `instagram`,
|
|
235
235
|
`reddit`, `x`, `linkedin`, `threads`, `kuaishou`, `amazon`, `walmart`, `ebay`,
|
|
236
|
-
`target`, `homedepot`, `costco`, `heb`, `kroger`, `decathlon`, `specs`, `lowes`, `samsclub`, `canadiantire`, `dollargeneral`, `sephora`, `ulta`, `aldi`, `microcenter`, `walgreens`, `cvs`, `wholefoods`, `harborfreight`, `petsmart`, `petco`, `iherb`, `chewy`, `menards`, `nordstrom`, `nordstromrack`, `bestbuy`, `tcgplayer`, `vinted`, `macys`, `mercadolibre`, `tiktok-shop`, `booking`, `airbnb`,
|
|
236
|
+
`target`, `homedepot`, `costco`, `heb`, `kroger`, `decathlon`, `specs`, `lowes`, `samsclub`, `canadiantire`, `dollargeneral`, `sephora`, `ulta`, `aldi`, `microcenter`, `walgreens`, `cvs`, `wholefoods`, `harborfreight`, `petsmart`, `petco`, `iherb`, `chewy`, `menards`, `nordstrom`, `nordstromrack`, `bestbuy`, `tcgplayer`, `vinted`, `macys`, `saks`, `kohls`, `mercadolibre`, `tiktok-shop`, `booking`, `airbnb`,
|
|
237
237
|
`tripadvisor`, `yelp`, `zillow`, `redfin`, `realtor`, `rightmove`, `indeed`, `glassdoor`,
|
|
238
238
|
`appstore`, `googleplay`, `g2`, `capterra`, `trustpilot`, `googleads`, `metaads`, `sec`, `companieshouse`
|
|
239
239
|
|
|
@@ -1157,6 +1157,61 @@ Store availability is pickup and in-store flags, never unit counts: Macy's
|
|
|
1157
1157
|
publishes no quantities. A `store_id` comes from `get_macys_stores`. No coupon
|
|
1158
1158
|
codes, Q&A text or price history: to track prices, poll and store your own.
|
|
1159
1159
|
|
|
1160
|
+
### Saks Fifth Avenue
|
|
1161
|
+
|
|
1162
|
+
| Tool | Description |
|
|
1163
|
+
|------|-------------|
|
|
1164
|
+
| `search_saks` | Search saksfifthavenue.com (US), 24 grid positions per page: price, regular and sale price, percent off, badge, final-sale and clearance flags, returnable, limited inventory, promotions, review count, colors; filter by designer, color, size, any price range, on sale, new arrivals or any facet; sort by featured, best sellers, newest, price, sale first or designer A-Z; plus the facets with counts and price ranges |
|
|
1165
|
+
| `get_saks_product` | One product by id or URL, optionally one color + size: price block, final-sale / returnable / marketplace flags, promotions, colors and sizes with availability, every SKU with its online warehouse units, availability message and restock date, merchandising attributes, average rating and review count |
|
|
1166
|
+
| `get_saks_category` | Browse a category by its `/c/` path or URL, 24 per page, with the same filters and sorts as search, plus breadcrumbs |
|
|
1167
|
+
| `get_saks_brand` | Browse a designer's page by slug (from `get_saks_designers`) or URL, 24 per page, with the same filters and sorts as search |
|
|
1168
|
+
| `get_saks_deals` | Sale, Women's Clothing Sale, Men's Sale, Women's New Arrivals or Men's New Arrivals, 24 per page, with the same filters and sorts as search |
|
|
1169
|
+
| `get_saks_stores` | Saks stores near a ZIP or a point within 15-300 miles, with today's hours and a `pickup` flag for stores that offer in-store pickup |
|
|
1170
|
+
| `get_saks_store_availability` | Pickup availability of one variant sku at stores near a location: availability message, in stock, limited, and `units_at_store` when the site shows a count |
|
|
1171
|
+
| `get_saks_suggestions` | The search-box suggestions: result count, designers, categories (with paths for `get_saks_category`), up to 5 products and popular searches |
|
|
1172
|
+
| `get_saks_designers` | The A-Z designer index (about 1,200 designers) with the slugs `get_saks_brand` takes, optionally one letter |
|
|
1173
|
+
|
|
1174
|
+
Platform key `saks`. 2 credits per call, every tool. US site only, prices in
|
|
1175
|
+
USD. Search, category, brand and deals share one grid: 24 positions per page
|
|
1176
|
+
with `total`, `total_pages`, `start` and `next_start`. An editorial tile can
|
|
1177
|
+
take a grid position, so a page may carry 22-23 items: walk with `start` =
|
|
1178
|
+
the previous `next_start` to miss nothing (`page` also works). A keyword the
|
|
1179
|
+
site maps to a designer or category page returns `redirected_to`. Facet
|
|
1180
|
+
values feed the filters as listed: `size` takes the facet label ("Medium",
|
|
1181
|
+
not "M"). Store availability needs a VARIANT sku (a product's
|
|
1182
|
+
`variants[].sku`, or a product resolved with color + size); `units_at_store`
|
|
1183
|
+
is present only when the site shows a count, otherwise null. Rating and
|
|
1184
|
+
review count only: review text is not available. No clearance list, coupon
|
|
1185
|
+
codes, international prices or price history: to track designer sale
|
|
1186
|
+
prices, poll and store your own.
|
|
1187
|
+
|
|
1188
|
+
### Kohl's
|
|
1189
|
+
|
|
1190
|
+
| Tool | Description |
|
|
1191
|
+
|------|-------------|
|
|
1192
|
+
| `search_kohls` | Search kohls.com (US), 120 products per page: price, regular and sale price, price label (sale / clearance), percent off, with-code price and its offer codes, cart-only price flag, promotions, rating, review count, badges, Sephora and pickup / ship-to-store flags, sponsored flag; filter by brand, color, size, on sale, clearance or any facet value (price buckets included); sort by featured, new arrivals, best sellers, price, highest rated or percent off; plus the facets with counts and `corrected_query` |
|
|
1193
|
+
| `get_kohls_product` | One product by id or URL, optionally at one store: price block with with-code price and offer codes, Kohl's Cash earn and redeem windows, the public offers that apply, `dept`, every variant with sku, UPC, color, size, availability and online units, average rating, review count and recommended percent |
|
|
1194
|
+
| `get_kohls_category` | Browse a catalog listing by its path or URL (the path carries its `CN=` filter), 120 per page, with the same filters and sorts as search, plus breadcrumbs |
|
|
1195
|
+
| `get_kohls_brand` | Browse one brand by name or URL, 120 per page, with the same filters and sorts as search |
|
|
1196
|
+
| `get_kohls_deals` | Clearance (default), Sale, items that earn Kohl's Cash now, or Sephora at Kohl's, 120 per page, with the same filters and sorts as search |
|
|
1197
|
+
| `get_kohls_stores` | Kohl's stores near a ZIP, a city + state or a point within 1-100 miles (default 25): `store_id`, address, phone, weekly hours, badges (Sephora...) and services |
|
|
1198
|
+
| `get_kohls_store_availability` | Pickup stock of one SKU at every store within about 50 miles of a ZIP: `pickup_units` (a unit count), `stock_level`, ship-to-store units and window, store hours |
|
|
1199
|
+
| `get_kohls_suggestions` | The search-box suggestions: keyword completions, or matching products with `type: "products"` |
|
|
1200
|
+
| `get_kohls_coupons` | Today's public Kohl's coupon codes: code, description, end date, Kohl's Card-only flag, terms and eligible-products URLs |
|
|
1201
|
+
|
|
1202
|
+
Platform key `kohls`. 2 credits per call, except `get_kohls_stores` (1
|
|
1203
|
+
credit). US site only, prices in USD. Search, category, brand and deals share
|
|
1204
|
+
one grid: 120 products per page with `total` and `total_pages`; up to about 8
|
|
1205
|
+
sponsored items stay in the list, flagged `is_sponsored` and counted in
|
|
1206
|
+
`sponsored_count`. Facet value ids feed `filters` as returned; price is a
|
|
1207
|
+
facet bucket ("Price:$25 to $50"), not a free min / max. A category needs a
|
|
1208
|
+
kohls.com catalog path or URL that carries its `CN=` filter. Store
|
|
1209
|
+
availability takes a product's `variants[].sku` (and optionally its `dept`)
|
|
1210
|
+
and returns real pickup unit counts per store. `with_code_price` is the
|
|
1211
|
+
price after a public offer code, with the code. Rating and review count only:
|
|
1212
|
+
review text is not available. No price history, international sites, account
|
|
1213
|
+
offers or checkout: to track clearance prices, poll and store your own.
|
|
1214
|
+
|
|
1160
1215
|
### Kroger
|
|
1161
1216
|
|
|
1162
1217
|
| Tool | Description |
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const PLATFORM_KEYS: string[];
|
|
|
5
5
|
* What registers when SCAVIO_PLATFORMS is unset.
|
|
6
6
|
*
|
|
7
7
|
* Registering everything is not an option any more. The full surface is 408
|
|
8
|
-
* tools, which serialises to
|
|
8
|
+
* tools, which serialises to 495KB of tools/list (measured with
|
|
9
9
|
* `npm run toolslist`, not estimated) — roughly 90k tokens pushed into the
|
|
10
10
|
* context of EVERY session before the user has typed anything, and past the
|
|
11
11
|
* hard tool-count ceiling some clients enforce. The default set below is 142
|
|
@@ -27,7 +27,7 @@ export declare const DEFAULT_PLATFORMS: string[];
|
|
|
27
27
|
* Turn a SCAVIO_PLATFORMS value into the canonical platform keys to register.
|
|
28
28
|
*
|
|
29
29
|
* Accepts a comma-separated list of platform keys, plus three keywords:
|
|
30
|
-
* all — every platform (
|
|
30
|
+
* all — every platform (426 tools)
|
|
31
31
|
* default — expands to DEFAULT_PLATFORMS, so `default,sec,g2` is additive
|
|
32
32
|
* none — no platform tools at all, leaving only get_usage
|
|
33
33
|
*
|
package/dist/tools/index.js
CHANGED
|
@@ -43,6 +43,8 @@ import { registerBestBuyTools } from "./bestbuy.js";
|
|
|
43
43
|
import { registerTcgplayerTools } from "./tcgplayer.js";
|
|
44
44
|
import { registerVintedTools } from "./vinted.js";
|
|
45
45
|
import { registerMacysTools } from "./macys.js";
|
|
46
|
+
import { registerSaksTools } from "./saks.js";
|
|
47
|
+
import { registerKohlsTools } from "./kohls.js";
|
|
46
48
|
import { registerMercadoLibreTools } from "./mercadolibre.js";
|
|
47
49
|
import { registerTiktokShopTools } from "./tiktok-shop.js";
|
|
48
50
|
import { registerBookingTools } from "./booking.js";
|
|
@@ -129,6 +131,8 @@ const PLATFORMS = {
|
|
|
129
131
|
tcgplayer: registerTcgplayerTools,
|
|
130
132
|
vinted: registerVintedTools,
|
|
131
133
|
macys: registerMacysTools,
|
|
134
|
+
saks: registerSaksTools,
|
|
135
|
+
kohls: registerKohlsTools,
|
|
132
136
|
mercadolibre: registerMercadoLibreTools,
|
|
133
137
|
"tiktok-shop": registerTiktokShopTools,
|
|
134
138
|
// Travel and local
|
|
@@ -164,7 +168,7 @@ export const PLATFORM_KEYS = Object.keys(PLATFORMS);
|
|
|
164
168
|
* What registers when SCAVIO_PLATFORMS is unset.
|
|
165
169
|
*
|
|
166
170
|
* Registering everything is not an option any more. The full surface is 408
|
|
167
|
-
* tools, which serialises to
|
|
171
|
+
* tools, which serialises to 495KB of tools/list (measured with
|
|
168
172
|
* `npm run toolslist`, not estimated) — roughly 90k tokens pushed into the
|
|
169
173
|
* context of EVERY session before the user has typed anything, and past the
|
|
170
174
|
* hard tool-count ceiling some clients enforce. The default set below is 142
|
|
@@ -221,7 +225,7 @@ function warnOnce(message) {
|
|
|
221
225
|
* Turn a SCAVIO_PLATFORMS value into the canonical platform keys to register.
|
|
222
226
|
*
|
|
223
227
|
* Accepts a comma-separated list of platform keys, plus three keywords:
|
|
224
|
-
* all — every platform (
|
|
228
|
+
* all — every platform (426 tools)
|
|
225
229
|
* default — expands to DEFAULT_PLATFORMS, so `default,sec,g2` is additive
|
|
226
230
|
* none — no platform tools at all, leaving only get_usage
|
|
227
231
|
*
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,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EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;gBACtG,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;gBAC9B,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,qBAAqB,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC9G,OAAO,UAAU,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAiB,EACjB,SAA6B,EAC7B,eAAmC,GAAG,CAAC,gBAAgB;IAEvD,MAAM,SAAS,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,SAAS;QAAE,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAClE,iBAAiB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACxC,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleApiError } from "../lib/tool-error.js";
|
|
3
|
+
import { trimResponse } from "../lib/trim-response.js";
|
|
4
|
+
// Shapes mirror backend/src/routes/kohls.ts (kohls.com, US only, USD).
|
|
5
|
+
// Cross-field rules the backend enforces and zod here does not: product takes
|
|
6
|
+
// product_id or url; category takes path or url; brand takes brand or url;
|
|
7
|
+
// stores take one location (zip, city + state, or lat + lng). No zod
|
|
8
|
+
// `.default()`: the MCP SDK would post a defaulted field on every call.
|
|
9
|
+
const SORTS = ["featured", "new_arrivals", "best_sellers", "price_low_to_high", "price_high_to_low", "highest_rated", "percent_off"];
|
|
10
|
+
const DEAL_TYPES = ["clearance", "sale", "kohls_cash", "sephora"];
|
|
11
|
+
const SUGGESTION_TYPES = ["terms", "products"];
|
|
12
|
+
const ITEM_FIELDS = "id, title, URL, image, price (price_max for a range), regular_price, sale_price, price_label (sale, clearance, clearance+regular), on_sale, is_clearance, percent_off, price_suppressed with price_note (Kohl's shows some prices only in the cart), with_code_price (the price after a public offer code) with with_code_offer_codes, promotions (BOGO...), rating, review_count, badges (best_seller, top_rated...), colors, is_sephora, coupon_eligible, available_online / available_pickup / available_ship_to_store, and is_sponsored";
|
|
13
|
+
const GRID_SHORT = "120 products per page (plus any sponsored items, kept and flagged is_sponsored) with the same item fields, facets and totals as search_kohls";
|
|
14
|
+
const GRID = `120 products per page, each with ${ITEM_FIELDS}. Sponsored placements (up to about 8) stay in the list, flagged is_sponsored and counted in sponsored_count. Also returns total, page, total_pages, the sort applied, applied_filters and every facet (id, label and values with their value id, count and a selected flag; any value id works in filters; price is a bucket such as "Price:$25 to $50", there is no free min / max). Average rating and review count only: review text is not available. Prices in USD`;
|
|
15
|
+
const textId = (re) => z.union([z.number().int().positive(), z.string().regex(re)]);
|
|
16
|
+
const zip = () => z.union([z.string().regex(/^\d{5}(-\d{4})?$/), z.number().int().min(0).max(99999)]);
|
|
17
|
+
const brandFilter = () => z.string().min(1).max(100).optional()
|
|
18
|
+
.describe("Only this brand, as the Brand facet lists it, e.g. \"Levi's\", \"Hamilton Beach\", \"BLACK+DECKER\".");
|
|
19
|
+
const gridFields = {
|
|
20
|
+
page: z.number().int().min(1).max(500).optional()
|
|
21
|
+
.describe("Results page, 1-based (120 products per page). Defaults to 1."),
|
|
22
|
+
sort: z.enum(SORTS).optional()
|
|
23
|
+
.describe("featured (default), new_arrivals, best_sellers, price_low_to_high, price_high_to_low, highest_rated or percent_off."),
|
|
24
|
+
color: z.string().min(1).max(100).optional()
|
|
25
|
+
.describe("Only this color, as the Color facet lists it (Black, Blue, Beig/khaki...)."),
|
|
26
|
+
size: z.string().min(1).max(100).optional()
|
|
27
|
+
.describe("Only this size, as the Size facet lists it (M, 32X30, 10...)."),
|
|
28
|
+
on_sale: z.boolean().optional()
|
|
29
|
+
.describe("Only items on sale."),
|
|
30
|
+
clearance: z.boolean().optional()
|
|
31
|
+
.describe("Only clearance items."),
|
|
32
|
+
filters: z.union([z.string().min(3).max(300), z.array(z.string().min(3).max(300)).max(10)]).optional()
|
|
33
|
+
.describe("Any facet value id from a previous response's facets[].values[].value, e.g. \"Gender:Womens\", \"Price:%2425%20to%20%2450\" (price buckets), \"TopRated:4\", \"InStoreOnline:Pick%20Up%20in%20Store\". A list combines facets (AND). Unencoded values work too (\"Price:$25 to $50\")."),
|
|
34
|
+
};
|
|
35
|
+
export function registerKohlsTools(server, getClient) {
|
|
36
|
+
const post = (path) => async (params) => {
|
|
37
|
+
try {
|
|
38
|
+
const data = await getClient().post(`/api/v1/kohls/${path}`, params);
|
|
39
|
+
return trimResponse(data);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
return handleApiError(err);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
server.tool("search_kohls", `Search kohls.com (US) by keyword, filtered by brand, color, size, on sale, clearance and any facet value (price buckets, gender, rating, store pickup...), sorted by featured (default), new arrivals, best sellers, price, highest rated or percent off. ${GRID}. When the site autocorrects the keyword, corrected_query says so. Use an item's id with get_kohls_product. 2 credits.`, {
|
|
46
|
+
query: z.string().min(1).max(200)
|
|
47
|
+
.describe("Search keywords, e.g. 'jeans'."),
|
|
48
|
+
brand: brandFilter(),
|
|
49
|
+
...gridFields,
|
|
50
|
+
}, post("search"));
|
|
51
|
+
server.tool("get_kohls_product", `One kohls.com product by id or URL: title, brand, status, dept (what get_kohls_store_availability can take), breadcrumbs, Sephora at Kohl's flag, average rating, review_count and recommended_percent (review text is not available), is_new / best_seller / top_rated, badges, description, details, ingredients (beauty), images, videos, return policy, the price block (regular, sale, sale_status, percent_off, lowest_applicable_price, price_suppressed with price_note for cart-only prices, with_code_price with its savings and offer codes), kohls_cash (earn and redeem windows, amount earned) when the product has it, the public offers that apply (code, description, terms, start and end dates), pickup / ship-to-store eligibility, online_units, and every variant: sku, UPC, color, size, availability, online_units, max_per_order, price, sale price, with-code price, Kohl's Cash earned and pickup eligibility. Add store_id (from get_kohls_stores) for that store's availability and in-store price on each variant. A variants[].sku is what get_kohls_store_availability takes. An unknown id is a 404 (it can take about 20 seconds). 2 credits.`, {
|
|
52
|
+
product_id: textId(/^\d{4,10}$/).optional()
|
|
53
|
+
.describe("Kohl's product id: a search result's id, the number after prd- in a product URL, e.g. '6251213'."),
|
|
54
|
+
url: z.string().min(1).max(600).optional()
|
|
55
|
+
.describe("A kohls.com product URL (its prd-<id> is used). Alternative to product_id."),
|
|
56
|
+
store_id: textId(/^\d{1,5}$/).optional()
|
|
57
|
+
.describe("A Kohl's store number (get_kohls_stores stores[].store_id), e.g. '725': adds that store's availability and in-store price to every variant."),
|
|
58
|
+
}, post("product"));
|
|
59
|
+
server.tool("get_kohls_category", `Browse one Kohl's catalog listing by its path or URL (Small Appliances, Women's Clothing, Men's Shoes...), with the same filters and sorts as search_kohls. The path must carry its CN=... filter, the way kohls.com category links and a product's breadcrumbs[].url do. ${GRID_SHORT}. Also returns the category's name, breadcrumbs, path and URL. 2 credits.`, {
|
|
60
|
+
path: z.string().min(1).max(600).optional()
|
|
61
|
+
.describe("A Kohl's catalog path with its CN=... part, e.g. '/catalog/small-appliances-kitchen-dining.jsp?CN=Category:Small%20Appliances+Department:Kitchen%20%26%20Dining'."),
|
|
62
|
+
url: z.string().min(1).max(800).optional()
|
|
63
|
+
.describe("A kohls.com catalog URL. Its CN facets define the listing; a sort or page in the URL is kept."),
|
|
64
|
+
brand: brandFilter(),
|
|
65
|
+
...gridFields,
|
|
66
|
+
}, post("category"));
|
|
67
|
+
server.tool("get_kohls_brand", `Browse one brand at Kohl's by name or URL (Nike, Hamilton Beach, Levi's...), with the same filters and sorts as search_kohls (except brand). ${GRID_SHORT}. Also returns the brand's name, facet value and URL. An unknown brand is a 404. 2 credits.`, {
|
|
68
|
+
brand: z.string().min(1).max(100).optional()
|
|
69
|
+
.describe("A brand name as Kohl's lists it in the Brand facet, e.g. 'Hamilton Beach', 'Nike', \"Levi's\"."),
|
|
70
|
+
url: z.string().min(1).max(800).optional()
|
|
71
|
+
.describe("A kohls.com brand page URL (its CN carries Brand:...)."),
|
|
72
|
+
...gridFields,
|
|
73
|
+
}, post("brand"));
|
|
74
|
+
server.tool("get_kohls_deals", `Kohl's deal listings: Clearance (default), Sale, items that earn Kohl's Cash right now, or Sephora at Kohl's, with the same filters and sorts as search_kohls. ${GRID_SHORT}. To track clearance prices over time, poll and store your own: there is no price history. 2 credits.`, {
|
|
75
|
+
type: z.enum(DEAL_TYPES).optional()
|
|
76
|
+
.describe("clearance (default), sale, kohls_cash (items that earn Kohl's Cash now) or sephora (Sephora at Kohl's)."),
|
|
77
|
+
brand: brandFilter(),
|
|
78
|
+
...gridFields,
|
|
79
|
+
}, post("deals"));
|
|
80
|
+
server.tool("get_kohls_stores", `Kohl's stores near a US ZIP code, a city + state or a point (lat + lng), within 25 miles by default (up to 100): store_id (what get_kohls_product store_id takes), name, address, city, state, ZIP, phone, lat / lng, distance in miles, weekly opening hours with the UTC offset, store badges (Sephora, Fine Jewelry, Lands' End...), services (In-Store Pickup, Amazon Returns...) and the store page URL. Pass one location. 1 credit.`, {
|
|
81
|
+
zip: zip().optional()
|
|
82
|
+
.describe("US ZIP code to search around, e.g. '60601'."),
|
|
83
|
+
city: z.string().min(1).max(60).optional()
|
|
84
|
+
.describe("City (with state), instead of zip, e.g. 'Austin'."),
|
|
85
|
+
state: z.string().length(2).optional()
|
|
86
|
+
.describe("2-letter state code (with city), e.g. 'TX'."),
|
|
87
|
+
lat: z.number().min(-90).max(90).optional()
|
|
88
|
+
.describe("Latitude (with lng), instead of zip."),
|
|
89
|
+
lng: z.number().min(-180).max(180).optional()
|
|
90
|
+
.describe("Longitude (with lat)."),
|
|
91
|
+
radius: z.number().int().min(1).max(100).optional()
|
|
92
|
+
.describe("Search radius in miles, 1-100. Defaults to 25."),
|
|
93
|
+
}, post("stores"));
|
|
94
|
+
server.tool("get_kohls_store_availability", `Pickup stock for one Kohl's SKU at every store within about 50 miles of a US ZIP code, with unit counts: per store pickup_units, stock_level (In Stock, Low Stock, Out of Stock), in_stock, ship_to_store_units with the ship-to-store pickup window, pickup and ship-to-store eligibility, clearance and Sephora flags, and the store's address, phone, distance and hours for the week. Also returns how many stores have it (in_stock_count) and total_pickup_units. Take sku (variants[].sku) and dept from get_kohls_product. 2 credits.`, {
|
|
95
|
+
sku: textId(/^\d{5,12}$/)
|
|
96
|
+
.describe("A Kohl's SKU code: a product's variants[].sku, e.g. '73519108'."),
|
|
97
|
+
dept: z.union([z.string().regex(/^\d{1,4}$/), z.number().int().min(0).max(9999)]).optional()
|
|
98
|
+
.describe("The product's department code (get_kohls_product dept, e.g. '063')."),
|
|
99
|
+
zip: zip()
|
|
100
|
+
.describe("US ZIP code: stores within about 50 miles are listed, e.g. '10001'."),
|
|
101
|
+
}, post("store-availability"));
|
|
102
|
+
server.tool("get_kohls_suggestions", `The kohls.com search-box suggestions for a partial query: keyword completions (type terms, default), or matching products with id, title, URL and image (type products). Useful for keyword research and for building queries for search_kohls. 2 credits.`, {
|
|
103
|
+
query: z.string().min(1).max(100)
|
|
104
|
+
.describe("What the shopper has typed so far, e.g. 'coff'."),
|
|
105
|
+
type: z.enum(SUGGESTION_TYPES).optional()
|
|
106
|
+
.describe("terms (default): keyword completions; products: matching products."),
|
|
107
|
+
}, post("suggestions"));
|
|
108
|
+
server.tool("get_kohls_coupons", `Today's public Kohl's coupon codes: code, description (the offer, minimum purchase and exclusions as stated), end date, whether it needs a Kohl's Card (requires_kohls_card), the terms page URL and the URL of the eligible products. Public codes only, no account offers or Kohl's Rewards balances. No parameters. 2 credits.`, {}, post("coupons"));
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=kohls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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G,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;aACzF,QAAQ,CAAC,qEAAqE,CAAC;QAClF,GAAG,EAAE,GAAG,EAAE;aACP,QAAQ,CAAC,qEAAqE,CAAC;KACnF,EACD,IAAI,CAAC,oBAAoB,CAAC,CAC3B,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,4PAA4P,EAC5P;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;aAC9B,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;aACtC,QAAQ,CAAC,oEAAoE,CAAC;KAClF,EACD,IAAI,CAAC,aAAa,CAAC,CACpB,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,mUAAmU,EACnU,EAAE,EACF,IAAI,CAAC,SAAS,CAAC,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { handleApiError } from "../lib/tool-error.js";
|
|
3
|
+
import { trimResponse } from "../lib/trim-response.js";
|
|
4
|
+
// Shapes mirror backend/src/routes/saks.ts (saksfifthavenue.com, US only, USD).
|
|
5
|
+
// Cross-field rules the backend enforces and zod here does not: product takes
|
|
6
|
+
// product_id or url; category takes path or url; brand takes brand or url;
|
|
7
|
+
// stores and store availability take one location (zip, or lat + lng). No zod
|
|
8
|
+
// `.default()`: the MCP SDK would post a defaulted field on every call.
|
|
9
|
+
const SORTS = ["featured", "best_sellers", "newest", "price_high_to_low", "price_low_to_high", "sale_first", "brand_az"];
|
|
10
|
+
const DEAL_TYPES = ["sale", "womens_sale", "mens_sale", "womens_new_arrivals", "mens_new_arrivals"];
|
|
11
|
+
const ITEM_FIELDS = "id (variant_id too when the tile shows one variant), title, brand, URL, image, price (price_max when the item sells at a range), regular price, sale price, percent off, on-sale flag, review count, badge (Best Seller, Exclusive, Runway Look...), is_final_sale and is_clearance (null when the tile leaves them blank; get_saks_product is authoritative), returnable, limited_inventory, promotions, product_type and colors";
|
|
12
|
+
const GRID_SHORT = "24 grid positions per page with the same item fields, facets, totals and start / next_start paging as search_saks";
|
|
13
|
+
const GRID = `24 grid positions per page, each item with ${ITEM_FIELDS}. Also returns total, page, total_pages, start and next_start (pass next_start as start for the next page: an editorial tile can take a grid position, so a page may carry 22-23 items), the sort applied, the facets (id, label and values with counts; any value works in filters), price_ranges and applied_filters. Review count only on the grid: review text is not available. Prices in USD`;
|
|
14
|
+
const numericId = () => z.union([z.number().int().positive(), z.string().regex(/^\d{6,14}$/)]);
|
|
15
|
+
const textOrList = (description) => z.union([z.string().min(1).max(100), z.array(z.string().min(1).max(100)).max(20)]).optional().describe(description);
|
|
16
|
+
const brandFilter = () => textOrList("Only these designers, spelled as the brand facet lists them, e.g. \"Prada\" or [\"Prada\", \"ALICE + OLIVIA\"]. A list matches any of them.");
|
|
17
|
+
const gridFields = {
|
|
18
|
+
page: z.number().int().min(1).max(500).optional()
|
|
19
|
+
.describe("Results page, 1-based (24 grid positions per page). Defaults to 1."),
|
|
20
|
+
start: z.number().int().min(0).max(12000).optional()
|
|
21
|
+
.describe("Item offset, instead of page: pass a previous response's next_start to walk every item without gaps."),
|
|
22
|
+
sort: z.enum(SORTS).optional()
|
|
23
|
+
.describe("featured (default, the site's own order), best_sellers, newest, price_high_to_low, price_low_to_high, sale_first or brand_az."),
|
|
24
|
+
color: textOrList("Only these colors, as the colorRefinement facet lists them (Black, Blue, Red...). A list matches any of them."),
|
|
25
|
+
size: textOrList("Only these sizes, spelled as the sizeRefinement facet LABEL lists them (\"Medium\", \"X-Small, 0\"; \"M\" matches nothing). A list matches any of them."),
|
|
26
|
+
min_price: z.number().min(0).optional()
|
|
27
|
+
.describe("Minimum price in USD. Any bound works, not only the site's price buckets."),
|
|
28
|
+
max_price: z.number().min(0).optional()
|
|
29
|
+
.describe("Maximum price in USD."),
|
|
30
|
+
on_sale: z.boolean().optional()
|
|
31
|
+
.describe("Only items on sale."),
|
|
32
|
+
new_arrivals: z.boolean().optional()
|
|
33
|
+
.describe("Only new arrivals."),
|
|
34
|
+
filters: z.record(z.string(), z.union([z.string().min(1).max(100), z.array(z.string().min(1).max(100)).max(20)])).optional()
|
|
35
|
+
.describe("Any other facet from a previous response's facets: its id to one value or a list, e.g. {\"refGender\": \"Women's\", \"refMaterial\": \"Cashmere\"}."),
|
|
36
|
+
};
|
|
37
|
+
const locationFields = {
|
|
38
|
+
zip: z.string().regex(/^\d{5}(-\d{4})?$/).optional()
|
|
39
|
+
.describe("US ZIP code to search around, e.g. '10022'."),
|
|
40
|
+
lat: z.number().min(-90).max(90).optional()
|
|
41
|
+
.describe("Latitude (with lng), instead of zip."),
|
|
42
|
+
lng: z.number().min(-180).max(180).optional()
|
|
43
|
+
.describe("Longitude (with lat)."),
|
|
44
|
+
radius: z.union([z.literal(15), z.literal(30), z.literal(50), z.literal(100), z.literal(300)]).optional()
|
|
45
|
+
.describe("Search radius in miles: 15, 30, 50, 100 or 300. Defaults to 50."),
|
|
46
|
+
};
|
|
47
|
+
export function registerSaksTools(server, getClient) {
|
|
48
|
+
const post = (path) => async (params) => {
|
|
49
|
+
try {
|
|
50
|
+
const data = await getClient().post(`/api/v1/saks/${path}`, params);
|
|
51
|
+
return trimResponse(data);
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
return handleApiError(err);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
server.tool("search_saks", `Search saksfifthavenue.com (US) by keyword, filtered by designer, color, size (the facet label, e.g. Medium), any price range, on sale, new arrivals and any other facet, sorted by featured (default), best sellers, newest, price, sale first or designer A-Z. ${GRID}. A keyword the site sends to a designer or category page is answered from that page, named in redirected_to. Use an item's id with get_saks_product. 2 credits.`, {
|
|
58
|
+
query: z.string().min(1).max(200)
|
|
59
|
+
.describe("Search keywords, e.g. 'coat'."),
|
|
60
|
+
brand: brandFilter(),
|
|
61
|
+
...gridFields,
|
|
62
|
+
}, post("search"));
|
|
63
|
+
server.tool("get_saks_product", `One saksfifthavenue.com product by id or URL: title, brand, type (master or variant), UPC (for a variant), price, price_max, regular and sale price, percent off, on-sale flag, is_new / is_sale / is_clearance / is_final_sale, badge, returnable, promotions, description, style code, images, colors and sizes (each with availability IN_STOCK / NOT_AVAILABLE, selectable and waitlist), every SKU in variants[] with its online warehouse unit count, in-stock and available counts, availability (units available to sell, message such as Limited Inventory, in_stock_date), available_in_store, marketplace, drop_ship, preorder, merchandising attributes (category, gender, material, length...), the average star rating and review_count. Review text is not available. Add color + size (or pass a variant sku) to resolve one variant: its sku is id, with its UPC and stock. A variants[].sku is what get_saks_store_availability takes. An unknown id is a 404. 2 credits.`, {
|
|
64
|
+
product_id: numericId().optional()
|
|
65
|
+
.describe("Saks product id: a search result's id (the number at the end of a product URL), or a variant sku, e.g. '0400019127312'."),
|
|
66
|
+
url: z.string().min(1).max(600).optional()
|
|
67
|
+
.describe("A saksfifthavenue.com product URL (its trailing id is used; a color / size it selects is kept). Alternative to product_id."),
|
|
68
|
+
color: z.string().min(1).max(100).optional()
|
|
69
|
+
.describe("Pick one color (a colors[].value), e.g. 'BLUE OPAL'."),
|
|
70
|
+
size: z.string().min(1).max(100).optional()
|
|
71
|
+
.describe("Pick one size (a sizes[].value). With color, the answer is that variant."),
|
|
72
|
+
}, post("product"));
|
|
73
|
+
server.tool("get_saks_category", `Browse one Saks category by its /c/ path or URL (women's dresses, men's sweaters, beauty...), with the same filters and sorts as search_saks. ${GRID_SHORT}. Also returns the category's name, path, URL and breadcrumbs. An unknown path is a 404. 2 credits.`, {
|
|
74
|
+
path: z.string().min(1).max(300).optional()
|
|
75
|
+
.describe("A Saks category path (/c/...): from a category URL, a get_saks_suggestions categories[].path or a breadcrumb, e.g. '/c/women-s-apparel/dresses'."),
|
|
76
|
+
url: z.string().min(1).max(600).optional()
|
|
77
|
+
.describe("A saksfifthavenue.com category URL. Filters, sort and page already in the URL are kept."),
|
|
78
|
+
brand: brandFilter(),
|
|
79
|
+
...gridFields,
|
|
80
|
+
}, post("category"));
|
|
81
|
+
server.tool("get_saks_brand", `Browse one designer's Saks page by slug (from get_saks_designers) or URL, with the same filters and sorts as search_saks (except brand). ${GRID_SHORT}. Also returns the brand's name, slug and URL. An unknown slug is a 404. 2 credits.`, {
|
|
82
|
+
brand: z.string().min(1).max(120).optional()
|
|
83
|
+
.describe("A designer slug from get_saks_designers, e.g. 'gucci', 'chloé', 'alice-olivia'. A plain name is slugified."),
|
|
84
|
+
url: z.string().min(1).max(600).optional()
|
|
85
|
+
.describe("A saksfifthavenue.com /brand/ URL. Filters, sort and page already in the URL are kept."),
|
|
86
|
+
...gridFields,
|
|
87
|
+
}, post("brand"));
|
|
88
|
+
server.tool("get_saks_deals", `Saks sale and new-arrival listings: all Sale (default), Women's Clothing Sale, Men's Sale, Women's New Arrivals or Men's New Arrivals, with the same filters and sorts as search_saks. ${GRID_SHORT}. Saks has no clearance or final-sale listing (items carry is_clearance / is_final_sale flags). 2 credits.`, {
|
|
89
|
+
type: z.enum(DEAL_TYPES).optional()
|
|
90
|
+
.describe("sale (all sale, default), womens_sale (women's clothing), mens_sale, womens_new_arrivals or mens_new_arrivals."),
|
|
91
|
+
brand: brandFilter(),
|
|
92
|
+
...gridFields,
|
|
93
|
+
}, post("deals"));
|
|
94
|
+
server.tool("get_saks_stores", `Saks Fifth Avenue stores near a US ZIP code or a point (lat + lng), within 15 / 30 / 50 / 100 / 300 miles (default 50): store_id, name, address, city, state, ZIP, lat / lng, distance in miles (pickup stores), today's opening and closing times, hours as listed, closed flag, and pickup (true for stores that offer in-store pickup; other Saks locations are listed with pickup false). Pass one location. 2 credits.`, {
|
|
95
|
+
...locationFields,
|
|
96
|
+
}, post("stores"));
|
|
97
|
+
server.tool("get_saks_store_availability", `Can one Saks variant (sku) be picked up near a US ZIP code or a point? For each pickup store: the site's availability message (In Stock, Limited Inventory, Not Available), in_stock, limited, units_at_store when the site gives a count (it does for stores that have the item; otherwise null), and the store's address, distance and today's hours. Needs a variant sku: take it from get_saks_product variants[].sku, or from get_saks_product with color + size. Pass one location. 2 credits.`, {
|
|
98
|
+
sku: numericId()
|
|
99
|
+
.describe("A variant sku: a product's variants[].sku, or a product's id after picking color + size, e.g. '10781654'."),
|
|
100
|
+
...locationFields,
|
|
101
|
+
}, post("store-availability"));
|
|
102
|
+
server.tool("get_saks_suggestions", `The saksfifthavenue.com search-box suggestions for a partial query: the result count, matching designers, suggested categories (name, parent, path for get_saks_category), up to 5 featured products (id, title, brand, URL, image) and the site's popular searches. Useful for keyword research and for building queries for search_saks. 2 credits.`, {
|
|
103
|
+
query: z.string().min(1).max(100)
|
|
104
|
+
.describe("What the shopper has typed so far, e.g. 'gucci'."),
|
|
105
|
+
}, post("suggestions"));
|
|
106
|
+
server.tool("get_saks_designers", `The Saks A-Z designer index (about 1,200 designers): name, slug (what get_saks_brand takes), URL and letter, optionally only one letter. 2 credits.`, {
|
|
107
|
+
letter: z.string().regex(/^[A-Za-z#]$/).optional()
|
|
108
|
+
.describe("Only designers under this letter (A-Z, or '#' for names starting with a digit)."),
|
|
109
|
+
}, post("designers"));
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=saks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saks.js","sourceRoot":"","sources":["../../src/tools/saks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,gFAAgF;AAChF,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,wEAAwE;AAExE,MAAM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CAAC,IAAI,CACT,sBAAsB,EACtB,uVAAuV,EACvV;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;aAC9B,QAAQ,CAAC,kDAAkD,CAAC;KAChE,EACD,IAAI,CAAC,aAAa,CAAC,CACpB,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,qJAAqJ,EACrJ;QACE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;aAC/C,QAAQ,CAAC,iFAAiF,CAAC;KAC/F,EACD,IAAI,CAAC,WAAW,CAAC,CAClB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scavio/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"mcpName": "io.github.scavio-ai/scavio-mcp",
|
|
5
|
-
"description": "MCP server connecting AI agents to Scavio: web search, page extraction, and structured e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing data.
|
|
5
|
+
"description": "MCP server connecting AI agents to Scavio: web search, page extraction, and structured e-commerce, social, travel, jobs, real-estate, app-store, ad-library and company-filing data. 426 tools across 66 platforms plus Extract, site map, crawl and batch extraction, one API key.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "Scavio",
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"second-hand",
|
|
54
54
|
"macys",
|
|
55
55
|
"macys-api",
|
|
56
|
+
"saks",
|
|
57
|
+
"saks-fifth-avenue",
|
|
58
|
+
"saks-api",
|
|
59
|
+
"kohls",
|
|
60
|
+
"kohls-api",
|
|
61
|
+
"kohls-clearance",
|
|
56
62
|
"mercadolibre",
|
|
57
63
|
"mercado-libre",
|
|
58
64
|
"tiktok",
|