@wix/agent-skills 1.18.0 → 1.18.2
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/package.json +1 -1
- package/skills/wix-app/SKILL.md +4 -4
- package/skills/wix-app/references/APP_VALIDATION.md +7 -33
- package/skills/wix-app/references/DASHBOARD_PAGE.md +18 -14
- package/skills/wix-app/references/EDITOR_REACT_COMPONENT.md +75 -92
- package/skills/wix-app/references/WIX_PATTERNS_DOCS.md +23 -26
- package/skills/wix-app/references/dashboard-page/COLLECTION_TOOLKIT.md +7 -6
- package/skills/wix-app/references/dashboard-page/ENTITY_PAGE_TOOLKIT.md +71 -4
- package/skills/wix-app/references/dashboard-page/PATTERNS_BUNDLE_READING.md +67 -7
- package/skills/wix-app/references/editor-react-component/ACCESSIBILITY.md +1 -1
- package/skills/wix-app/references/editor-react-component/ANIMATED-COMPONENTS.md +9 -6
- package/skills/wix-app/references/editor-react-component/COMPONENT-CONTRACT.md +59 -89
- package/skills/wix-app/references/editor-react-component/COMPONENT-PREVIEW.md +23 -4
- package/skills/wix-app/references/editor-react-component/CSS-GUIDELINES.md +29 -14
- package/skills/wix-base44-connector/SKILL.md +168 -48
- package/skills/wix-base44-connector/scripts/{utils.js → utils.cjs} +69 -48
- package/skills/wix-docs/SKILL.md +109 -111
- package/skills/wix-docs/references/API_SPEC_SEARCH.md +35 -23
- package/skills/wix-docs/references/CALLING.md +91 -0
- package/skills/wix-docs/references/EXTRACTING.md +5 -3
- package/skills/wix-headless/references/DOC_DISCOVERY.md +9 -3
- package/skills/wix-headless/references/inline-recipes/setup-forms.md +57 -10
- package/skills/wix-manage/SKILL.md +106 -92
- package/skills/wix-manage/references/dashboard-navigation/routes.json +12 -52
- package/skills/wix-manage/references/ecommerce/shipping/ecom-shipping-api.md +0 -2
- package/skills/wix-manage/references/forms/create-form.md +272 -184
- package/skills/wix-manage/references/forms/forms-dashboard-navigation.md +13 -10
- package/skills/wix-manage/references/forms/update-form.md +122 -0
- package/skills/wix-manage/references/media/generate-image-with-ai.md +86 -0
- package/skills/wix-manage/references/seo/manage-content-plan.md +247 -0
- package/skills/wix-manage/references/seo/manage-seo-tags.md +59 -6
- package/skills/wix-manage/references/stores/change-store-currency.md +10 -0
- package/skills/wix-manage/references/stores/create-product-catalog-v3.md +16 -1
- package/skills/wix-manage/references/stores/update-product-with-options.md +9 -0
- package/skills/wix-vibe-headless/SKILL.md +17 -18
- package/skills/wix-vibe-headless/install/pin-agents-md.cjs +1 -1
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed-with-install.md +118 -0
- package/skills/wix-vibe-headless/platforms/base44-ecom-light-seed.md +55 -62
- package/skills/wix-vibe-headless/platforms/base44-ecom-light.md +31 -29
- package/skills/wix-vibe-headless/platforms/base44.md +12 -5
- package/skills/wix-vibe-headless/platforms/generic.md +13 -12
- package/skills/wix-vibe-headless/references/blog/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/blog/seed/SEED.md +4 -8
- package/skills/wix-vibe-headless/references/blog/seed/{seed-blog.js → seed-blog.cjs} +2 -3
- package/skills/wix-vibe-headless/references/bookings/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/bookings/seed/SEED.md +5 -9
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-bookings.js → seed-bookings.cjs} +2 -2
- package/skills/wix-vibe-headless/references/bookings/seed/{seed-rentals.js → seed-rentals.cjs} +3 -3
- package/skills/wix-vibe-headless/references/cms/INSTRUCTIONS.md +1 -1
- package/skills/wix-vibe-headless/references/cms/seed/SEED.md +2 -2
- package/skills/wix-vibe-headless/references/events/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/events/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/events/seed/{seed-events.js → seed-events.cjs} +2 -2
- package/skills/wix-vibe-headless/references/forms/INSTRUCTIONS.md +24 -7
- package/skills/wix-vibe-headless/references/forms/seed/SEED.md +91 -17
- package/skills/wix-vibe-headless/references/members/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/members/seed/SEED.md +2 -3
- package/skills/wix-vibe-headless/references/portfolio/INSTRUCTIONS.md +4 -13
- package/skills/wix-vibe-headless/references/portfolio/app/components/ProjectMedia.jsx +1 -1
- package/skills/wix-vibe-headless/references/portfolio/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/portfolio/seed/{seed-portfolio.js → seed-portfolio.cjs} +2 -2
- package/skills/wix-vibe-headless/references/pricing-plans/INSTRUCTIONS.md +5 -14
- package/skills/wix-vibe-headless/references/pricing-plans/app/components/OrderCard.jsx +1 -1
- package/skills/wix-vibe-headless/references/pricing-plans/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/pricing-plans/seed/{seed-pricing-plans.js → seed-pricing-plans.cjs} +2 -2
- package/skills/wix-vibe-headless/references/restaurants/INSTRUCTIONS.md +5 -15
- package/skills/wix-vibe-headless/references/restaurants/seed/SEED.md +3 -7
- package/skills/wix-vibe-headless/references/restaurants/seed/{seed-restaurants.js → seed-restaurants.cjs} +2 -2
- package/skills/wix-vibe-headless/references/storefront/INSTRUCTIONS.md +359 -327
- package/skills/wix-vibe-headless/references/storefront/app/context/CartContext.jsx +1 -0
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useProductDetail.js +2 -2
- package/skills/wix-vibe-headless/references/storefront/app/hooks/useShop.js +63 -78
- package/skills/wix-vibe-headless/references/storefront/app/rest/wix-store-catalog.js +59 -43
- package/skills/wix-vibe-headless/references/storefront/seed/SEED.md +46 -10
- package/skills/wix-vibe-headless/references/storefront/seed/{seed-store.js → seed-store.cjs} +163 -25
- package/skills/wix-vibe-headless/references/storefront/app/pages/Shop.jsx +0 -75
package/skills/wix-docs/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wix-docs
|
|
3
|
-
description: "Look up the Wix API/SDK documentation to confirm an exact endpoint, HTTP method, request/response shape, field, enum, or error before writing Wix code — never guess a Wix API from memory. A lookup is a short flow: find the right page, then read it. Two ways: (1) plain `curl` (zero dependencies) — find a page by **semantic search** (`POST /mcp-docs-search/v1/docs/search`, natural-language `{ search_term, document_type }
|
|
3
|
+
description: "Look up the Wix API/SDK documentation to confirm an exact endpoint, HTTP method, request/response shape, field, enum, or error before writing Wix code — never guess a Wix API from memory. A lookup is a short flow: find the right page, then read it. Two ways: (1) plain `curl` (zero dependencies) — find a page by **semantic search** (`POST /mcp-docs-search/v1/docs/search`, natural-language `{ search_term, document_type }`, incl. the SKILLS recipe corpus for multi-step workflows) **or by browsing** a docs portal as a menu — a structured, typed, counted browse of the REST, SDK, CLI, Build Apps, and Headless portals (`POST /mcp-docs-search/v1/docs/menu/browse`), or the `.md` menu tree from the `llms.txt` root for any surface — then read the page by appending `.md` to its URL; (2) the Wix MCP doc tools when present. Triggers: look up a Wix API, find the Wix endpoint/method, confirm a Wix request body or field, verify a Wix API shape, explore Wix docs, which Wix API do I call, read a Wix method schema."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Wix Docs — look up the Wix API/SDK documentation
|
|
@@ -11,7 +11,17 @@ here first. That includes the example endpoints in this skill: they illustrate t
|
|
|
11
11
|
go stale like any snapshot — discover the real contract before you rely on one.
|
|
12
12
|
|
|
13
13
|
A lookup is a short flow: **find the right page, then read it.** Do it with `curl` (default, below)
|
|
14
|
-
or the Wix MCP doc tools if your agent has them (Lane 2).
|
|
14
|
+
or the Wix MCP doc tools if your agent has them (Lane 2). Either way, route by what you already
|
|
15
|
+
know:
|
|
16
|
+
|
|
17
|
+
- **You have a docs URL** → just read it (§2). Don't re-search for a page you can already name.
|
|
18
|
+
- **A multi-step workflow** ("take a booking from service setup to payment") → look for a **recipe**
|
|
19
|
+
first: semantic search with `document_type: "SKILLS"` (§1A). A recipe carries step ordering,
|
|
20
|
+
cross-step gotchas, and the one bundled endpoint that does the whole job — things no single
|
|
21
|
+
method page states. No relevant recipe → search the relevant API corpus and assemble the workflow
|
|
22
|
+
from verified per-method contracts.
|
|
23
|
+
- **One specific operation, field, or enum** → search its API corpus (`REST` / `SDK`), then read or
|
|
24
|
+
schema-check what you land on.
|
|
15
25
|
|
|
16
26
|
## Lane 1 — `curl` (default)
|
|
17
27
|
|
|
@@ -24,16 +34,22 @@ Three ways to reach the right page — use whichever fits.
|
|
|
24
34
|
|
|
25
35
|
**A. Semantic search.** Describe what you want in natural language ("let a customer book an
|
|
26
36
|
appointment"), not just keywords; hits come back ranked by relevance. Same `POST` body for both
|
|
27
|
-
variants: `search_term` (required, 1–500), `document_type` (`REST` default · `SDK` · `
|
|
28
|
-
`BUSINESS_SOLUTIONS` · `VELO` · `WDS` · `BUILD_APPS` · `CLI`
|
|
29
|
-
`
|
|
37
|
+
variants: `search_term` (required, 1–500), `document_type` (`REST` default · `SDK` · `SKILLS` ·
|
|
38
|
+
`WIX_HEADLESS` · `BUSINESS_SOLUTIONS` · `VELO` · `WDS` · `BUILD_APPS` · `CLI` · `OVERVIEW`),
|
|
39
|
+
`maximum_results` (1–20, def 15), `lines_in_each_result` (0–200, def 20; `0` = no per-hit line cap).
|
|
40
|
+
`SKILLS` is the dedicated **recipe corpus** — multi-step workflow pages that a `REST` search does
|
|
41
|
+
not return; `OVERVIEW` is platform orientation (which development approach, which API family). Two
|
|
42
|
+
variants — pick by what you're doing:
|
|
30
43
|
|
|
31
44
|
**`/docs/search/markdown` → read it (start here).** Returns JSON with a single `content` field
|
|
32
45
|
holding one LLM-ready markdown string (extract it with `jq -r '.content'`) where each hit is a
|
|
33
46
|
**condensed method doc**: the API **endpoint**, **real request code examples**, the **response
|
|
34
|
-
shape**, and the **method description** (with its gotchas)
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
shape**, and the **method description** (with its gotchas). Hits are **previews, not full pages**:
|
|
48
|
+
the condensed format has fixed per-section limits, so raising `lines_in_each_result` does not expand
|
|
49
|
+
every section, and `0` only removes the per-hit line cap — it never reproduces the whole source page.
|
|
50
|
+
Before building on a hit, check sufficiency: do you have the required inputs, the conditions that
|
|
51
|
+
apply to your case, and the REST contract or SDK signature you need? If yes, proceed — no extra
|
|
52
|
+
fetch. If not, make **one targeted follow-up**: read the method page (§2) or pull its schema (§C).
|
|
37
53
|
|
|
38
54
|
```bash
|
|
39
55
|
curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdown' \
|
|
@@ -42,6 +58,15 @@ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdow
|
|
|
42
58
|
| jq -r '.content' # no jq? → python3 -c 'import sys,json;print(json.load(sys.stdin)["content"])'
|
|
43
59
|
```
|
|
44
60
|
|
|
61
|
+
For a workflow, hit the recipe corpus first, then resolve each step's call in `REST`/`SDK`:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdown' \
|
|
65
|
+
-H 'Content-Type: application/json' \
|
|
66
|
+
--data-raw '{"search_term":"end to end booking flow","document_type":"SKILLS","maximum_results":2}' \
|
|
67
|
+
| jq -r '.content'
|
|
68
|
+
```
|
|
69
|
+
|
|
45
70
|
**`/docs/search` (JSON) → route on it.** Returns `{ results: [ { title, url, content,
|
|
46
71
|
relevance_score, … } ] }` — structured hits. Use it when you want to **pick/route programmatically**:
|
|
47
72
|
grab a hit's `url` to read that page (§2) or feed it to the schema query (§C). (Method hits carry a
|
|
@@ -55,19 +80,37 @@ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search' \
|
|
|
55
80
|
# no jq? → python3 -c 'import sys,json;[print(r["title"],r["url"]) for r in json.load(sys.stdin)["results"] if r.get("url")]'
|
|
56
81
|
```
|
|
57
82
|
|
|
58
|
-
**B. Browse the docs tree as a menu.** Two ways: the **structured browse endpoint** for the
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
**B1. Structured browse —
|
|
63
|
-
|
|
64
|
-
**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
(
|
|
69
|
-
`
|
|
70
|
-
`
|
|
83
|
+
**B. Browse the docs tree as a menu.** Two ways: the **structured browse endpoint** for the
|
|
84
|
+
supported portals (preferred there — typed, counted, filterable), and the **`.md` menu tree** for
|
|
85
|
+
any surface and for reading pages.
|
|
86
|
+
|
|
87
|
+
**B1. Structured browse — the supported portals.** `POST /mcp-docs-search/v1/docs/menu/browse`
|
|
88
|
+
walks a portal's tree and returns each child with its **kind**, its **HTTP verb** (for methods), and
|
|
89
|
+
**subtree counts** ("Catalog V3 — 121 methods, 32 articles"), so you pick the right area by shape —
|
|
90
|
+
in ~2 KB, not a ~40 KB menu page you have to `grep`. `include`, `name_filter`, and `depth` jump
|
|
91
|
+
straight to what you want.
|
|
92
|
+
|
|
93
|
+
Portals (`document_type`): `REST` (default — the `api-reference` portal) · `FRONTEND_SDK` (`sdk`) ·
|
|
94
|
+
`CLI` (`wix-cli`) · `BUILD_APPS` (`build-apps`) · `WIX_HEADLESS` (`go-headless`). In **browse only**,
|
|
95
|
+
`SDK` is an alias for `REST` (the API reference documents both views on every page) — it does **not**
|
|
96
|
+
select `FRONTEND_SDK`, and the alias doesn't apply to semantic search. To discover a portal's areas,
|
|
97
|
+
omit `menu_url` — you get the portal root; passing a supported portal's URL as `menu_url` also infers
|
|
98
|
+
the portal for you.
|
|
99
|
+
|
|
100
|
+
Body: `menu_url?` (absolute docs URL; omit for the portal root), `document_type?`, `depth?` (1, max
|
|
101
|
+
6), `include?` (`CATEGORY`·`RESOURCE`·`METHOD`·`ARTICLE`·`WEBHOOK`·`OBJECT`·`SKILL`), `deprecated?`
|
|
102
|
+
(`HIDE` default·`SHOW`·`ONLY`), `name_filter?`, `max_nodes?`, `format?` (`MARKDOWN` default →
|
|
103
|
+
`content` string; `STRUCTURED` → JSON tree with `url`/`http_method`/`resource_id`/`child_counts`,
|
|
104
|
+
plus `counts_by_type`, `truncated`, `deprecated_counts_by_type`).
|
|
105
|
+
|
|
106
|
+
Two response signals to act on, not ignore:
|
|
107
|
+
|
|
108
|
+
- **`truncated: true`** — the node cap cut the listing. Narrow instead of re-reading: browse a
|
|
109
|
+
deeper `menu_url`, tighten `include`/`name_filter`, or lower `depth`.
|
|
110
|
+
- **Deprecation filtering** — deprecated entries are **hidden by default**;
|
|
111
|
+
`deprecated_counts_by_type` reports how many were filtered out. An API missing from a browse may
|
|
112
|
+
be deprecated, not nonexistent — re-browse with `deprecated: "SHOW"` (or `"ONLY"`) to inspect it,
|
|
113
|
+
and follow its replacement pointer where one is documented.
|
|
71
114
|
|
|
72
115
|
```bash
|
|
73
116
|
# a vertical's structure, with per-child subtree counts
|
|
@@ -81,14 +124,19 @@ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/menu/browse' \
|
|
|
81
124
|
-H 'Content-Type: application/json' \
|
|
82
125
|
--data-raw '{"menu_url":"https://dev.wix.com/docs/api-reference/business-solutions/bookings","include":["METHOD"],"name_filter":"cancel","depth":4}' \
|
|
83
126
|
| jq -r '.content'
|
|
127
|
+
|
|
128
|
+
# a non-REST portal: the CLI docs, from the portal root
|
|
129
|
+
curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/menu/browse' \
|
|
130
|
+
-H 'Content-Type: application/json' \
|
|
131
|
+
--data-raw '{"document_type":"CLI","depth":2}' | jq -r '.content'
|
|
84
132
|
```
|
|
85
133
|
|
|
86
|
-
|
|
87
|
-
|
|
134
|
+
Browse-only: it hands you the page **URL** — read it by appending `.md` (§2), and get the exact
|
|
135
|
+
schema from §C.
|
|
88
136
|
|
|
89
|
-
**B2. `.md` menu tree —
|
|
90
|
-
you can navigate any
|
|
91
|
-
|
|
137
|
+
**B2. `.md` menu tree — any surface, and how you read pages.** Every docs path has a `.md` twin, so
|
|
138
|
+
you can navigate any surface with zero dependencies; use it for surfaces structured browse doesn't
|
|
139
|
+
cover (e.g. Velo) and to read leaves. `curl https://dev.wix.com/docs/llms.txt` is the
|
|
92
140
|
top-level map; the portals under it:
|
|
93
141
|
|
|
94
142
|
| Portal | Start here for |
|
|
@@ -127,9 +175,13 @@ curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: ap
|
|
|
127
175
|
```
|
|
128
176
|
|
|
129
177
|
**Filter narrowly and return only the fields you need** — the index is large, so an unfiltered dump
|
|
130
|
-
is huge. Scope: **REST
|
|
131
|
-
|
|
132
|
-
|
|
178
|
+
is huge. Scope: the **REST surface**. `lightIndex` indexes REST **methods**; a sibling `articles`
|
|
179
|
+
index plus `getArticleContentByUrl(docsUrl)` / `getArticleContent(resourceId)` cover the REST
|
|
180
|
+
portal's **prose** (introductions, recipes, flow pages). SDK-only surfaces and the other portals
|
|
181
|
+
aren't here — use A/B for those, and note the schemas returned are REST contracts, not SDK
|
|
182
|
+
signatures (the SDK view of the same method lives on its docs page, §2). More examples (browse a
|
|
183
|
+
vertical, `menuPath` walk, resource schema) and the schema/article readers →
|
|
184
|
+
**`references/API_SPEC_SEARCH.md`**.
|
|
133
185
|
|
|
134
186
|
If the Wix MCP is present, it exposes these same capabilities as native tools (no `curl`/JSON
|
|
135
187
|
boilerplate) — Lane 2.
|
|
@@ -169,18 +221,30 @@ handle it accordingly:
|
|
|
169
221
|
For the exact **structured** schema and enum values, don't hand-slice the markdown — query the API
|
|
170
222
|
spec with a `curl` `POST` to `https://mcp.wix.com/api/code-mode/search` (the no-MCP equivalent of
|
|
171
223
|
the MCP `SearchWixAPISpec`). The `code` is a JS function with `lightIndex` and
|
|
172
|
-
`getResourceSchemaByUrl(docsUrl)` in scope; return only what you need
|
|
224
|
+
`getResourceSchemaByUrl(docsUrl)` in scope; return only what you need.
|
|
225
|
+
|
|
226
|
+
`getResourceSchemaByUrl` scopes to the URL you pass: a **method URL** returns a schema whose
|
|
227
|
+
`methods` array holds just that method — read it as `methods[0]`, and don't select it by comparing
|
|
228
|
+
`m.docsUrl` to your input (the reader normalizes URLs). A **resource URL** (the method URL minus
|
|
229
|
+
its last segment) returns the **whole resource** — fetch that when you need sibling operations or
|
|
230
|
+
shared resource context.
|
|
173
231
|
|
|
174
232
|
```bash
|
|
175
233
|
# find a method by keyword → its docsUrl + executable publicUrl
|
|
176
234
|
curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: application/json' \
|
|
177
235
|
--data-raw '{"code":"async function(){ return lightIndex.flatMap(r=>r.methods).filter(m=>/createBooking$/i.test(m.operationId)).map(m=>({op:m.operationId, httpMethod:m.httpMethod, publicUrl:m.publicUrl, docsUrl:m.docsUrl})); }"}'
|
|
178
236
|
|
|
179
|
-
#
|
|
237
|
+
# a METHOD URL → that one method's contract (resolve $circular refs via s.components.schemas)
|
|
180
238
|
curl -sS -X POST 'https://mcp.wix.com/api/code-mode/search' -H 'Content-Type: application/json' \
|
|
181
|
-
--data-raw '{"code":"async function(){ const
|
|
239
|
+
--data-raw '{"code":"async function(){ const s=await getResourceSchemaByUrl(\"https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/create-booking\"); const m=s.methods[0]; return { publicUrl:m.publicUrl, requestBody:m.requestBody, responses:m.responses }; }"}'
|
|
182
240
|
```
|
|
183
241
|
|
|
242
|
+
The envelope is `{ "result": … }` or `{ "error": "<message>" }` — **both arrive as HTTP 200**, so
|
|
243
|
+
check the body, not the status. The error text names the fix: an article URL → switch to
|
|
244
|
+
`getArticleContentByUrl`; an unknown URL → search `lightIndex` by keyword. Don't re-send an
|
|
245
|
+
identical failed lookup — change something based on the error, and if discovery still fails,
|
|
246
|
+
report the limitation instead of guessing the contract.
|
|
247
|
+
|
|
184
248
|
Full example set (resource listing, partial-URL resolution, enum/nested-ref expansion) →
|
|
185
249
|
`references/API_SPEC_SEARCH.md`.
|
|
186
250
|
|
|
@@ -195,18 +259,17 @@ when present, fall back to Lane 1 when not. Optional — skip this lane if the t
|
|
|
195
259
|
|---|---|
|
|
196
260
|
| `SearchWixRESTDocumentation` | Find a REST method/recipe by keyword |
|
|
197
261
|
| `SearchWixSDKDocumentation` | Find an SDK method (surfaces runtime functions a module menu hides) |
|
|
198
|
-
| `SearchWixAPISpec` → `getResourceSchemaByUrl` |
|
|
262
|
+
| `SearchWixAPISpec` → `getResourceSchemaByUrl` | Structured schema — a **method URL** for that method's contract, a **resource URL** for the whole resource |
|
|
199
263
|
| `ReadFullDocsArticle` | Read a recipe/flow/article page in full |
|
|
200
264
|
| `BrowseWixRESTDocsMenu` | Walk the menu tree to drill to a method |
|
|
201
265
|
|
|
202
|
-
- **
|
|
203
|
-
requirement
|
|
204
|
-
single-create but omitted from the bulk-create page)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
per-method schema won't flag.
|
|
266
|
+
- **Fetch the method for its contract; fetch the resource for context.** A method URL gives exactly
|
|
267
|
+
that method. When a requirement may live on a *sibling* method (e.g. a `memberId` required on
|
|
268
|
+
single-create but omitted from the bulk-create page), fetch the **resource** URL instead — the
|
|
269
|
+
resource view carries every method plus the shared object schema.
|
|
270
|
+
- The **recipe-first routing** at the top of this skill applies here too: for a multi-step workflow,
|
|
271
|
+
search the recipe corpus (many verticals publish recipes under a
|
|
272
|
+
`…/business-solutions/<vertical>/skills` node) before assembling per-method calls.
|
|
210
273
|
|
|
211
274
|
## The `.md` suffix
|
|
212
275
|
|
|
@@ -215,76 +278,11 @@ plain docs URL **without** `.md` — never feed a `.md` URL to an MCP tool.
|
|
|
215
278
|
|
|
216
279
|
## From docs to calls
|
|
217
280
|
|
|
218
|
-
|
|
219
|
-
of what you read
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
| **admin** | an admin token (API key, connector, or OAuth-app admin grant) | managing the site — ad hoc calls, or the same fetch inside an app's backend function |
|
|
224
|
-
| **visitor** | minted from the site's OAuth app, in frontend code | everything the site's end user does — storefront reads, cart, checkout |
|
|
225
|
-
|
|
226
|
-
**Admin** — any management or read call, straight from its docs contract:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
curl -sS -X POST 'https://www.wixapis.com/contacts/v5/contacts/query' \
|
|
230
|
-
-H "Authorization: Bearer $ADMIN_TOKEN" -H 'Content-Type: application/json' \
|
|
231
|
-
--data-raw '{"query": {"cursorPaging": {"limit": 10}}}'
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
In a Wix CLI project, the CLI mints `$ADMIN_TOKEN` — at either scope:
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
TOKEN=$(npx @wix/cli@latest token --site "$SITE_ID") # site-scoped: this one site's APIs
|
|
238
|
-
TOKEN=$(npx @wix/cli@latest token) # account-scoped: account-level APIs (list sites, …)
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
Mint once per run and cache it — within a run the CLI returns a byte-identical token, so re-minting
|
|
242
|
-
only spends startup time.
|
|
243
|
-
|
|
244
|
-
**Visitor — minted from the OAuth app's client id.** The client id is a public value, and it is
|
|
245
|
-
usually already on disk before it is in any API: in a managed headless project it is the `appId`
|
|
246
|
-
field of `wix.config.json` — **the OAuth app id and the client id are the same value** — so read it
|
|
247
|
-
from the project's config instead of querying the OAuth-apps API for it. The mint is one
|
|
248
|
-
unauthenticated call, so it belongs in the site's own frontend code:
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
curl -sS -X POST 'https://www.wixapis.com/oauth2/token' \
|
|
252
|
-
-H 'Content-Type: application/json' \
|
|
253
|
-
--data-raw '{"clientId": "<oauth app client id>", "grantType": "anonymous"}'
|
|
254
|
-
# → { "access_token": "OauthNG.JWS.…", … } — bearer for products, cart, checkout
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
The cart and checkout APIs act on the *caller's* identity, so they want the visitor token — the
|
|
258
|
-
admin token is for managing the site, the visitor token is for being on it.
|
|
259
|
-
|
|
260
|
-
The authentication docs (append `.md` to read):
|
|
261
|
-
|
|
262
|
-
- [`about-identities`](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities) — the identity model
|
|
263
|
-
- [`rest-api-authentication`](https://dev.wix.com/docs/api-reference/articles/authentication/rest-api-authentication) — headers, token kinds
|
|
264
|
-
- [`retrieve-tokens`](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens) — the `/oauth2/token` contract, all grant types
|
|
265
|
-
- [`about-authentication`](https://dev.wix.com/docs/go-headless/authentication/about-authentication) — visitor vs member sessions
|
|
266
|
-
- [`create-an-oauth-app-for-visitors-and-members`](https://dev.wix.com/docs/go-headless/getting-started/setup/authentication/create-an-oauth-app-for-visitors-and-members) — where the client id comes from
|
|
267
|
-
- [`set-up-a-headless-client`](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client) — wiring the client
|
|
268
|
-
|
|
269
|
-
## Special APIs worth knowing
|
|
270
|
-
|
|
271
|
-
**Dynamic Site Context — "what IS this site?"** One admin call returns a markdown report of the
|
|
272
|
-
whole site — installed apps, status, URL, locale, CMS collections — the same output the Wix MCP's
|
|
273
|
-
site-context tool renders:
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
curl -sS -X POST 'https://www.wixapis.com/_api/dynamic-context/v1/dynamic-context/markdown' \
|
|
277
|
-
-H "Authorization: Bearer $ADMIN_TOKEN" -H 'Content-Type: application/json' \
|
|
278
|
-
--data-raw '{"siteId": "<metasite id>"}' | jq -r '.markdown'
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
A `200` with `"markdown": ""` means the token or `siteId` is wrong — the endpoint reports an empty
|
|
282
|
-
context instead of an auth error, so treat empty as "check auth", never as "empty site".
|
|
283
|
-
|
|
284
|
-
For site management, the **`wix-manage`** skill carries per-area recipes. It may already be
|
|
285
|
-
installed at
|
|
286
|
-
`.agents/skills/wix-manage/`; install it with `npx -y skills add wix/skills/skills/wix-manage`,
|
|
287
|
-
or read it straight off the registry: `https://www.wix.com/skills/wix-manage`.
|
|
281
|
+
Understanding the contract is this skill's job; executing it needs an identity. Which identities a
|
|
282
|
+
method accepts is part of what you read — check the method page's permissions and identity notes
|
|
283
|
+
before calling, and confirm your token's site/account scope matches. Token minting (CLI admin
|
|
284
|
+
tokens, visitor tokens), the identity model, and the dynamic site-context report →
|
|
285
|
+
**`references/CALLING.md`**.
|
|
288
286
|
|
|
289
287
|
## Before you write the code
|
|
290
288
|
|
|
@@ -7,12 +7,14 @@ the MCP `SearchWixAPISpec` / `getResourceSchemaByUrl` tools. It does two jobs:
|
|
|
7
7
|
`operationId`, `httpMethod`, `menuPath`, `docsUrl`, `publicUrl`). Filter or enumerate it to locate
|
|
8
8
|
methods programmatically — a third find-path alongside semantic search and `.md` browsing (`SKILL.md`).
|
|
9
9
|
- **Read the schema** — `getResourceSchemaByUrl(docsUrl)` returns the **exact request/response shape,
|
|
10
|
-
field types, enums, and error codes**
|
|
11
|
-
|
|
10
|
+
field types, enums, and error codes** (the markdown pages bury these in huge inline schemas),
|
|
11
|
+
**scoped to what you pass**: a **method URL** → a schema holding just that method; a **resource
|
|
12
|
+
URL** (or `getResourceSchema(resourceId)`) → the whole resource, every method.
|
|
12
13
|
|
|
13
14
|
> **Endpoint:** `POST https://mcp.wix.com/api/code-mode/search` — body `{ "code": "<async function() {…}>" }`.
|
|
14
15
|
> The `code` is a JS `async function()` that runs in a read-only sandbox and returns any
|
|
15
|
-
> JSON-serializable value. Response envelope: `{ "result": <return value> }`
|
|
16
|
+
> JSON-serializable value. Response envelope: `{ "result": <return value> }` or `{ "error": "<msg>" }` —
|
|
17
|
+
> **both with HTTP 200**, so check the body for `error`, never just the status.
|
|
16
18
|
|
|
17
19
|
> Internal/undocumented and pre-GA — treat it as best-effort; the contract could change. For
|
|
18
20
|
> reading a single known page, the `.md` twin in `SKILL.md` is simpler — reach here when you
|
|
@@ -51,7 +53,9 @@ A short function can go inline: `--data-raw '{"code":"async function(){ return l
|
|
|
51
53
|
| `methods[]` | `{ operationId, summary, httpMethod, path, docsUrl, publicUrl, publicBaseUrl, description }` |
|
|
52
54
|
|
|
53
55
|
**`getResourceSchemaByUrl(docsUrl)`** *(preferred when you have a URL)* and
|
|
54
|
-
**`getResourceSchema(resourceId)`** — return the
|
|
56
|
+
**`getResourceSchema(resourceId)`** — return the schema, **scoped to the input**: a method URL
|
|
57
|
+
scopes `methods` to that one method (read it as `methods[0]`); a resource URL or `resourceId`
|
|
58
|
+
returns every method. Shape:
|
|
55
59
|
|
|
56
60
|
```
|
|
57
61
|
{ title, description, fqdn, docsUrl,
|
|
@@ -61,9 +65,11 @@ A short function can go inline: `--data-raw '{"code":"async function(){ return l
|
|
|
61
65
|
components: { schemas: { …every referenced type… } } }
|
|
62
66
|
```
|
|
63
67
|
|
|
64
|
-
**`articles`** — array of
|
|
68
|
+
**`articles`** — array of the REST portal's **prose pages** (introductions, recipes, flow pages) as
|
|
69
|
+
`{ name, resourceId, docsUrl, menuPath, description }`;
|
|
65
70
|
**`getArticleContentByUrl(docsUrl)`** / **`getArticleContent(resourceId)`** — return an article's
|
|
66
|
-
full markdown.
|
|
71
|
+
full markdown. This is the coverage `lightIndex` (methods only) doesn't have; articles and resources
|
|
72
|
+
share the same `menuPath` hierarchy.
|
|
67
73
|
|
|
68
74
|
### Rules that matter
|
|
69
75
|
|
|
@@ -77,9 +83,15 @@ full markdown. Articles and resources share the same `menuPath` hierarchy.
|
|
|
77
83
|
- **Filterable/sortable fields:** for query/search methods, `method.queryMethodData.queryFieldsCapabilitiesMap`
|
|
78
84
|
lists which fields accept filters (and their operators) and sorting. A field absent from the map
|
|
79
85
|
is rejected by the API — filter it client-side after fetching a bounded page.
|
|
86
|
+
- **Never select a method by comparing `m.docsUrl` to the URL you passed in** — the reader
|
|
87
|
+
normalizes URLs (`.md`, query params, casing), so equality against your raw input can miss. On a
|
|
88
|
+
method-URL fetch the scoped result *is* the method: read `methods[0]`. Need siblings? Fetch the
|
|
89
|
+
resource URL.
|
|
80
90
|
- `getResourceSchemaByUrl` resolves **API method/resource** URLs only — not `/skills/…` or article
|
|
81
|
-
pages (use `getArticleContentByUrl` for those).
|
|
82
|
-
|
|
91
|
+
pages (use `getArticleContentByUrl` for those). **Follow the error, don't retry it:** the `{error}`
|
|
92
|
+
message names the fix — an article URL points you to the article reader; an unknown URL means
|
|
93
|
+
search `lightIndex`/`articles` by keyword instead of re-sending the same lookup. If discovery
|
|
94
|
+
still fails, report the limitation — don't guess the contract.
|
|
83
95
|
|
|
84
96
|
## Examples
|
|
85
97
|
|
|
@@ -108,16 +120,15 @@ async function() {
|
|
|
108
120
|
}
|
|
109
121
|
```
|
|
110
122
|
|
|
111
|
-
**Inspect one method by
|
|
123
|
+
**Inspect one method by its docs URL** (request + response + query capabilities + curl examples).
|
|
124
|
+
A method URL returns a schema scoped to that method — `methods[0]` is it; don't match on
|
|
125
|
+
`m.docsUrl === methodUrl` (the reader normalizes URLs):
|
|
112
126
|
|
|
113
127
|
```javascript
|
|
114
128
|
async function() {
|
|
115
129
|
const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
|
|
116
|
-
const schema = await getResourceSchemaByUrl(methodUrl);
|
|
117
|
-
const method = schema.methods
|
|
118
|
-
if (!method) {
|
|
119
|
-
return { message: "No exact method match", methods: schema.methods.map(m => ({ title: m.summary, docsUrl: m.docsUrl, httpMethod: m.httpMethod.toUpperCase(), publicUrl: m.publicUrl })) };
|
|
120
|
-
}
|
|
130
|
+
const schema = await getResourceSchemaByUrl(methodUrl); // scoped: one method
|
|
131
|
+
const method = schema.methods[0];
|
|
121
132
|
return {
|
|
122
133
|
title: method.summary,
|
|
123
134
|
publicUrl: method.publicUrl,
|
|
@@ -133,11 +144,13 @@ async function() {
|
|
|
133
144
|
}
|
|
134
145
|
```
|
|
135
146
|
|
|
136
|
-
**Inspect a whole resource by its docs URL** (
|
|
147
|
+
**Inspect a whole resource by its docs URL** (the method URL minus its last segment) — use this when
|
|
148
|
+
you need **sibling operations** or the shared object schema (a requirement is often documented on a
|
|
149
|
+
sibling method, e.g. required on single-create but omitted from bulk-create):
|
|
137
150
|
|
|
138
151
|
```javascript
|
|
139
152
|
async function() {
|
|
140
|
-
const schema = await getResourceSchemaByUrl("https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3");
|
|
153
|
+
const schema = await getResourceSchemaByUrl("https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3"); // resource URL → every method
|
|
141
154
|
return {
|
|
142
155
|
resource: schema.title,
|
|
143
156
|
description: schema.description,
|
|
@@ -154,11 +167,10 @@ async function() {
|
|
|
154
167
|
const resource = lightIndex.find(r =>
|
|
155
168
|
r.docsUrl.includes(partial) || r.methods.some(m => m.docsUrl?.includes(partial)));
|
|
156
169
|
if (!resource) return "No API resource found for this partial URL";
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
: { message: "Resource found, no exact method", methods: schema.methods.map(m => m.docsUrl) };
|
|
170
|
+
const methodDocsUrl = resource.methods.find(m => m.docsUrl?.includes(partial))?.docsUrl;
|
|
171
|
+
if (!methodDocsUrl) return { message: "Resource found, no matching method", methods: resource.methods.map(m => m.docsUrl) };
|
|
172
|
+
const method = (await getResourceSchemaByUrl(methodDocsUrl)).methods[0]; // canonical method URL → scoped
|
|
173
|
+
return { title: method.summary, publicUrl: method.publicUrl, httpMethod: method.httpMethod.toUpperCase(), requestBody: method.requestBody, responses: method.responses };
|
|
162
174
|
}
|
|
163
175
|
```
|
|
164
176
|
|
|
@@ -168,7 +180,7 @@ async function() {
|
|
|
168
180
|
async function() {
|
|
169
181
|
const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
|
|
170
182
|
const schema = await getResourceSchemaByUrl(methodUrl);
|
|
171
|
-
const method = schema.methods
|
|
183
|
+
const method = schema.methods[0]; // method URL → scoped result
|
|
172
184
|
return {
|
|
173
185
|
requestBody: method.requestBody,
|
|
174
186
|
selectedNestedTypes: {
|
|
@@ -186,7 +198,7 @@ depth small, schemas balloon fast):
|
|
|
186
198
|
async function() {
|
|
187
199
|
const methodUrl = "https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/products-v3/query-products";
|
|
188
200
|
const schema = await getResourceSchemaByUrl(methodUrl);
|
|
189
|
-
const method = schema.methods
|
|
201
|
+
const method = schema.methods[0]; // method URL → scoped result
|
|
190
202
|
function expand(value, depth = 0, seen = []) {
|
|
191
203
|
if (depth > 3) return value;
|
|
192
204
|
if (Array.isArray(value)) return value.map(v => expand(v, depth, seen));
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# From docs to calls — identities, tokens, site context
|
|
2
|
+
|
|
3
|
+
You've confirmed the contract (`SKILL.md`); this is the execution side: which identity the call
|
|
4
|
+
runs under, how to mint its token, and how to see what a site actually has installed.
|
|
5
|
+
|
|
6
|
+
## Which identity?
|
|
7
|
+
|
|
8
|
+
Wix APIs run under several identities — Wix user (admin), app, site member, site visitor — and
|
|
9
|
+
**each method documents which it accepts**: check the method page's permissions/identity notes
|
|
10
|
+
rather than assuming. The identity model:
|
|
11
|
+
[`about-identities`](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities)
|
|
12
|
+
(append `.md` to read). The two tokens you mint most often:
|
|
13
|
+
|
|
14
|
+
| token | minted from | typical use |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| **admin** | API key, connector, OAuth-app admin grant, or the Wix CLI | managing the site — ad hoc calls, or the same fetch inside an app's backend function |
|
|
17
|
+
| **visitor** | the site's OAuth app client id, `anonymous` grant | anonymous end-user calls from the site's frontend — storefront reads, cart, checkout |
|
|
18
|
+
|
|
19
|
+
A logged-in **member** is a third case: member calls use a member token (the same `/oauth2/token`
|
|
20
|
+
endpoint, a member grant — see
|
|
21
|
+
[`about-authentication`](https://dev.wix.com/docs/go-headless/authentication/about-authentication)),
|
|
22
|
+
not the visitor token.
|
|
23
|
+
|
|
24
|
+
## Admin token
|
|
25
|
+
|
|
26
|
+
Any management or read call, straight from its docs contract:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
curl -sS -X POST 'https://www.wixapis.com/contacts/v5/contacts/query' \
|
|
30
|
+
-H "Authorization: Bearer $ADMIN_TOKEN" -H 'Content-Type: application/json' \
|
|
31
|
+
--data-raw '{"query": {"cursorPaging": {"limit": 10}}}'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
In a Wix CLI project, the CLI mints `$ADMIN_TOKEN` — at either scope:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
TOKEN=$(npx @wix/cli@latest token --site "$SITE_ID") # site-scoped: this one site's APIs
|
|
38
|
+
TOKEN=$(npx @wix/cli@latest token) # account-scoped: account-level APIs (list sites, …)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Mint once per run and cache it — within a run the CLI returns a byte-identical token, so re-minting
|
|
42
|
+
only spends startup time.
|
|
43
|
+
|
|
44
|
+
## Visitor token
|
|
45
|
+
|
|
46
|
+
Minted from the OAuth app's **client id** — a public value, usually already on disk before it is in
|
|
47
|
+
any API: in a managed headless project it is the `appId` field of `wix.config.json` (**the OAuth app
|
|
48
|
+
id and the client id are the same value**), so read it from the project's config instead of querying
|
|
49
|
+
the OAuth-apps API for it. The mint is one unauthenticated call, so it belongs in the site's own
|
|
50
|
+
frontend code:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
curl -sS -X POST 'https://www.wixapis.com/oauth2/token' \
|
|
54
|
+
-H 'Content-Type: application/json' \
|
|
55
|
+
--data-raw '{"clientId": "<oauth app client id>", "grantType": "anonymous"}'
|
|
56
|
+
# → { "access_token": "OauthNG.JWS.…", … } — bearer for products, cart, checkout
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The cart and checkout APIs act on the *caller's* identity, so an anonymous shopper's calls want the
|
|
60
|
+
visitor token — the admin token is for managing the site, the visitor (or member) token is for
|
|
61
|
+
being on it.
|
|
62
|
+
|
|
63
|
+
## The authentication docs
|
|
64
|
+
|
|
65
|
+
Append `.md` to read:
|
|
66
|
+
|
|
67
|
+
- [`about-identities`](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities) — the identity model
|
|
68
|
+
- [`rest-api-authentication`](https://dev.wix.com/docs/api-reference/articles/authentication/rest-api-authentication) — headers, token kinds
|
|
69
|
+
- [`retrieve-tokens`](https://dev.wix.com/docs/api-reference/business-management/headless/authentication/retrieve-tokens) — the `/oauth2/token` contract, all grant types
|
|
70
|
+
- [`about-authentication`](https://dev.wix.com/docs/go-headless/authentication/about-authentication) — visitor vs member sessions
|
|
71
|
+
- [`create-an-oauth-app-for-visitors-and-members`](https://dev.wix.com/docs/go-headless/getting-started/setup/authentication/create-an-oauth-app-for-visitors-and-members) — where the client id comes from
|
|
72
|
+
- [`set-up-a-headless-client`](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client) — wiring the client
|
|
73
|
+
|
|
74
|
+
## Dynamic Site Context — "what IS this site?"
|
|
75
|
+
|
|
76
|
+
One admin call returns a markdown report of the whole site — installed apps, status, URL, locale,
|
|
77
|
+
CMS collections — the same output the Wix MCP's site-context tool renders:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -sS -X POST 'https://www.wixapis.com/_api/dynamic-context/v1/dynamic-context/markdown' \
|
|
81
|
+
-H "Authorization: Bearer $ADMIN_TOKEN" -H 'Content-Type: application/json' \
|
|
82
|
+
--data-raw '{"siteId": "<metasite id>"}' | jq -r '.markdown'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
A `200` with `"markdown": ""` means the token or `siteId` is wrong — the endpoint reports an empty
|
|
86
|
+
context instead of an auth error, so treat empty as "check auth", never as "empty site".
|
|
87
|
+
|
|
88
|
+
For site management, the **`wix-manage`** skill carries per-area recipes. It may already be
|
|
89
|
+
installed at
|
|
90
|
+
`.agents/skills/wix-manage/`; install it with `npx -y skills add wix/skills/skills/wix-manage`,
|
|
91
|
+
or read it straight off the registry: `https://www.wix.com/skills/wix-manage`.
|
|
@@ -112,9 +112,11 @@ curl -sS "$URL.md" | grep -nE 'name: (selectedPaymentOption|totalParticipants)'
|
|
|
112
112
|
# resolve a referenced type's enum values by grepping the Type name, e.g.: grep -nE 'SelectedPaymentOption'
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
**5.
|
|
116
|
-
`lines_in_each_result` (
|
|
117
|
-
|
|
115
|
+
**5. Size the search response** — on `…/docs/search/markdown`, `maximum_results` (1–20) caps the hit
|
|
116
|
+
count and `lines_in_each_result` (0–200) caps lines per hit; `0` removes the per-hit line cap. Either
|
|
117
|
+
way a hit is the **condensed format with fixed per-section limits — a preview, never the full page**:
|
|
118
|
+
raising the line count does not expand every section. When a hit lacks a field or condition you need,
|
|
119
|
+
follow its URL (or query the structured spec) instead of re-searching with bigger numbers.
|
|
118
120
|
|
|
119
121
|
**For deep/nested schemas**, don't hand-slice markdown — query the structured spec instead
|
|
120
122
|
(`references/API_SPEC_SEARCH.md`, or the Wix MCP `SearchWixAPISpec → getResourceSchemaByUrl`).
|
|
@@ -22,8 +22,12 @@ curl -sS -X POST 'https://www.wixapis.com/mcp-docs-search/v1/docs/search/markdow
|
|
|
22
22
|
--data-raw '{"search_term":"<what you need, in natural language>","document_type":"WIX_HEADLESS","maximum_results":3}'
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
`document_type`: `SDK` / `WIX_HEADLESS` for code-writing, `REST` / `BUSINESS_SOLUTIONS` for seeding
|
|
26
|
-
|
|
25
|
+
`document_type`: `SDK` / `WIX_HEADLESS` for code-writing, `REST` / `BUSINESS_SOLUTIONS` for seeding,
|
|
26
|
+
and `SKILLS` for a **multi-step workflow no pinned recipe covers** — it searches the dedicated recipe
|
|
27
|
+
corpus (step ordering, cross-step gotchas), which a `REST` search does not return (also `VELO` ·
|
|
28
|
+
`WDS` · `BUILD_APPS` · `CLI` · `OVERVIEW`). Drop `/markdown` for JSON hits. Found a recipe → resolve
|
|
29
|
+
its individual calls against `SDK`/`REST` docs; no recipe → assemble the flow from verified
|
|
30
|
+
per-method contracts.
|
|
27
31
|
|
|
28
32
|
**2. Read a page** — append `.md` to its docs URL. **For an SDK shape, append `.md?apiView=SDK`** —
|
|
29
33
|
the SDK view shows `_id` (what the frontend calls), the bare view shows `id`.
|
|
@@ -32,6 +36,8 @@ the SDK view shows `_id` (what the frontend calls), the bare view shows `id`.
|
|
|
32
36
|
with `getResourceSchemaByUrl(docsUrl)` (see `wix-docs`'s `API_SPEC_SEARCH.md`).
|
|
33
37
|
|
|
34
38
|
**If the host has the Wix MCP**, its `SearchWix*` / `SearchWixAPISpec → getResourceSchemaByUrl`
|
|
35
|
-
tools are
|
|
39
|
+
tools are the same backends without the `curl` boilerplate — prefer them when present, per `wix-docs`
|
|
40
|
+
Lane 2. `getResourceSchemaByUrl` scopes to the URL: a method URL → that method's contract; a
|
|
41
|
+
resource URL → the whole resource (fetch that for sibling operations).
|
|
36
42
|
|
|
37
43
|
**A page that IS pinned → read it directly; don't re-search for it.**
|