@wix/mcp 1.0.22 → 1.0.24
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/build/bin-standalone.js +1114 -1093
- package/build/bin-standalone.js.map +4 -4
- package/build/cjs/index.cjs +8738 -7238
- package/build/cjs/index.cjs.map +4 -4
- package/build/dts/api-call/index.d.ts +7 -1
- package/build/dts/api-call/index.d.ts.map +1 -1
- package/build/dts/api-call/index.js +115 -39
- package/build/dts/api-call/index.js.map +1 -1
- package/build/dts/api-call/upload-image-tool.d.ts +8 -0
- package/build/dts/api-call/upload-image-tool.d.ts.map +1 -0
- package/build/dts/api-call/upload-image-tool.js +150 -0
- package/build/dts/api-call/upload-image-tool.js.map +1 -0
- package/build/dts/api-call/validation.d.ts +1 -0
- package/build/dts/api-call/validation.d.ts.map +1 -1
- package/build/dts/api-call/validation.js +7 -7
- package/build/dts/api-call/validation.js.map +1 -1
- package/build/dts/bin.d.ts.map +1 -1
- package/build/dts/bin.js.map +1 -1
- package/build/dts/cli-tools/cli.d.ts.map +1 -1
- package/build/dts/cli-tools/cli.js +6 -4
- package/build/dts/cli-tools/cli.js.map +1 -1
- package/build/dts/config/default-config.d.ts +41 -0
- package/build/dts/config/default-config.d.ts.map +1 -0
- package/build/dts/config/default-config.js +169 -0
- package/build/dts/config/default-config.js.map +1 -0
- package/build/dts/docs/create-site-guide.d.ts +1 -1
- package/build/dts/docs/create-site-guide.d.ts.map +1 -1
- package/build/dts/docs/create-site-guide.js +5 -2
- package/build/dts/docs/create-site-guide.js.map +1 -1
- package/build/dts/docs/docs.d.ts +24 -0
- package/build/dts/docs/docs.d.ts.map +1 -1
- package/build/dts/docs/docs.js +117 -167
- package/build/dts/docs/docs.js.map +1 -1
- package/build/dts/docs/fetch-article.d.ts +1 -1
- package/build/dts/docs/fetch-article.d.ts.map +1 -1
- package/build/dts/docs/fetch-article.js +39 -1
- package/build/dts/docs/fetch-article.js.map +1 -1
- package/build/dts/docs/get-to-know.d.ts +16 -2
- package/build/dts/docs/get-to-know.d.ts.map +1 -1
- package/build/dts/docs/get-to-know.js +80 -80
- package/build/dts/docs/get-to-know.js.map +1 -1
- package/build/dts/docs/semanticSearch.d.ts.map +1 -1
- package/build/dts/docs/semanticSearch.js +4 -1
- package/build/dts/docs/semanticSearch.js.map +1 -1
- package/build/dts/docs/semanticSearch.test.js +5 -14
- package/build/dts/docs/semanticSearch.test.js.map +1 -1
- package/build/dts/docs/velo-readme.d.ts.map +1 -1
- package/build/dts/docs/velo-readme.js +1 -1
- package/build/dts/docs/velo-readme.js.map +1 -1
- package/build/dts/index.d.ts +5 -2
- package/build/dts/index.d.ts.map +1 -1
- package/build/dts/index.js +4 -0
- package/build/dts/index.js.map +1 -1
- package/build/dts/infra/logger.d.ts +1 -0
- package/build/dts/infra/logger.d.ts.map +1 -1
- package/build/dts/infra/logger.js +4 -0
- package/build/dts/infra/logger.js.map +1 -1
- package/build/dts/infra/widget-payload.d.ts +11 -0
- package/build/dts/infra/widget-payload.d.ts.map +1 -0
- package/build/dts/infra/widget-payload.js +2 -0
- package/build/dts/infra/widget-payload.js.map +1 -0
- package/build/dts/site-widget-tools/constants.d.ts +4 -0
- package/build/dts/site-widget-tools/constants.d.ts.map +1 -0
- package/build/dts/site-widget-tools/constants.js +6 -0
- package/build/dts/site-widget-tools/constants.js.map +1 -0
- package/build/dts/site-widget-tools/edit-site-tool/index.d.ts +4 -0
- package/build/dts/site-widget-tools/edit-site-tool/index.d.ts.map +1 -0
- package/build/dts/site-widget-tools/edit-site-tool/index.js +171 -0
- package/build/dts/site-widget-tools/edit-site-tool/index.js.map +1 -0
- package/build/dts/site-widget-tools/index.d.ts +4 -0
- package/build/dts/site-widget-tools/index.d.ts.map +1 -0
- package/build/dts/site-widget-tools/index.js +4 -0
- package/build/dts/site-widget-tools/index.js.map +1 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/index.d.ts +4 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/index.d.ts.map +1 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/index.js +177 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/index.js.map +1 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/types.d.ts +52 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/types.d.ts.map +1 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/types.js +2 -0
- package/build/dts/site-widget-tools/pull-site-creation-job-tool/types.js.map +1 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.d.ts +4 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.d.ts.map +1 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.js +157 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.js.map +1 -0
- package/build/dts/support/index.d.ts +1 -1
- package/build/dts/support/index.d.ts.map +1 -1
- package/build/dts/support/index.js +15 -17
- package/build/dts/support/index.js.map +1 -1
- package/build/dts/widget-manifest.d.ts +6 -0
- package/build/dts/widget-manifest.d.ts.map +1 -0
- package/build/dts/widget-manifest.js +19 -0
- package/build/dts/widget-manifest.js.map +1 -0
- package/build/dts/wix-mcp-server.d.ts +18 -3
- package/build/dts/wix-mcp-server.d.ts.map +1 -1
- package/build/dts/wix-mcp-server.js +129 -106
- package/build/dts/wix-mcp-server.js.map +1 -1
- package/build/esm/index.js +8402 -6402
- package/build/esm/index.js.map +4 -4
- package/package.json +49 -25
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ReadmeDocConfig } from '../docs/get-to-know.js';
|
|
2
|
+
import type { DocsTool } from '../docs/docs.js';
|
|
3
|
+
import type { ToolHintsConfig } from '../api-call/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration structure for MCP modes
|
|
6
|
+
*/
|
|
7
|
+
export interface ModeDefaultConfig {
|
|
8
|
+
toolDescriptions: Record<string, string>;
|
|
9
|
+
disableTools: string[];
|
|
10
|
+
enableTools: string[];
|
|
11
|
+
readmeDocs: ReadmeDocConfig[];
|
|
12
|
+
toolHints?: Record<string, ToolHintsConfig>;
|
|
13
|
+
docsTools?: DocsTool[];
|
|
14
|
+
getToKnowWixEnabled?: boolean;
|
|
15
|
+
createWixBusinessGuideEnabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* System reminder text - provides flow guidance for LLMs
|
|
19
|
+
*/
|
|
20
|
+
export declare const SYSTEM_REMINDER: string;
|
|
21
|
+
/**
|
|
22
|
+
* Default tool descriptions - single source of truth for all tool descriptions
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultToolDescriptions: Record<string, string>;
|
|
25
|
+
/**
|
|
26
|
+
* Default readme docs - content for WixREADME tool response
|
|
27
|
+
*/
|
|
28
|
+
export declare const defaultReadmeDocs: ReadmeDocConfig[];
|
|
29
|
+
/**
|
|
30
|
+
* Merge base config with overrides
|
|
31
|
+
* @param base - Base configuration
|
|
32
|
+
* @param overrides - Partial overrides to apply
|
|
33
|
+
* @returns Merged configuration
|
|
34
|
+
*/
|
|
35
|
+
export declare function mergeConfig(base: ModeDefaultConfig, overrides: Partial<ModeDefaultConfig>): ModeDefaultConfig;
|
|
36
|
+
/**
|
|
37
|
+
* Default config - used by both /mcp and /v2 endpoints
|
|
38
|
+
* All tools enabled, all descriptions, good readmeDocs
|
|
39
|
+
*/
|
|
40
|
+
export declare const defaultConfig: ModeDefaultConfig;
|
|
41
|
+
//# sourceMappingURL=default-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../../../src/config/default-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE5C,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,6BAA6B,CAAC,EAAE,OAAO,CAAC;CACzC;AAED;;GAEG;AACH,eAAO,MAAM,eAAe,QAO3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkE1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAuD9C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,iBAAiB,EACvB,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACpC,iBAAiB,CAiBnB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,iBAQ3B,CAAC"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
/**
|
|
3
|
+
* System reminder text - provides flow guidance for LLMs
|
|
4
|
+
*/
|
|
5
|
+
export const SYSTEM_REMINDER = dedent `
|
|
6
|
+
<system-reminder>
|
|
7
|
+
Wix MCP Site Management Flows:
|
|
8
|
+
- RECIPE BASED (PREFERRED!): WixREADME() -> find relevant recipe for the user's prompt/task -> read recipe using ReadFullDocsArticle() -> call API using CallWixSiteAPI() based on the recipe
|
|
9
|
+
- EXAMPLE BASED: WixREADME() -> no relevant recipe found for user's prompt/task -> SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() to get method code examples -> call API using CallWixSiteAPI() based on the method code examples
|
|
10
|
+
- SCHEMA BASED, FALLBACK: WixREADME() -> no relevant recipe found for user's prompt/task -> SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() -> no method code examples found -> read method schema using ReadFullDocsMethodSchema() -> call API using CallWixSiteAPI() based on the schema
|
|
11
|
+
</system-reminder>
|
|
12
|
+
`;
|
|
13
|
+
/**
|
|
14
|
+
* Default tool descriptions - single source of truth for all tool descriptions
|
|
15
|
+
*/
|
|
16
|
+
export const defaultToolDescriptions = {
|
|
17
|
+
WixREADME: dedent `
|
|
18
|
+
# Tool: WixREADME
|
|
19
|
+
**Directive:** \`WixREADME\` is the **MANDATORY FIRST STEP** for all Wix-related tasks. Its output (including relevant linked documents) provides foundational context for all other Wix tools. Adherence to this protocol is **NON-NEGOTIABLE**.
|
|
20
|
+
${SYSTEM_REMINDER}
|
|
21
|
+
`,
|
|
22
|
+
SearchWixRESTDocumentation: dedent `
|
|
23
|
+
Searches the official Wix REST API documentation.
|
|
24
|
+
Use this tool whenever you need to to interact with the Wix platform via HTTP requests.
|
|
25
|
+
Specify the API endpoint, resource, or action you need information about (e.g., 'get site details endpoint', 'create data collection', 'update product API', 'REST authentication').
|
|
26
|
+
If you can't find what you need, try to rephrase your search term or use bigger maxResults value.
|
|
27
|
+
${SYSTEM_REMINDER}
|
|
28
|
+
`,
|
|
29
|
+
ReadFullDocsArticle: dedent `
|
|
30
|
+
Fetches the full Wix docs article or method article with code examples for using the method.
|
|
31
|
+
Docs articles looks like this: https://dev.wix.com/docs/... and they can either be general docs articles or method articles.
|
|
32
|
+
${SYSTEM_REMINDER}
|
|
33
|
+
`,
|
|
34
|
+
ReadFullDocsMethodSchema: dedent `
|
|
35
|
+
Fetches the full method schema for a given method.
|
|
36
|
+
This will give you the entire request/response schema with all the fields and their descriptions.
|
|
37
|
+
${SYSTEM_REMINDER}
|
|
38
|
+
`,
|
|
39
|
+
CallWixSiteAPI: dedent `
|
|
40
|
+
Call Wix apis on a business or site. Use this to create, read, update, and delete data and other Wix entities in your Wix site,
|
|
41
|
+
The API endpoint url param MUST ALWAYS be taken from the conversation context.
|
|
42
|
+
By conversation context we mean the endpoint url was given in the user prompt or got into the conversation context by the "WixREADME" tool or by the "SearchWixRESTDocumentation" tool or by the "ReadFullDocsArticle" tool.
|
|
43
|
+
Error Handling:
|
|
44
|
+
If the error is related to missing installed app or "WDE0110: Wix Code not enabled", you should install the missing app by using ReadFullDocsArticle tool to fetch the article - https://dev.wix.com/docs/kb-only/MCP_REST_RECIPES_KB_ID/TRAIN_wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp
|
|
45
|
+
**Note:** there is no need to check if an app is installed/ Wix Code enabled in advance, just call the API and handle the error if it occurs, the API error message will state it clearly.
|
|
46
|
+
For any other error, use your default error handling mechanism
|
|
47
|
+
Allowed API urls are: wix.com, dev.wix.com, manage.wix.com, editor.wix.com, wixapis.com
|
|
48
|
+
Docs urls like https://dev.wix.com/docs/... are not api urls, if you want to read the docs, use the "ReadFullDocsArticle" tool
|
|
49
|
+
${SYSTEM_REMINDER}
|
|
50
|
+
`,
|
|
51
|
+
ListWixSites: dedent `
|
|
52
|
+
List Wix sites for the current user, by default it will return all sites, but you can filter by name
|
|
53
|
+
${SYSTEM_REMINDER}
|
|
54
|
+
`,
|
|
55
|
+
ManageWixSite: dedent `
|
|
56
|
+
Use account level API in order to create a site, update a site and publish site.
|
|
57
|
+
The API endpoint url param MUST ALWAYS be taken from the conversation context.
|
|
58
|
+
By conversation context we mean the endpoint url was given in the user prompt or got into the conversation context by the "WixREADME" tool or by the "SearchWixRESTDocumentation" tool or by the "ReadFullDocsArticle" tool.
|
|
59
|
+
${SYSTEM_REMINDER}
|
|
60
|
+
`,
|
|
61
|
+
UploadImageToWixSite: dedent `
|
|
62
|
+
Upload an image file to a Wix site Media Manager.
|
|
63
|
+
This tool accepts an image from the user and uploads it to the specified Wix site.
|
|
64
|
+
Returns the uploaded file URL (wixstatic.com) and media ID that can be used in other Wix APIs.
|
|
65
|
+
Use this when the user wants to upload a local image to their Wix site.
|
|
66
|
+
`,
|
|
67
|
+
SupportAndFeedback: dedent `
|
|
68
|
+
If the user would like to provide Wix with some feedback (good or bad), about the tools in Wix MCP,
|
|
69
|
+
for example they used the tools provided, and they reflected satisfaction or dissatisfaction with the tools.
|
|
70
|
+
Also, if you encounter too many errors tyring to call the Wix API, you can also suggest the user to provide feedback to Wix using this tool.
|
|
71
|
+
**IMPORTANT NOTE**
|
|
72
|
+
This tool is not sending the message, but formats it in order to another tool to actually send it
|
|
73
|
+
`
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Default readme docs - content for WixREADME tool response
|
|
77
|
+
*/
|
|
78
|
+
export const defaultReadmeDocs = [
|
|
79
|
+
{
|
|
80
|
+
action: 'text',
|
|
81
|
+
content: dedent `
|
|
82
|
+
<system>
|
|
83
|
+
|
|
84
|
+
The main goal of the WixREADME tool is to help you manage your Wix business by making API calls to the Wix API.
|
|
85
|
+
|
|
86
|
+
A common flow would be:
|
|
87
|
+
1. User asks you to do something,
|
|
88
|
+
2. You use the "WixREADME" tool to get the context,
|
|
89
|
+
3. You find a relevant recipe in the recipes index,
|
|
90
|
+
4. You use the "ReadFullDocsArticle" tool to get the full recipe,
|
|
91
|
+
5. You use the "CallWixSiteAPI" tool to call the API (No need to search or read the full schema, just call the API according to the recipe)
|
|
92
|
+
|
|
93
|
+
Another flow would be:
|
|
94
|
+
1. User asks you to do something,
|
|
95
|
+
2. You use the "WixREADME" tool to get the context,
|
|
96
|
+
3. You do not find a relevant recipe in the recipes index,
|
|
97
|
+
4. You use the "SearchWixRESTDocumentation" tool to search for the API you should invoke,
|
|
98
|
+
5. You read the relevant articles using the "ReadFullDocsArticle" tool,
|
|
99
|
+
6. You find a relevant code example in the articles,
|
|
100
|
+
7. You use the "CallWixSiteAPI" tool to call the API. (No need to read the full schema, just call the API according to the code example)
|
|
101
|
+
|
|
102
|
+
Fallback flow (No relevant recipe or code example found, or you failed using the other flows):
|
|
103
|
+
1. User asks you to do something,
|
|
104
|
+
2. You use the "WixREADME" tool to get the context,
|
|
105
|
+
3. You do not find a relevant recipe in the recipes index,
|
|
106
|
+
4. You use the "SearchWixRESTDocumentation" tool to search for the API you should invoke,
|
|
107
|
+
5. You read the relevant articles using the "ReadFullDocsArticle" tool,
|
|
108
|
+
6. You do not find a relevant code example in the articles,
|
|
109
|
+
7. You use the "ReadFullDocsMethodSchema" tool to get the full method schema,
|
|
110
|
+
8. You use the "CallWixSiteAPI" tool to call the API. (No need to search or read the full schema, just call the API according to the method schema)
|
|
111
|
+
</system>
|
|
112
|
+
`
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/recipes-v2/manage/management-recipes-index',
|
|
116
|
+
action: 'include'
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-business-solutions',
|
|
120
|
+
action: 'index',
|
|
121
|
+
title: 'Wix Business Solutions',
|
|
122
|
+
description: dedent `
|
|
123
|
+
This document provides an overview of the all business solutions available in Wix.
|
|
124
|
+
|
|
125
|
+
Use this document under the following scenarios:
|
|
126
|
+
1. The user asks general questions about Wix business solutions.
|
|
127
|
+
2. The user asks about a specific business solution, and you want to provide a high-level overview of it.
|
|
128
|
+
3. The user looks for a specific business solution, and you want to provide a list of all available solutions.
|
|
129
|
+
|
|
130
|
+
Please note that this is a large document. Only use it for the scenarios mentioned above.
|
|
131
|
+
`
|
|
132
|
+
}
|
|
133
|
+
];
|
|
134
|
+
/**
|
|
135
|
+
* Merge base config with overrides
|
|
136
|
+
* @param base - Base configuration
|
|
137
|
+
* @param overrides - Partial overrides to apply
|
|
138
|
+
* @returns Merged configuration
|
|
139
|
+
*/
|
|
140
|
+
export function mergeConfig(base, overrides) {
|
|
141
|
+
return {
|
|
142
|
+
toolDescriptions: {
|
|
143
|
+
...base.toolDescriptions,
|
|
144
|
+
...overrides.toolDescriptions
|
|
145
|
+
},
|
|
146
|
+
disableTools: [...base.disableTools, ...(overrides.disableTools ?? [])],
|
|
147
|
+
enableTools: [...base.enableTools, ...(overrides.enableTools ?? [])],
|
|
148
|
+
readmeDocs: overrides.readmeDocs ?? base.readmeDocs,
|
|
149
|
+
toolHints: { ...base.toolHints, ...overrides.toolHints },
|
|
150
|
+
docsTools: overrides.docsTools ?? base.docsTools,
|
|
151
|
+
getToKnowWixEnabled: overrides.getToKnowWixEnabled ?? base.getToKnowWixEnabled,
|
|
152
|
+
createWixBusinessGuideEnabled: overrides.createWixBusinessGuideEnabled ??
|
|
153
|
+
base.createWixBusinessGuideEnabled
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Default config - used by both /mcp and /v2 endpoints
|
|
158
|
+
* All tools enabled, all descriptions, good readmeDocs
|
|
159
|
+
*/
|
|
160
|
+
export const defaultConfig = {
|
|
161
|
+
toolDescriptions: defaultToolDescriptions,
|
|
162
|
+
disableTools: [],
|
|
163
|
+
enableTools: [],
|
|
164
|
+
readmeDocs: defaultReadmeDocs,
|
|
165
|
+
docsTools: ['REST'],
|
|
166
|
+
getToKnowWixEnabled: true,
|
|
167
|
+
createWixBusinessGuideEnabled: true
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=default-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../../../src/config/default-config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAoB5B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAA;;;;;;;CAOpC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC7D,SAAS,EAAE,MAAM,CAAA;;;MAGb,eAAe;GAClB;IAED,0BAA0B,EAAE,MAAM,CAAA;;;;;MAK9B,eAAe;GAClB;IAED,mBAAmB,EAAE,MAAM,CAAA;;;MAGvB,eAAe;GAClB;IAED,wB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IAAI,IAAI,CAAC,SAAS;QAChD,mBAAmB,EACjB,SAAS,CAAC,mBAAmB,IAAI,IAAI,CAAC,mBAAmB;QAC3D,6BAA6B,EAC3B,SAAS,CAAC,6BAA6B;YACvC,IAAI,CAAC,6BAA6B;KACrC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC9C,gBAAgB,EAAE,uBAAuB;IACzC,YAAY,EAAE,EAAE;IAChB,WAAW,EAAE,EAAE;IACf,UAAU,EAAE,iBAAiB;IAC7B,SAAS,EAAE,CAAC,MAAM,CAAC;IACnB,mBAAmB,EAAE,IAAI;IACzB,6BAA6B,EAAE,IAAI;CACpC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { WixMcpServer } from '../wix-mcp-server.js';
|
|
2
|
-
export declare function addCreateWixBusinessGuideTools(server: WixMcpServer): Promise<void>;
|
|
2
|
+
export declare function addCreateWixBusinessGuideTools(server: WixMcpServer, disableTools?: string[], toolDescriptions?: Record<string, string>): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=create-site-guide.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-site-guide.d.ts","sourceRoot":"","sources":["../../../src/docs/create-site-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA6CpD,wBAAsB,8BAA8B,
|
|
1
|
+
{"version":3,"file":"create-site-guide.d.ts","sourceRoot":"","sources":["../../../src/docs/create-site-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA6CpD,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,YAAY,EACpB,YAAY,GAAE,MAAM,EAAO,EAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,iBA8C1C"}
|
|
@@ -37,8 +37,11 @@ This tool provides complete documentation including:
|
|
|
37
37
|
2. Use CallWixSiteAPI to install apps (if needed)
|
|
38
38
|
|
|
39
39
|
If the user wants to create a Wix site, call this tool directly. It contains ALL necessary documentation. You don't need to search for additional documentation, read more articles, use the WixREADME tool etc unless the user asks you to do so explicitly or you encounter an error.`;
|
|
40
|
-
export async function addCreateWixBusinessGuideTools(server) {
|
|
41
|
-
|
|
40
|
+
export async function addCreateWixBusinessGuideTools(server, disableTools = [], toolDescriptions) {
|
|
41
|
+
if (disableTools.includes('CreateWixBusinessGuide')) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
server.tool('CreateWixBusinessGuide', toolDescriptions?.['CreateWixBusinessGuide'] ?? CREATE_SITE_DESCRIPTION, {}, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (_args, { httpClient }) => {
|
|
42
45
|
try {
|
|
43
46
|
const contents = await Promise.all(CREATE_SITE_DOCS.map(async ({ url, title, nextSteps }) => {
|
|
44
47
|
const articleContent = await fetchArticleContent(httpClient, url, 'article', true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-site-guide.js","sourceRoot":"","sources":["../../../src/docs/create-site-guide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,gBAAgB,GAAG;IACvB;QACE,GAAG,EAAE,+FAA+F;QACpG,KAAK,EAAE,8BAA8B;QACrC,SAAS,EACP,gGAAgG;KACnG;IACD;QACE,GAAG,EAAE,+HAA+H;QACpI,KAAK,EAAE,kCAAkC;QACzC,SAAS,EACP,2GAA2G;KAC9G;CACF,CAAC;AAEF,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;wRAyBwP,CAAC;AAEzR,MAAM,CAAC,KAAK,UAAU,8BAA8B,
|
|
1
|
+
{"version":3,"file":"create-site-guide.js","sourceRoot":"","sources":["../../../src/docs/create-site-guide.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MA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AC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,6CAA8C,KAAe,CAAC,OAAO,EAAE;qBAC9E;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/build/dts/docs/docs.d.ts
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
import type { WixMcpServer } from '../wix-mcp-server.js';
|
|
2
|
+
import { McpAuthenticationStrategy } from '../auth/index.js';
|
|
2
3
|
export declare const VALID_DOCS_TOOLS: readonly ["WDS", "REST", "SDK", "BUILD_APPS", "WIX_HEADLESS", "VELO", "BUSINESS_SOLUTIONS"];
|
|
3
4
|
export type DocsTool = (typeof VALID_DOCS_TOOLS)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a README doc entry
|
|
7
|
+
*/
|
|
8
|
+
export interface ReadmeDocConfig {
|
|
9
|
+
url?: string;
|
|
10
|
+
action: 'include' | 'index' | 'text' | 'api';
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
content?: string;
|
|
14
|
+
/** HTTP method for API calls (only used when action is 'api'). Defaults to 'GET' */
|
|
15
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
16
|
+
/** Request body for API calls (only used when action is 'api' with POST/PUT/PATCH) */
|
|
17
|
+
body?: Record<string, unknown>;
|
|
18
|
+
}
|
|
4
19
|
export interface DocsToolsOptions {
|
|
5
20
|
getToKnowWixEnabled?: boolean;
|
|
6
21
|
createWixBusinessGuideEnabled?: boolean;
|
|
22
|
+
disableTools?: string[];
|
|
23
|
+
/** Custom descriptions for tools, keyed by tool name */
|
|
24
|
+
toolDescriptions?: Record<string, string>;
|
|
25
|
+
/** Custom list of docs that compose the WixREADME tool output */
|
|
26
|
+
readmeDocs?: ReadmeDocConfig[];
|
|
27
|
+
/** Authentication strategy for API calls (required if using 'api' action in readmeDocs) */
|
|
28
|
+
authStrategy?: McpAuthenticationStrategy;
|
|
29
|
+
/** Override base URL for Picasso docs (e.g., "http://localhost:4000" for local dev) */
|
|
30
|
+
picassoPortalUrl?: string;
|
|
7
31
|
}
|
|
8
32
|
export declare const addDocsTools: (server: WixMcpServer, allowedTools?: DocsTool[], options?: DocsToolsOptions) => void;
|
|
9
33
|
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/docs/docs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/docs/docs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,eAAO,MAAM,gBAAgB,6FAQnB,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,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