viewgate-mcp 1.0.43 → 1.0.44
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/dist/index.js +45 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
name: "generate_ui_components",
|
|
65
|
-
description: "
|
|
65
|
+
description: "Fetch pending UI component specs and return clear instructions for the LLM to implement a real, functional component. Does not write files, upload previews, or mark components as generated.",
|
|
66
66
|
inputSchema: {
|
|
67
67
|
type: "object",
|
|
68
68
|
properties: {
|
|
@@ -99,6 +99,19 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: "get_ui_improvements",
|
|
104
|
+
description: "Fetch pending UI/UX improvement tickets. STRICTLY LIMITED TO VISUAL/CSS CHANGES. Do not add functional logic or modify backend integrations.",
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: "object",
|
|
107
|
+
properties: {
|
|
108
|
+
limit: { type: "number", description: "Max results.", default: 5 },
|
|
109
|
+
search: { type: "string", description: "Search message/file." },
|
|
110
|
+
key: { type: "string", description: "VG-XXXX key." },
|
|
111
|
+
ids: { type: "string", description: "Internal IDs." }
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
102
115
|
{
|
|
103
116
|
name: "mark_annotation_ready",
|
|
104
117
|
description: "Mark as ready/applied. Use internal IDs. IMPORTANT: appliedChanges must be in the project's preferredLanguage (e.g. SPANISH).",
|
|
@@ -256,11 +269,15 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
256
269
|
requiredProps,
|
|
257
270
|
commonProps,
|
|
258
271
|
figmaUrl: item.figmaUrl,
|
|
272
|
+
htmlContent: item.htmlContent,
|
|
273
|
+
cssContent: item.cssContent,
|
|
274
|
+
sourceType: item.sourceType,
|
|
259
275
|
constraints: {
|
|
260
276
|
mustBeFunctional: true,
|
|
261
277
|
mustSupportRequiredProps: true,
|
|
262
278
|
mustSupportCommonProps: true,
|
|
263
279
|
avoidBreakingChanges: true,
|
|
280
|
+
useProvidedHtmlAndCssIfAvailable: true
|
|
264
281
|
}
|
|
265
282
|
};
|
|
266
283
|
results.push({
|
|
@@ -477,6 +494,33 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}
|
|
|
477
494
|
: (data.preferredLanguage === 'en' ? "\n*** [INSTRUCTION: Provide all comments and analysis in English.] ***\n\n\n\n" : "");
|
|
478
495
|
return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
|
|
479
496
|
}
|
|
497
|
+
case "get_ui_improvements": {
|
|
498
|
+
const args = request.params.arguments;
|
|
499
|
+
const fetchUrl = new URL(`${BACKEND_URL}/api/mcp/ui-improvements`);
|
|
500
|
+
if (args.limit)
|
|
501
|
+
fetchUrl.searchParams.append("limit", args.limit.toString());
|
|
502
|
+
if (args.search)
|
|
503
|
+
fetchUrl.searchParams.append("search", args.search);
|
|
504
|
+
if (args.key)
|
|
505
|
+
fetchUrl.searchParams.append("key", args.key);
|
|
506
|
+
if (args.ids)
|
|
507
|
+
fetchUrl.searchParams.append("ids", args.ids);
|
|
508
|
+
const response = await fetch(fetchUrl, {
|
|
509
|
+
headers: {
|
|
510
|
+
'x-api-key': apiKey,
|
|
511
|
+
...(personalKey ? { 'x-personal-key': personalKey } : {})
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
if (!response.ok) {
|
|
515
|
+
const errorBody = await response.text();
|
|
516
|
+
throw new Error(`Backend responded with ${response.status}: ${errorBody}`);
|
|
517
|
+
}
|
|
518
|
+
const data = (await response.json());
|
|
519
|
+
const langHint = data.preferredLanguage === 'es'
|
|
520
|
+
? "\n*** [INSTRUCTION: Project is in SPANISH. Provide all CSS/Visual changes in SPANISH comments if requested.] ***\n\n\n\n"
|
|
521
|
+
: "";
|
|
522
|
+
return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
|
|
523
|
+
}
|
|
480
524
|
case "sync_endpoints": {
|
|
481
525
|
const args = request.params.arguments;
|
|
482
526
|
const response = await fetch(`${BACKEND_URL}/api/mcp/sync-endpoints`, {
|