viewgate-mcp 1.0.34 → 1.0.36
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 +20 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,22 +51,22 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
51
51
|
tools: [
|
|
52
52
|
{
|
|
53
53
|
name: "get_annotations",
|
|
54
|
-
description: "
|
|
54
|
+
description: "Fetch feedback. Keys ('VG-XXXX') or IDs. Workflow: 1. Fetch, 2. Fix, 3. Mark Ready.",
|
|
55
55
|
inputSchema: {
|
|
56
56
|
type: "object",
|
|
57
57
|
properties: {
|
|
58
|
-
limit: { type: "number", description: "
|
|
59
|
-
status: { type: "string", description: "Comma
|
|
60
|
-
search: { type: "string", description: "Search
|
|
61
|
-
key: { type: "string", description: "
|
|
62
|
-
keys: { type: "array", items: { type: "string" }, description: "
|
|
63
|
-
ids: { type: "string", description: "
|
|
58
|
+
limit: { type: "number", description: "Max results.", default: 3 },
|
|
59
|
+
status: { type: "string", description: "Comma list (pending,bug_fixing).", default: "pending,bug_fixing" },
|
|
60
|
+
search: { type: "string", description: "Search message/file." },
|
|
61
|
+
key: { type: "string", description: "VG-XXXX key." },
|
|
62
|
+
keys: { type: "array", items: { type: "string" }, description: "Keys array." },
|
|
63
|
+
ids: { type: "string", description: "Internal IDs." }
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
name: "mark_annotation_ready",
|
|
69
|
-
description: "
|
|
69
|
+
description: "Mark as ready/applied. Use internal IDs.",
|
|
70
70
|
inputSchema: {
|
|
71
71
|
type: "object",
|
|
72
72
|
properties: {
|
|
@@ -75,8 +75,8 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
75
75
|
items: {
|
|
76
76
|
type: "object",
|
|
77
77
|
properties: {
|
|
78
|
-
id: { type: "string", description: "
|
|
79
|
-
appliedChanges: { type: "string", description: "
|
|
78
|
+
id: { type: "string", description: "Internal ID." },
|
|
79
|
+
appliedChanges: { type: "string", description: "Summary." }
|
|
80
80
|
},
|
|
81
81
|
required: ["id", "appliedChanges"]
|
|
82
82
|
}
|
|
@@ -87,14 +87,14 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
name: "mark_annotations_as_live",
|
|
90
|
-
description: "
|
|
90
|
+
description: "Mark as live (ready_for_review). IDs required.",
|
|
91
91
|
inputSchema: {
|
|
92
92
|
type: "object",
|
|
93
93
|
properties: {
|
|
94
94
|
ids: {
|
|
95
95
|
type: "array",
|
|
96
96
|
items: { type: "string" },
|
|
97
|
-
description: "
|
|
97
|
+
description: "Internal IDs."
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
required: ["ids"]
|
|
@@ -157,22 +157,6 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
157
157
|
description: "Retrieves the list of endpoints currently synchronized in the backend.",
|
|
158
158
|
inputSchema: { type: "object", properties: {} },
|
|
159
159
|
},
|
|
160
|
-
{
|
|
161
|
-
name: "get_optimizations",
|
|
162
|
-
description: "Retrieves reported JSON payload optimizations.",
|
|
163
|
-
inputSchema: { type: "object", properties: {} },
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
name: "mark_optimization_applied",
|
|
167
|
-
description: "Marks a payload optimization as applied.",
|
|
168
|
-
inputSchema: {
|
|
169
|
-
type: "object",
|
|
170
|
-
properties: {
|
|
171
|
-
id: { type: "string" }
|
|
172
|
-
},
|
|
173
|
-
required: ["id"]
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
160
|
{
|
|
177
161
|
name: "get_ai_resolved_tickets",
|
|
178
162
|
description: "Retrieves the list of ticket IDs that have already been resolved by the AI in the current sprint.",
|
|
@@ -298,19 +282,14 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
298
282
|
componentName: ann.componentName,
|
|
299
283
|
figmaReference: ann.figmaReference,
|
|
300
284
|
backendEndpoints: ann.backendEndpoints || [],
|
|
301
|
-
_ia_fix_instruction:
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
${
|
|
305
|
-
|
|
306
|
-
${ann.corrections && Array.isArray(ann.corrections) && ann.corrections.length > 0 ?
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
1. **Target**: \`data-vg-id="${ann.reference?.vgId}"\` in \`${file}\`.
|
|
310
|
-
2. **Context**: \`${ann.reference?.parentContext?.slice(0, 50)}...\`
|
|
311
|
-
|
|
312
|
-
IMPORTANT: Respond in ${rawData.preferredLanguage === 'es' ? 'SPANISH' : 'ENGLISH'}.
|
|
313
|
-
Instruction: ${ann.message}`
|
|
285
|
+
_ia_fix_instruction: `[AUTONOMOUS_MODE: TRUE]
|
|
286
|
+
Target: ${file} (data-vg-id="${ann.reference?.vgId}")
|
|
287
|
+
Context: ${ann.reference?.parentContext?.slice(0, 40)}...
|
|
288
|
+
${figmaLinks ? `Figma: ${figmaLinks}` : ''}
|
|
289
|
+
${ann.backendEndpoints?.length ? `Endpoints: ${ann.backendEndpoints.join(', ')}` : ''}
|
|
290
|
+
${ann.corrections && Array.isArray(ann.corrections) && ann.corrections.length > 0 ? `Feedback: ${ann.corrections[ann.corrections.length - 1].text}` : ''}
|
|
291
|
+
Task: ${ann.message}
|
|
292
|
+
Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
|
|
314
293
|
};
|
|
315
294
|
});
|
|
316
295
|
return {
|
|
@@ -394,23 +373,6 @@ Instruction: ${ann.message}`
|
|
|
394
373
|
const data = await response.json();
|
|
395
374
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
396
375
|
}
|
|
397
|
-
case "get_optimizations": {
|
|
398
|
-
const response = await fetch(`${BACKEND_URL}/api/mcp/optimizations`, {
|
|
399
|
-
headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
|
|
400
|
-
});
|
|
401
|
-
if (!response.ok)
|
|
402
|
-
throw new Error(`Backend responded with ${response.status}`);
|
|
403
|
-
const data = await response.json();
|
|
404
|
-
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
405
|
-
}
|
|
406
|
-
case "mark_optimization_applied": {
|
|
407
|
-
const args = request.params.arguments;
|
|
408
|
-
const response = await fetch(`${BACKEND_URL}/api/mcp/optimizations/${args.id}/applied`, {
|
|
409
|
-
method: 'PATCH',
|
|
410
|
-
headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
|
|
411
|
-
});
|
|
412
|
-
return { content: [{ type: "text", text: "Optimization marked as applied." }] };
|
|
413
|
-
}
|
|
414
376
|
case "get_ai_resolved_tickets": {
|
|
415
377
|
const response = await fetch(`${BACKEND_URL}/api/mcp/resolved-tickets`, {
|
|
416
378
|
headers: { 'x-api-key': apiKey, ...(personalKey ? { 'x-personal-key': personalKey } : {}) }
|