viewgate-mcp 1.0.5 → 1.0.7
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 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48,7 +48,7 @@ function createMcpServer(apiKey) {
|
|
|
48
48
|
tools: [
|
|
49
49
|
{
|
|
50
50
|
name: "get_annotations",
|
|
51
|
-
description: "Retrieves all feedback annotations.
|
|
51
|
+
description: "Retrieves all feedback annotations. WORKFLOW: 1. Read these annotations, 2. Open the source files and apply SURGICAL fixes based on '_ia_fix_instruction'. 3. IMMEDIATELY call 'mark_annotation_ready' with the results for EACH ticket you fixed. Use 'outerHtml' and 'source' (file:line) to locate the exact code block without manual searching. IMPORTANT: All AI analysis and comments MUST be in the 'preferredLanguage' specified in the output.",
|
|
52
52
|
inputSchema: {
|
|
53
53
|
type: "object",
|
|
54
54
|
properties: {},
|
|
@@ -56,24 +56,23 @@ function createMcpServer(apiKey) {
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
name: "mark_annotation_ready",
|
|
59
|
-
description: "
|
|
59
|
+
description: "CRITICAL: Call this tool AFTER applying code fixes for annotations. It marks tickets as 'Ready for Review' in the ViewGate dashboard and stores your AI-generated change summary. Support batch processing of multiple tickets at once.",
|
|
60
60
|
inputSchema: {
|
|
61
61
|
type: "object",
|
|
62
62
|
properties: {
|
|
63
|
-
|
|
64
|
-
type: "
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
description: "Brief summary of what was changed in the code"
|
|
63
|
+
results: {
|
|
64
|
+
type: "array",
|
|
65
|
+
items: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
id: { type: "string", description: "The ID of the annotation to mark as ready" },
|
|
69
|
+
appliedChanges: { type: "string", description: "Descriptive summary of what was changed in the code for this specific ticket" }
|
|
70
|
+
},
|
|
71
|
+
required: ["id", "appliedChanges"]
|
|
72
|
+
}
|
|
74
73
|
}
|
|
75
74
|
},
|
|
76
|
-
required: ["
|
|
75
|
+
required: ["results"]
|
|
77
76
|
},
|
|
78
77
|
},
|
|
79
78
|
{
|
|
@@ -203,25 +202,26 @@ function createMcpServer(apiKey) {
|
|
|
203
202
|
}
|
|
204
203
|
case "mark_annotation_ready": {
|
|
205
204
|
try {
|
|
206
|
-
const
|
|
207
|
-
const response = await fetch(`${BACKEND_URL}/api/annotations
|
|
205
|
+
const args = request.params.arguments;
|
|
206
|
+
const response = await fetch(`${BACKEND_URL}/api/mcp/annotations/batch-ready`, {
|
|
208
207
|
method: 'PATCH',
|
|
209
208
|
headers: {
|
|
210
209
|
'Content-Type': 'application/json',
|
|
211
210
|
'x-api-key': apiKey
|
|
212
211
|
},
|
|
213
|
-
body: JSON.stringify({
|
|
212
|
+
body: JSON.stringify({ results: args.results })
|
|
214
213
|
});
|
|
215
214
|
if (!response.ok) {
|
|
216
|
-
throw new Error(`Backend responded with ${response.status} when updating
|
|
215
|
+
throw new Error(`Backend responded with ${response.status} when updating annotations`);
|
|
217
216
|
}
|
|
217
|
+
const result = await response.json();
|
|
218
218
|
return {
|
|
219
|
-
content: [{ type: "text", text: `Successfully
|
|
219
|
+
content: [{ type: "text", text: `Successfully processed batch update: ${JSON.stringify(result, null, 2)}` }],
|
|
220
220
|
};
|
|
221
221
|
}
|
|
222
222
|
catch (error) {
|
|
223
223
|
return {
|
|
224
|
-
content: [{ type: "text", text: `Error marking
|
|
224
|
+
content: [{ type: "text", text: `Error marking annotations ready: ${error.message}` }],
|
|
225
225
|
isError: true,
|
|
226
226
|
};
|
|
227
227
|
}
|