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.
Files changed (2) hide show
  1. package/dist/index.js +20 -20
  2. 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. For each annotation, follow the '_ia_fix_instruction' to perform a FAST, SURGICAL fix. 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.",
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: "Mark an annotation as ready for review after applying changes, and generate a local Markdown log.",
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
- id: {
64
- type: "string",
65
- description: "The ID of the annotation to mark as ready"
66
- },
67
- originalMessage: {
68
- type: "string",
69
- description: "The original feedback message for the changelog"
70
- },
71
- appliedChanges: {
72
- type: "string",
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: ["id", "originalMessage", "appliedChanges"]
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 { id, appliedChanges } = request.params.arguments;
207
- const response = await fetch(`${BACKEND_URL}/api/annotations/${id}`, {
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({ status: 'ready_for_review' })
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 annotation`);
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 marked annotation ${id} as ready_for_review.` }],
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 annotation ready: ${error.message}` }],
224
+ content: [{ type: "text", text: `Error marking annotations ready: ${error.message}` }],
225
225
  isError: true,
226
226
  };
227
227
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-mcp",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "viewgate-mcp": "./dist/index.js"