webcake-storefront-mcp 1.42.0 → 2.0.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.
@@ -0,0 +1,141 @@
1
+ {
2
+ "accept_invitation": "post:/api/v1/dashboard/site/invitations/accept",
3
+ "add_domain": "post:/api/v1/dashboard/site/:site_id/domains/create",
4
+ "add_site_languages": "post:/api/v1/dashboard/site/:site_id/multilingual/add_multiple_language",
5
+ "auto_translate": "post:/api/v1/dashboard/site/:site_id/multilingual/translate_json",
6
+ "block_phone_customers": "post:/api/v1/dashboard/site/:site_id/settings/block_phone_number/upsert_block_phone_customers",
7
+ "check_domain": "post:/api/v1/dashboard/site/:site_id/domains/check_domain",
8
+ "count_orders_by_status": "get:/api/v1/dashboard/site/:site_id/orders/count_by_status",
9
+ "create_appointment_address": "post:/api/v1/dashboard/site/:site_id/appointment/create_appointment_address",
10
+ "create_appointment_classify": "post:/api/v1/dashboard/site/:site_id/appointment/create_appointment_classify",
11
+ "create_appointment_employee": "post:/api/v1/dashboard/site/:site_id/appointment/create_appointment_employee",
12
+ "create_partner_feed": "post:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/create",
13
+ "create_products_from_device_templates": "post:/api/v1/dashboard/site/:site_id/applications/product_design/create_product_by_device_template",
14
+ "create_redirect_url": "post:/api/v1/dashboard/site/:site_id/seos/redirect_urls/create",
15
+ "create_saved_filter": "post:/api/v1/dashboard/site/:site_id/saved_filters/create",
16
+ "create_site_utm": "post:/api/v1/dashboard/site/:site_id/site_utms/create",
17
+ "create_subscriber": "post:/api/v1/dashboard/site/:site_id/subscriber/create",
18
+ "debug_function": "post:/api/v1/dashboard/site/:site_id/cms_files/debug",
19
+ "delete_affiliate_accounts": "post:/api/v1/dashboard/site/:site_id/affiliate/delete_account_affiliates",
20
+ "delete_affiliate_products": "post:/api/v1/dashboard/site/:site_id/affiliate/delete_product_affiliates",
21
+ "delete_appointment_addresses": "post:/api/v1/dashboard/site/:site_id/appointment/delete_appointment_addresses",
22
+ "delete_appointment_calendars": "post:/api/v1/dashboard/site/:site_id/appointment/delete_appointment_calendars",
23
+ "delete_appointment_classifies": "post:/api/v1/dashboard/site/:site_id/appointment/delete_appointment_classifies",
24
+ "delete_appointment_employees": "post:/api/v1/dashboard/site/:site_id/appointment/delete_appointment_employees",
25
+ "delete_contacts": "post:/api/v1/dashboard/site/:site_id/contact/delete",
26
+ "delete_course": "delete:/api/v1/dashboard/site/:site_id/course-app/:id",
27
+ "delete_courses": "post:/api/v1/dashboard/site/:site_id/course-app/delete_many",
28
+ "delete_domain": "post:/api/v1/dashboard/site/:site_id/domains/delete",
29
+ "delete_employees": "post:/api/v1/dashboard/site/:site_id/settings/employee/delete_employees",
30
+ "delete_partner_feeds": "post:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/delete",
31
+ "delete_redirect_urls": "post:/api/v1/dashboard/site/:site_id/seos/redirect_urls/delete",
32
+ "delete_saved_filter": "delete:/api/v1/dashboard/site/:site_id/saved_filters/:id",
33
+ "delete_site_utms": "post:/api/v1/dashboard/site/:site_id/site_utms/delete",
34
+ "delete_subscribers": "post:/api/v1/dashboard/site/:site_id/subscriber/delete",
35
+ "duplicate_appointment_calendars": "post:/api/v1/dashboard/site/:site_id/appointment/duplicate_appointment_calendars",
36
+ "empty_media_trash": "post:/api/v1/site/:site_id/media/empty_trash",
37
+ "get_affiliate_programs": "get:/api/v1/dashboard/site/:site_id/affiliate/program_affiliates",
38
+ "get_affiliate_statistic": "get:/api/v1/dashboard/site/:site_id/affiliate/statistic",
39
+ "get_category": "get:/api/v1/dashboard/site/:site_id/categories/:category_id",
40
+ "get_course": "get:/api/v1/dashboard/site/:site_id/course-app/:id",
41
+ "get_course_members": "get:/api/v1/dashboard/site/:site_id/course-app/members",
42
+ "get_device_templates": "get:/api/v1/dashboard/site/:site_id/applications/product_design/get_group_device_tempalte",
43
+ "get_email_templates": "get:/api/v1/dashboard/site/:site_id/send_email/all",
44
+ "get_file_versions": "get:/api/v1/dashboard/site/:site_id/cms_files/version_file",
45
+ "get_insight": "get:/api/v1/dashboard/site/:site_id/insight/all",
46
+ "get_insight_today": "get:/api/v1/dashboard/site/:site_id/insight/today",
47
+ "get_media_capacity": "get:/api/v1/site/:site_id/media/capacity",
48
+ "get_page_versions": "get:/api/v1/site/:site_id/page_versions/:page_id",
49
+ "get_ppd_variation_template": "get:/api/v1/dashboard/site/:site_id/applications/personal_product_design/get_product_variation_template",
50
+ "get_price_contact": "get:/api/v1/dashboard/site/:site_id/settings/price_contact/get",
51
+ "get_product_measurement": "get:/api/v1/dashboard/site/:site_id/settings/product_measurement",
52
+ "get_pwa": "get:/api/v1/site/:site_id/pwa",
53
+ "get_shipping": "get:/api/v1/dashboard/site/:site_id/settings/shipping",
54
+ "get_variation": "get:/api/v1/dashboard/site/:site_id/products/variation/:variation_id",
55
+ "invite_employee": "post:/api/v1/dashboard/site/:site_id/settings/employee/invite",
56
+ "list_affiliate_accounts": "get:/api/v1/dashboard/site/:site_id/affiliate/account_affiliates",
57
+ "list_affiliate_orders": "get:/api/v1/dashboard/site/:site_id/affiliate/order_affiliates",
58
+ "list_affiliate_payouts": "get:/api/v1/dashboard/site/:site_id/affiliate/payout_affiliates",
59
+ "list_affiliate_products": "get:/api/v1/dashboard/site/:site_id/affiliate/product_affiliates",
60
+ "list_api_keys": "get:/api/v1/site/:site_id/api_keys/all",
61
+ "list_appointment_addresses": "get:/api/v1/dashboard/site/:site_id/appointment/appointment_addresses",
62
+ "list_appointment_calendars": "get:/api/v1/dashboard/site/:site_id/appointment/appointment_calendars",
63
+ "list_appointment_classifies": "get:/api/v1/dashboard/site/:site_id/appointment/appointment_classifies",
64
+ "list_appointment_employees": "get:/api/v1/dashboard/site/:site_id/appointment/appointment_employees",
65
+ "list_appointments": "get:/api/v1/dashboard/site/:site_id/appointment/appointments",
66
+ "list_blocked_phones": "get:/api/v1/dashboard/site/:site_id/settings/block_phone_number/all",
67
+ "list_cms_files": "get:/api/v1/dashboard/site/:site_id/cms_files",
68
+ "list_contacts": "get:/api/v1/dashboard/site/:site_id/contact/all",
69
+ "list_courses": "get:/api/v1/dashboard/site/:site_id/course-app",
70
+ "list_customer_tags": "get:/api/v1/dashboard/site/:site_id/customer/customer_tags",
71
+ "list_domains": "get:/api/v1/dashboard/site/:site_id/domains/all",
72
+ "list_employees": "get:/api/v1/dashboard/site/:site_id/settings/employee/all",
73
+ "list_entity_logs": "get:/api/v1/dashboard/site/:site_id/system_logs/all",
74
+ "list_font_groups": "get:/api/v1/site/:site_id/load_font_groups",
75
+ "list_fonts": "get:/api/v1/site/:site_id/load_fonts",
76
+ "list_google_merchants": "get:/api/v1/dashboard/site/:site_id/sale_channels/google/merchants",
77
+ "list_invitations": "get:/api/v1/dashboard/site/invitations/all",
78
+ "list_materials": "get:/api/v1/dashboard/site/:site_id/products/materials/all",
79
+ "list_media_all": "get:/api/v1/site/:site_id/media/all",
80
+ "list_media_content": "get:/api/v1/site/:site_id/media/content",
81
+ "list_media_folders": "get:/api/v1/site/:site_id/media/folder",
82
+ "list_notifications": "get:/api/v1/dashboard/site/notifications/all",
83
+ "list_partner_feed_products": "get:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/:partner_feed_id/products/all",
84
+ "list_partner_feeds": "get:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/all",
85
+ "list_ppd": "get:/api/v1/dashboard/site/:site_id/applications/personal_product_design/get_all_ppd",
86
+ "list_product_brands": "get:/api/v1/dashboard/site/:site_id/products/product_brands/all",
87
+ "list_product_suppliers": "get:/api/v1/dashboard/site/:site_id/products/product_suppliers/all",
88
+ "list_product_tags": "get:/api/v1/dashboard/site/:site_id/products/product_tags/all",
89
+ "list_publish_histories": "get:/api/v1/site/:site_id/publish_histories",
90
+ "list_redirect_urls": "get:/api/v1/dashboard/site/:site_id/seos/redirect_urls/all",
91
+ "list_ribbons": "get:/api/v1/dashboard/site/:site_id/products/ribbons/all",
92
+ "list_saved_filters": "get:/api/v1/dashboard/site/:site_id/saved_filters",
93
+ "list_site_utms": "get:/api/v1/dashboard/site/:site_id/site_utms/all",
94
+ "list_subscribers": "get:/api/v1/dashboard/site/:site_id/subscriber/all",
95
+ "mark_notification_read": "post:/api/v1/dashboard/site/notifications/mark_as_read",
96
+ "moderate_reviews": "post:/api/v1/dashboard/site/:site_id/applications/product_reviews/update_status",
97
+ "refuse_invitation": "post:/api/v1/dashboard/site/invitations/refuse",
98
+ "remove_font": "delete:/api/v1/site/:site_id/remove_font",
99
+ "remove_font_group": "delete:/api/v1/site/:site_id/remove_font_groups",
100
+ "remove_ppd": "post:/api/v1/dashboard/site/:site_id/applications/personal_product_design/remove_ppd",
101
+ "remove_reviews": "post:/api/v1/dashboard/site/:site_id/applications/product_reviews/remove",
102
+ "rename_site": "post:/api/v1/site/:site_id/update_site_name",
103
+ "save_email_templates": "post:/api/v1/dashboard/site/:site_id/send_email/save",
104
+ "search_products": "get:/api/v1/dashboard/site/:site_id/products/search",
105
+ "set_default_language": "post:/api/v1/dashboard/site/:site_id/multilingual/change_language_default",
106
+ "sync_partner_feed": "post:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/:partner_feed_id/products/sync",
107
+ "toggle_debug_render": "post:/api/v1/dashboard/site/:site_id/cms_files/toggle_is_debug_render",
108
+ "unblock_all_phone_customers": "post:/api/v1/dashboard/site/:site_id/settings/block_phone_number/remove_all_block_phone_customers",
109
+ "update_affiliate_account": "post:/api/v1/dashboard/site/:site_id/affiliate/update_account_affiliate",
110
+ "update_affiliate_order_program": "post:/api/v1/dashboard/site/:site_id/affiliate/upsert_order_program_affiliate",
111
+ "update_affiliate_payout_status": "post:/api/v1/dashboard/site/:site_id/affiliate/update_status_payout_affiliate",
112
+ "update_affiliate_product_program": "post:/api/v1/dashboard/site/:site_id/affiliate/upsert_product_program_affiliate",
113
+ "update_app": "post:/api/v1/dashboard/site/:site_id/applications/subcriptions/update_app",
114
+ "update_app_review": "post:/api/v1/dashboard/site/:site_id/applications/subcriptions/update_app_review",
115
+ "update_appointment_address": "post:/api/v1/dashboard/site/:site_id/appointment/update_appointment_address",
116
+ "update_appointment_classify": "post:/api/v1/dashboard/site/:site_id/appointment/update_appointment_classify",
117
+ "update_appointment_employee": "post:/api/v1/dashboard/site/:site_id/appointment/update_appointment_employee",
118
+ "update_course": "patch:/api/v1/dashboard/site/:site_id/course-app/:id",
119
+ "update_domain": "post:/api/v1/dashboard/site/:site_id/domains/update",
120
+ "update_employee_permissions": "post:/api/v1/dashboard/site/:site_id/settings/employee/change_permissions",
121
+ "update_media_content": "post:/api/v1/site/:site_id/media/content/update",
122
+ "update_media_folder": "post:/api/v1/site/:site_id/media/folder/update",
123
+ "update_partner_feed": "post:/api/v1/dashboard/site/:site_id/sale_channels/partner_feeds/:partner_feed_id/update",
124
+ "update_price_contact": "post:/api/v1/dashboard/site/:site_id/settings/price_contact/update",
125
+ "update_product_measurement": "post:/api/v1/dashboard/site/:site_id/settings/product_measurement/update",
126
+ "update_pwa": "post:/api/v1/site/:site_id/pwa/upsert",
127
+ "update_redirect_url": "post:/api/v1/dashboard/site/:site_id/seos/redirect_urls/update",
128
+ "update_saved_filter": "post:/api/v1/dashboard/site/:site_id/saved_filters/:id/update",
129
+ "update_shipping": "post:/api/v1/dashboard/site/:site_id/settings/shipping/update",
130
+ "update_site_slug": "post:/api/v1/site/:site_id/update_slug_name",
131
+ "update_site_utm": "post:/api/v1/dashboard/site/:site_id/site_utms/update",
132
+ "upload_media_base64": "post:/api/v1/site/:site_id/media/content/b64",
133
+ "upsert_affiliate_product": "post:/api/v1/dashboard/site/:site_id/affiliate/upsert_product_affiliate",
134
+ "upsert_material": "post:/api/v1/dashboard/site/:site_id/products/materials/create_or_update",
135
+ "upsert_ppd": "post:/api/v1/dashboard/site/:site_id/applications/personal_product_design/upsert_ppd",
136
+ "upsert_product_brand": "post:/api/v1/dashboard/site/:site_id/products/product_brands/create_or_update",
137
+ "upsert_product_supplier": "post:/api/v1/dashboard/site/:site_id/products/product_suppliers/create_or_update",
138
+ "upsert_product_tag": "post:/api/v1/dashboard/site/:site_id/products/product_tags/create_or_update",
139
+ "upsert_ribbon": "post:/api/v1/dashboard/site/:site_id/products/ribbons/create_or_update",
140
+ "verify_domain": "post:/api/v1/dashboard/site/:site_id/domains/verify"
141
+ }
@@ -50,9 +50,4 @@ Omit \`id\` to create; include \`id\` to update. For a reply, set \`parent_id\`
50
50
  body.product_reviews = product_ids.map((product_id) => ({ product_id, is_removed: false, new: true }));
51
51
  return api.createOrUpdateReview(body);
52
52
  }));
53
- server.tool("remove_reviews", "Delete one or more reviews by id.", { ids: z.array(z.string()).min(1).describe("Review ids to delete") }, ({ ids }) => handle(() => api.removeReviews(ids)));
54
- server.tool("moderate_reviews", `Approve or hide reviews (change moderation status). \`permission\`: 0 = approved/shown, 1 = pending/hidden.`, {
55
- ids: z.array(z.string()).min(1).describe("Review ids to update"),
56
- permission: z.number().describe("0 = approved/shown, 1 = pending/hidden"),
57
- }, ({ ids, permission }) => handle(() => api.updateReviewStatus({ ids, permission })));
58
53
  }
@@ -10,74 +10,6 @@ export function registerSiteConfigTools(server, api, handle) {
10
10
  limit: z.number().optional().describe("Items per page"),
11
11
  term: z.string().optional().describe("Search term"),
12
12
  };
13
- // ── Domains ──
14
- server.tool("list_domains", "List custom domains attached to the site (plus the free subdomain).", list, (query) => handle(async () => unwrap(await api.listDomains(query), "domains")));
15
- server.tool("add_domain", "Attach a custom domain to the site. Triggers DNS/ownership validation.", {
16
- domain: z.string().describe("Domain name, e.g. shop.example.com"),
17
- type: z.number().optional().describe("Domain platform type code"),
18
- }, (body) => handle(async () => unwrap(await api.createDomain(body), "domain")));
19
- server.tool("update_domain", "Update a domain (rename or advanced settings such as redirect/SSL).", {
20
- domain_id: z.string().describe("Domain id"),
21
- domain: z.string().optional().describe("New domain name"),
22
- advanced_setting: z.record(z.any()).optional().describe("Advanced config (redirect/SSL)"),
23
- }, (body) => handle(() => api.updateDomain(body)));
24
- server.tool("verify_domain", "Run DNS verification for a domain and enqueue SSL issuance.", { domain_id: z.string().describe("Domain id") }, ({ domain_id }) => handle(() => api.verifyDomain(domain_id)));
25
- server.tool("delete_domain", "Detach/delete a custom domain from the site.", { domain_id: z.string().describe("Domain id") }, ({ domain_id }) => handle(() => api.deleteDomain(domain_id)));
26
- server.tool("check_domain", "Check whether a domain is available/valid without attaching it.", { domain: z.string().describe("Domain name to check") }, ({ domain }) => handle(() => api.checkDomain(domain)));
27
- // ── SEO redirect URLs ──
28
- server.tool("list_redirect_urls", "List SEO redirect URLs (301 redirects) for the site.", list, (query) => handle(async () => unwrap(await api.listRedirectUrls(query), "redirect_urls")));
29
- server.tool("create_redirect_url", "Create a redirect from one path to another.", {
30
- original_path: z.string().describe("Source path, e.g. /old-page"),
31
- target_path: z.string().describe("Destination path, e.g. /new-page"),
32
- }, (redirect_url) => handle(() => api.createRedirectUrl(redirect_url)));
33
- server.tool("update_redirect_url", "Update a redirect URL. Pass `is_deleted:true` to disable it.", {
34
- id: z.string().describe("Redirect id"),
35
- original_path: z.string().describe("Source path"),
36
- target_path: z.string().describe("Destination path"),
37
- is_deleted: z.boolean().optional().describe("Disable the redirect"),
38
- }, (redirect_url) => handle(() => api.updateRedirectUrl(redirect_url)));
39
- server.tool("delete_redirect_urls", "Delete redirect URLs by id.", { ids: z.array(z.string()).min(1).describe("Redirect ids") }, ({ ids }) => handle(() => api.deleteRedirectUrls(ids)));
40
- // ── Shipping ──
41
- server.tool("get_shipping", "Get the site's shipping configuration (zones, fees, adjustments).", {}, () => handle(async () => unwrap(await api.getShipping(), "shipping")));
42
- server.tool("update_shipping", "Update shipping config. Pass `idx` (the shipping record id) plus the fields to change (urban/suburban/area_shipping/adjust_price/shipping_unit/rank_priority).", {
43
- idx: z.string().describe("Shipping record id (from get_shipping)"),
44
- fields: z.record(z.any()).describe("Shipping fields to update"),
45
- }, ({ idx, fields }) => handle(() => api.updateShipping({ idx, ...fields })));
46
- // ── UTM links ──
47
- server.tool("list_site_utms", "List marketing UTM links (with view/order stats over the time window).", { ...list, start_time: z.string().optional().describe("ISO start time"), end_time: z.string().optional().describe("ISO end time") }, (query) => handle(async () => unwrap(await api.listSiteUtms(query), "site_utms")));
48
- server.tool("create_site_utm", "Create a UTM tracking link.", {
49
- name: z.string().describe("Link name"),
50
- url: z.string().describe("Destination URL"),
51
- utm_source: z.string().optional().describe("utm_source"),
52
- utm_medium: z.string().optional().describe("utm_medium"),
53
- utm_campaign: z.string().optional().describe("utm_campaign"),
54
- utm_term: z.string().optional().describe("utm_term"),
55
- utm_content: z.string().optional().describe("utm_content"),
56
- }, (site_utm) => handle(() => api.createSiteUtm(site_utm)));
57
- server.tool("update_site_utm", "Update a UTM link. Pass `id` plus fields to change.", { id: z.string().describe("UTM id"), fields: z.record(z.any()).describe("Fields to update") }, ({ id, fields }) => handle(() => api.updateSiteUtm({ id, ...fields })));
58
- server.tool("delete_site_utms", "Delete UTM links by id.", { ids: z.array(z.string()).min(1).describe("UTM ids") }, ({ ids }) => handle(() => api.deleteSiteUtms(ids)));
59
- // ── System logs ──
60
- server.tool("list_entity_logs", "List the activity/change logs for a specific entity (e.g. an order). Requires the entity id and type.", {
61
- id: z.string().describe("Entity id (e.g. an order id)"),
62
- type: z.string().default("orders").describe('Entity type (currently "orders")'),
63
- page: z.number().optional().describe("Page number"),
64
- limit: z.number().optional().describe("Items per page"),
65
- }, (query) => handle(async () => unwrap(await api.listSystemLogs(query), "system_logs")));
66
- // ── Saved filters ──
67
- server.tool("list_saved_filters", "List saved table filters for a given table (e.g. 'orders', 'products').", { table_key: z.string().describe("Table key the filters belong to") }, ({ table_key }) => handle(async () => unwrap(await api.listSavedFilters(table_key), "saved_filters")));
68
- server.tool("create_saved_filter", "Create a saved table filter. `for_all_employees:true` shares it (needs config permission).", {
69
- name: z.string().describe("Filter name"),
70
- table_key: z.string().describe("Table key"),
71
- filters: z.record(z.any()).describe("Filter criteria object"),
72
- for_all_employees: z.boolean().optional().describe("Share with all employees"),
73
- }, (saved_filter) => handle(async () => unwrap(await api.createSavedFilter(saved_filter), "saved_filter")));
74
- server.tool("update_saved_filter", "Update a saved filter by id.", {
75
- id: z.string().describe("Saved filter id"),
76
- name: z.string().optional().describe("New name"),
77
- filters: z.record(z.any()).optional().describe("New filter criteria"),
78
- for_all_employees: z.boolean().optional().describe("Share with all employees"),
79
- }, ({ id, ...saved_filter }) => handle(async () => unwrap(await api.updateSavedFilter(id, saved_filter), "saved_filter")));
80
- server.tool("delete_saved_filter", "Delete (or dismiss, if not owner) a saved filter by id.", { id: z.string().describe("Saved filter id") }, ({ id }) => handle(() => api.deleteSavedFilter(id)));
81
13
  // ── General settings / rename ──
82
14
  server.tool("update_site_settings", `Update general site settings. The \`settings\` object is shallow-merged onto existing settings;
83
15
  other top-level keys (currency, slugs, is_maintenance, robot_txt, …) replace directly.`, { settings: z.record(z.any()).describe("Top-level keys to update (nested settings:{...} merges; others replace)") }, ({ settings }) => handle(async () => {
@@ -100,19 +32,9 @@ other top-level keys (currency, slugs, is_maintenance, robot_txt, …) replace d
100
32
  }
101
33
  return api.updateSiteRaw(settings);
102
34
  }));
103
- server.tool("rename_site", "Rename the site (display name).", { name: z.string().describe("New site name") }, ({ name }) => handle(() => api.updateSiteName(name)));
104
- server.tool("update_site_slug", "Change the site's slug (subdomain). Fails if the slug is already taken.", { slug: z.string().describe("New slug") }, ({ slug }) => handle(() => api.updateSiteSlug(slug)));
105
- // ── Fonts ──
106
- server.tool("list_fonts", "List the site's uploaded/added fonts.", {}, () => handle(async () => unwrap(await api.loadFonts(), "data")));
107
- server.tool("remove_font", "Remove a font by id.", { id: z.string().describe("Font id") }, ({ id }) => handle(() => api.removeFont(id)));
108
- server.tool("list_font_groups", "List font groups (font families with weights).", {}, () => handle(() => api.loadFontGroups()));
109
35
  server.tool("create_font_group", "Create a font group (e.g. a Google Font family by URL).", {
110
36
  name: z.string().describe("Font group name"),
111
37
  type: z.string().optional().describe("Font type"),
112
38
  url: z.string().optional().describe("Font CSS/source URL"),
113
39
  }, (body) => handle(() => api.createFontGroup(body)));
114
- server.tool("remove_font_group", "Remove a font group by id.", { id: z.string().describe("Font group id") }, ({ id }) => handle(() => api.removeFontGroup(id)));
115
- // ── API keys / publish history ──
116
- server.tool("list_api_keys", "List the site's API keys.", { page: z.number().optional(), limit: z.number().optional() }, (query) => handle(async () => unwrap(await api.listApiKeys(query), "api_keys")));
117
- server.tool("list_publish_histories", "List the site's publish history (past publishes).", { page: z.number().optional(), limit: z.number().optional() }, (query) => handle(() => api.listPublishHistories(query)));
118
40
  }
package/dist/web-guide.js CHANGED
@@ -826,7 +826,7 @@ ${GLASS_CSS}
826
826
  <details style="margin-top:18px;padding:0">
827
827
  <summary>${L === "vi" ? "Dành cho người dùng nâng cao / lập trình viên" : "For advanced users / developers"}</summary>
828
828
  <p>${L === "vi" ? "Danh sách đầy đủ các công cụ và lệnh kỹ thuật:" : "Full list of tools and technical commands:"}</p>
829
- <pre>${L === "vi" ? "~280 tool: get_build_guide · list_elements · get_element · new_element · new_section · new_page_skeleton · validate_page · build_page · add_section · list_pages · get_page_source · search_page_elements · update_page_element · create_page · update_page · update_page_source · publish_site · list_cms_files · get_http_function · edit_http_function · run_function · debug_function · get_current_context · list_my_sites · switch_site · update_auth · toggle_confirm_mode · send_mail · …và nhiều hơn nữa" : "~280 tools: get_build_guide · list_elements · get_element · new_element · new_section · new_page_skeleton · validate_page · build_page · add_section · list_pages · get_page_source · search_page_elements · update_page_element · create_page · update_page · update_page_source · publish_site · list_cms_files · get_http_function · edit_http_function · run_function · debug_function · get_current_context · list_my_sites · switch_site · update_auth · toggle_confirm_mode · send_mail · …and more"}</pre>
829
+ <pre>${L === "vi" ? "40 tool, mỗi nhóm chọn việc bằng action: page · page_element · page_draft · compose · builder_ref · global_source · global_section · site_code · theme · product · product_category · promotion · order · blog · collection · cms_function · app · validate_page · build_page · publish_site · upload_images · get_current_context · switch_site · … + api_find / api_get / api_call cho 775 route backend" : "40 tools, each family picks the operation by action: page · page_element · page_draft · compose · builder_ref · global_source · global_section · site_code · theme · product · product_category · promotion · order · blog · collection · cms_function · app · validate_page · build_page · publish_site · upload_images · get_current_context · switch_site · … + api_find / api_get / api_call over 775 backend routes"}</pre>
830
830
  </details>
831
831
  </div>
832
832
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webcake-storefront-mcp",
3
- "version": "1.42.0",
3
+ "version": "2.0.0",
4
4
  "description": "MCP server for the WebCake/StoreCake storefront builder — page CRUD, page authoring, products, orders, and more",
5
5
  "mcpName": "io.github.vuluu2k/webcake-storefront-mcp",
6
6
  "license": "MIT",
@@ -1,27 +0,0 @@
1
- import { z } from "zod";
2
- // Affiliate / referral app (Enum.Application affiliates = 4).
3
- // Install first via install_app({ app: "affiliates" }). Endpoints under /affiliate/*.
4
- // Programs define commission rules; products opt in; accounts are affiliates; payouts settle commissions.
5
- export function registerAffiliateTools(server, api, handle) {
6
- const listShape = {
7
- page: z.number().optional().describe("Page number (default 1)"),
8
- limit: z.number().optional().describe("Items per page"),
9
- term: z.string().optional().describe("Search term"),
10
- };
11
- const unwrap = (res, key) => res?.data?.[key] ?? res?.[key] ?? res?.data ?? res;
12
- server.tool("get_affiliate_programs", "Get the affiliate commission programs (order-level and product-level) configured for the site.", {}, () => handle(async () => unwrap(await api.getProgramAffiliates(), "program_affiliates")));
13
- server.tool("get_affiliate_statistic", "Get aggregate affiliate statistics (clicks, orders, commission, payouts) for the site.", {}, () => handle(async () => unwrap(await api.getAffiliateStatistic(), "statistic")));
14
- server.tool("list_affiliate_products", "List products enrolled in the affiliate program (with their commission settings).", listShape, (query) => handle(async () => unwrap(await api.getProductAffiliates(query), "product_affiliates")));
15
- server.tool("list_affiliate_orders", "List affiliate-attributed orders (referrals that converted).", { ...listShape, status: z.number().optional().describe("Filter by order status code") }, (query) => handle(async () => unwrap(await api.getOrderAffiliates(query), "order_affiliates")));
16
- server.tool("list_affiliate_accounts", "List affiliate accounts (registered affiliates / referrers).", listShape, (query) => handle(async () => unwrap(await api.getAccountAffiliates(query), "account_affiliates")));
17
- server.tool("list_affiliate_payouts", "List affiliate payout requests/records.", { ...listShape, status: z.number().optional().describe("Filter by payout status code") }, (query) => handle(async () => unwrap(await api.getPayoutAffiliates(query), "payout_affiliates")));
18
- server.tool("update_affiliate_order_program", `Create/update the order-level affiliate commission program. \`payload\` is the program object
19
- (e.g. { "is_activated": true, "commission_type": ..., "commission_value": ... }).`, { payload: z.record(z.any()).describe("Order program settings object") }, ({ payload }) => handle(() => api.upsertOrderProgramAffiliate(payload)));
20
- server.tool("update_affiliate_product_program", "Create/update the product-level affiliate commission program. `payload` is the program object.", { payload: z.record(z.any()).describe("Product program settings object") }, ({ payload }) => handle(() => api.upsertProductProgramAffiliate(payload)));
21
- server.tool("upsert_affiliate_product", `Enroll/update a product in the affiliate program with its own commission. \`payload\` includes the
22
- product id and commission fields (e.g. { "product_id": "...", "commission_type": ..., "commission_value": ... }).`, { payload: z.record(z.any()).describe("Affiliate-product settings object") }, ({ payload }) => handle(() => api.upsertProductAffiliate(payload)));
23
- server.tool("delete_affiliate_products", "Remove products from the affiliate program. `payload` typically { ids: [...] }.", { payload: z.record(z.any()).describe('e.g. { "ids": ["..."] }') }, ({ payload }) => handle(() => api.deleteProductAffiliates(payload)));
24
- server.tool("update_affiliate_payout_status", `Update the status of affiliate payout(s). \`payload\` typically { ids: [...], status: <code> }.`, { payload: z.record(z.any()).describe('e.g. { "ids": ["..."], "status": 1 }') }, ({ payload }) => handle(() => api.updatePayoutAffiliateStatus(payload)));
25
- server.tool("delete_affiliate_accounts", "Remove affiliate accounts. `payload` typically { ids: [...] }.", { payload: z.record(z.any()).describe('e.g. { "ids": ["..."] }') }, ({ payload }) => handle(() => api.deleteAccountAffiliates(payload)));
26
- server.tool("update_affiliate_account", "Update an affiliate account (e.g. commission rate, status). `payload` is the account object incl. its id.", { payload: z.record(z.any()).describe("Affiliate account object incl. id") }, ({ payload }) => handle(() => api.updateAccountAffiliate(payload)));
27
- }
@@ -1,88 +0,0 @@
1
- import { z } from "zod";
2
- // Catalog taxonomy/extras that the dashboard exposes around products:
3
- // brands, suppliers, product tags, ribbons (sale badges), materials, variations,
4
- // measurement units, blocked phone numbers, and "contact for price" config.
5
- // All create_or_update endpoints upsert by id; pass is_removed:true to soft-delete.
6
- export function registerCatalogExtraTools(server, api, handle) {
7
- const unwrap = (res, key) => res?.data?.[key] ?? res?.[key] ?? res?.data ?? res;
8
- // ── Brands ──
9
- server.tool("list_product_brands", "List product brand tags for the site.", {}, () => handle(async () => unwrap(await api.listProductBrands(), "brand_tags")));
10
- server.tool("upsert_product_brand", "Create or update a product brand. Omit `id` to create; pass `is_removed:true` with an `id` to delete.", {
11
- id: z.string().optional().describe("Brand id (omit to create)"),
12
- name: z.string().describe("Brand name"),
13
- slug: z.string().optional().describe("URL slug"),
14
- description: z.string().optional().describe("Description"),
15
- is_removed: z.boolean().optional().describe("Set true to soft-delete"),
16
- }, (body) => handle(async () => unwrap(await api.upsertProductBrand(body), "brand_tag")));
17
- // ── Suppliers ──
18
- server.tool("list_product_suppliers", "List product supplier tags for the site.", {}, () => handle(async () => unwrap(await api.listProductSuppliers(), "supplier_tags")));
19
- server.tool("upsert_product_supplier", "Create or update a product supplier. Omit `id` to create; `is_removed:true` to delete.", {
20
- id: z.string().optional().describe("Supplier id (omit to create)"),
21
- name: z.string().describe("Supplier name"),
22
- is_removed: z.boolean().optional().describe("Set true to soft-delete"),
23
- }, (body) => handle(async () => unwrap(await api.upsertProductSupplier(body), "supplier_tag")));
24
- // ── Product tags ──
25
- server.tool("list_product_tags", "List product tags (paginated, searchable by name).", {
26
- page: z.number().optional().describe("Page number (default 1)"),
27
- limit: z.number().optional().describe("Items per page (default 20)"),
28
- term: z.string().optional().describe("Search by name"),
29
- }, (query) => handle(async () => unwrap(await api.listProductTags(query), "data")));
30
- server.tool("upsert_product_tag", "Create or update a product tag. Omit `id` to create; `is_removed:true` to delete (also detaches from products).", {
31
- id: z.string().optional().describe("Tag id (omit to create)"),
32
- name: z.string().describe("Tag name"),
33
- slug: z.string().optional().describe("URL slug"),
34
- is_removed: z.boolean().optional().describe("Set true to soft-delete"),
35
- }, (body) => handle(async () => unwrap(await api.upsertProductTag(body), "product_tag")));
36
- // ── Ribbons (sale badges) ──
37
- server.tool("list_ribbons", "List ribbons (product sale badges) for the site.", {}, () => handle(async () => unwrap(await api.listRibbons(), "ribbons")));
38
- server.tool("upsert_ribbon", "Create or update a ribbon (sale badge). `type` and `name` are unique per site. Omit `id` to create; `is_removed:true` to delete.", {
39
- id: z.string().optional().describe("Ribbon id (omit to create)"),
40
- name: z.string().describe("Ribbon name (unique per site)"),
41
- type: z.number().describe("Ribbon type code (unique per site)"),
42
- status: z.number().optional().describe("Status code"),
43
- start_time: z.string().optional().describe("ISO datetime the ribbon starts"),
44
- end_time: z.string().optional().describe("ISO datetime the ribbon ends"),
45
- end_day: z.number().optional().describe("Auto-expire after N days"),
46
- is_removed: z.boolean().optional().describe("Set true to soft-delete"),
47
- }, (body) => handle(async () => unwrap(await api.upsertRibbon(body), "ribbon")));
48
- // ── Materials ──
49
- server.tool("list_materials", "List product materials for the site.", {}, () => handle(async () => unwrap(await api.listMaterials(), "materials")));
50
- server.tool("upsert_material", "Create or update a product material. Supports nesting via parent_id. Omit `id` to create; `is_removed:true` to delete.", {
51
- id: z.string().optional().describe("Material id (omit to create)"),
52
- name: z.string().describe("Material name"),
53
- slug: z.string().optional().describe("URL slug"),
54
- description: z.string().optional().describe("Description"),
55
- parent_id: z.string().optional().describe("Parent material id (for nesting)"),
56
- is_removed: z.boolean().optional().describe("Set true to soft-delete"),
57
- }, (body) => handle(async () => unwrap(await api.upsertMaterial(body), "material")));
58
- // ── Variations ──
59
- server.tool("get_variation", "Get a single product variation by its id.", { variation_id: z.string().describe("Variation id") }, ({ variation_id }) => handle(async () => unwrap(await api.getVariation(variation_id), "variation")));
60
- // ── Measurement units ──
61
- server.tool("get_product_measurement", "Get the product measurement-unit tree (units with exchange values).", {}, () => handle(async () => unwrap(await api.getProductMeasurement(), "product_measures")));
62
- server.tool("update_product_measurement", "Upsert product measurement units (full list). Each unit upserts by id; pass is_removed:true to delete one.", {
63
- units: z.array(z.object({
64
- id: z.string().optional().describe("Unit id (omit to create)"),
65
- name: z.string().describe("Unit name"),
66
- is_default: z.boolean().describe("Whether this is the default/base unit"),
67
- exchange_value: z.number().describe("Conversion value vs the base unit"),
68
- parent_id: z.string().optional().describe("Parent unit id"),
69
- is_removed: z.boolean().optional().describe("Set true to delete this unit"),
70
- }).passthrough()).describe("Full list of measurement units"),
71
- }, ({ units }) => handle(() => api.updateProductMeasurement(units)));
72
- // ── Blocked phone numbers ──
73
- server.tool("list_blocked_phones", "List blocked phone numbers (e.g. blacklisted customers).", {
74
- term: z.string().optional().describe("Search term"),
75
- type: z.number().optional().describe("Block type code"),
76
- }, (query) => handle(async () => unwrap(await api.listBlockPhoneNumbers(query), "block_list")));
77
- server.tool("block_phone_customers", "Block customer phone numbers (upsert the given list).", { phone_numbers: z.array(z.string()).min(1).describe("Phone numbers to block") }, ({ phone_numbers }) => handle(() => api.upsertBlockPhoneCustomers(phone_numbers)));
78
- server.tool("unblock_all_phone_customers", "Remove all blocked customer phone numbers for the site.", {}, () => handle(() => api.removeAllBlockPhoneCustomers()));
79
- // ── Contact for price ──
80
- server.tool("get_price_contact", 'Get the "contact for price" config. type 1 = applied to products, 2 = applied to categories.', { type: z.number().optional().describe("1 = products, 2 = categories") }, ({ type }) => handle(async () => unwrap(await api.getPriceContacts(type), "price_contacts")));
81
- server.tool("update_price_contact", 'Set which products/categories are "contact for price" (full replace within the given type). type 1 → pass product_ids; type 2 → pass category_ids.', {
82
- type: z.number().describe("1 = products, 2 = categories"),
83
- product_ids: z.array(z.string()).optional().describe("Product ids (when type=1)"),
84
- category_ids: z.array(z.string()).optional().describe("Category ids (when type=2)"),
85
- }, (body) => handle(() => api.updatePriceContact(body)));
86
- // ── Category detail ──
87
- server.tool("get_category", "Get a single product category by id (includes custom sort product ids).", { category_id: z.string().describe("Category id") }, ({ category_id }) => handle(async () => unwrap(await api.getCategoryById(category_id), "data")));
88
- }
@@ -1,39 +0,0 @@
1
- import { z } from "zod";
2
- // Media library (folders + content) and PWA manifest. Binary file upload uses
3
- // multipart on the dashboard; here we expose listing, base64 upload, folder/content
4
- // edits, capacity, trash, and PWA config — the parts that work over JSON.
5
- export function registerMediaTools(server, api, handle) {
6
- const unwrap = (res, key) => (key && (res?.data?.[key] ?? res?.[key])) ?? res?.data ?? res;
7
- const listShape = {
8
- folder_id: z.string().optional().describe("Folder id (omit for root)"),
9
- keyword: z.string().optional().describe("Search keyword"),
10
- is_trash: z.boolean().optional().describe("List trashed items"),
11
- page: z.number().optional().describe("Page number"),
12
- page_size: z.number().optional().describe("Items per page"),
13
- order: z.string().optional().describe("Sort order"),
14
- };
15
- server.tool("list_media_folders", "List media-library folders (optionally under a parent folder).", { ...listShape, is_tree: z.boolean().optional().describe("Return the full folder tree") }, (query) => handle(async () => unwrap(await api.listMediaFolders(query))));
16
- server.tool("list_media_content", "List media-library content (images/videos/files), optionally filtered by folder.", { ...listShape, media_types: z.array(z.string()).optional().describe("Filter by type, e.g. ['image']") }, (query) => handle(async () => unwrap(await api.listMediaContent(query))));
17
- server.tool("list_media_all", "List folders and content together in one call.", listShape, (query) => handle(async () => unwrap(await api.listMediaAll(query))));
18
- server.tool("get_media_capacity", "Get media storage capacity/usage for the site.", {}, () => handle(async () => unwrap(await api.getMediaCapacity())));
19
- server.tool("upload_media_base64", "Upload an image to the media library from a base64 data URI. Returns the CDN URL.", { base64: z.string().describe("Base64 data URI (data:image/...;base64,...)") }, ({ base64 }) => handle(async () => unwrap(await api.uploadBase64Media(base64))));
20
- server.tool("update_media_folder", "Update a media folder (rename, move, or trash). Pass `id` plus fields.", {
21
- id: z.string().describe("Folder id"),
22
- name: z.string().optional().describe("New name"),
23
- folder_id: z.string().optional().describe("Move under this parent folder"),
24
- is_deleted: z.boolean().optional().describe("Move to trash"),
25
- }, (body) => handle(async () => unwrap(await api.updateMediaFolder(body))));
26
- server.tool("update_media_content", "Update a media content item (rename, move, or trash). Pass `id` plus fields.", {
27
- id: z.string().describe("Content id"),
28
- name: z.string().optional().describe("New name"),
29
- folder_id: z.string().optional().describe("Move into this folder"),
30
- is_deleted: z.boolean().optional().describe("Move to trash"),
31
- }, (body) => handle(async () => unwrap(await api.updateMediaContent(body))));
32
- server.tool("empty_media_trash", "Permanently delete all trashed media folders and content.", {}, () => handle(() => api.emptyMediaTrash()));
33
- // ── PWA ──
34
- server.tool("get_pwa", "Get the site's PWA configuration (manifest + iOS icon).", {}, () => handle(() => api.getPwa()));
35
- server.tool("update_pwa", "Update the PWA manifest (the full manifest object replaces the existing one).", {
36
- manifest: z.record(z.any()).describe("PWA manifest object (name, short_name, icons, display, …)"),
37
- ios_icon_url: z.string().optional().describe("iOS home-screen icon URL"),
38
- }, (body) => handle(() => api.upsertPwa(body)));
39
- }
@@ -1,45 +0,0 @@
1
- import { z } from "zod";
2
- // Sale-channels app: partner product feeds (Google/Facebook/etc.) and catalog syncs.
3
- // Sitemaps need no tool: the backend builds them at render time (<domain>/root_sitemaps.xml). Google Ads / OAuth-connect flows are intentionally omitted —
4
- // they require an externally-authorized Google/Facebook partner.
5
- export function registerSaleChannelTools(server, api, handle) {
6
- const unwrap = (res, key) => (key && (res?.data?.[key] ?? res?.[key])) ?? res?.data ?? res;
7
- // ── Partner feeds ──
8
- server.tool("list_partner_feeds", "List product feeds for sale channels (Google Shopping, Facebook, etc.).", {
9
- page: z.number().optional().describe("Page number"),
10
- limit: z.number().optional().describe("Items per page"),
11
- term: z.string().optional().describe("Search term"),
12
- type: z.string().optional().describe("Feed type filter"),
13
- }, (query) => handle(async () => unwrap(await api.listPartnerFeeds(query), "partner_feeds")));
14
- server.tool("create_partner_feed", "Create a product feed. `name` is required; slug auto-generates. Optionally pass product_conditions to auto-populate.", {
15
- type: z.string().describe("Feed type, e.g. 'google', 'facebook'"),
16
- partner_feed: z.object({
17
- name: z.string().describe("Feed name"),
18
- slug: z.string().optional(),
19
- type: z.string().optional(),
20
- product_conditions: z.array(z.any()).optional().describe("Auto-include conditions"),
21
- condition_type: z.string().optional(),
22
- settings: z.record(z.any()).optional(),
23
- status: z.string().optional(),
24
- }).passthrough().describe("Feed object"),
25
- add_partner_product_feed_ids: z.array(z.string()).optional().describe("Product ids to add"),
26
- delete_partner_product_feed_ids: z.array(z.string()).optional().describe("Product ids to remove"),
27
- }, (body) => handle(async () => unwrap(await api.createPartnerFeed(body), "partner_feed")));
28
- server.tool("update_partner_feed", "Update a product feed. `partner_feed.id` must match `partner_feed_id`.", {
29
- partner_feed_id: z.string().describe("Feed id (path)"),
30
- type: z.string().describe("Feed type"),
31
- partner_feed: z.record(z.any()).describe("Feed object incl. id"),
32
- add_partner_product_feed_ids: z.array(z.string()).optional(),
33
- delete_partner_product_feed_ids: z.array(z.string()).optional(),
34
- }, ({ partner_feed_id, ...body }) => handle(async () => unwrap(await api.updatePartnerFeed(partner_feed_id, body), "partner_feed")));
35
- server.tool("delete_partner_feeds", "Delete product feeds by id.", { ids: z.array(z.string()).min(1).describe("Feed ids") }, ({ ids }) => handle(() => api.deletePartnerFeeds(ids)));
36
- server.tool("list_partner_feed_products", "List the products inside a specific product feed.", {
37
- partner_feed_id: z.string().describe("Feed id"),
38
- page: z.number().optional().describe("Page number"),
39
- limit: z.number().optional().describe("Items per page"),
40
- term: z.string().optional().describe("Search term"),
41
- }, ({ partner_feed_id, ...query }) => handle(async () => unwrap(await api.listPartnerFeedProducts(partner_feed_id, query), "product_feeds")));
42
- server.tool("sync_partner_feed", "Publish/sync a feed's products to its destination channel.", { partner_feed_id: z.string().describe("Feed id") }, ({ partner_feed_id }) => handle(() => api.syncPartnerFeed(partner_feed_id)));
43
- // ── Google merchants (read) ──
44
- server.tool("list_google_merchants", "List the Google Merchant records linked to the site (read-only).", { platform: z.number().optional().describe("Platform code (default 1 = google_merchant)") }, (query) => handle(async () => unwrap(await api.listGoogleMerchants(query), "merchants")));
45
- }