mcp4openapi 0.3.1 → 0.3.4

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 (160) hide show
  1. package/README.md +7 -0
  2. package/dist/src/auth/oauth-provider.d.ts +1 -0
  3. package/dist/src/auth/oauth-provider.d.ts.map +1 -1
  4. package/dist/src/auth/oauth-provider.js +17 -0
  5. package/dist/src/auth/oauth-provider.js.map +1 -1
  6. package/dist/src/core/cli-config.d.ts.map +1 -1
  7. package/dist/src/core/cli-config.js +2 -0
  8. package/dist/src/core/cli-config.js.map +1 -1
  9. package/dist/src/core/index.d.ts.map +1 -1
  10. package/dist/src/core/index.js +18 -3
  11. package/dist/src/core/index.js.map +1 -1
  12. package/dist/src/index.js +0 -0
  13. package/dist/src/profile/profile-allowlist.d.ts +18 -0
  14. package/dist/src/profile/profile-allowlist.d.ts.map +1 -0
  15. package/dist/src/profile/profile-allowlist.js +68 -0
  16. package/dist/src/profile/profile-allowlist.js.map +1 -0
  17. package/dist/src/profile/profile-registry.d.ts +5 -0
  18. package/dist/src/profile/profile-registry.d.ts.map +1 -1
  19. package/dist/src/profile/profile-registry.js +38 -14
  20. package/dist/src/profile/profile-registry.js.map +1 -1
  21. package/dist/src/security/ssrf-validator.d.ts +31 -0
  22. package/dist/src/security/ssrf-validator.d.ts.map +1 -0
  23. package/dist/src/security/ssrf-validator.js +190 -0
  24. package/dist/src/security/ssrf-validator.js.map +1 -0
  25. package/package.json +2 -2
  26. package/profiles/gitlab/developer-profile-oauth.json +445 -81
  27. package/profiles/gitlab/developer-profile-oauth.test.json +1037 -12
  28. package/profiles/gitlab/openapi.yaml +1420 -165
  29. package/profiles/gitlab/profile-optimized-oauth.json +928 -0
  30. package/profiles/gitlab/profile-optimized-oauth.test.json +1606 -0
  31. package/profiles/grafana/openapi.json +28078 -0
  32. package/profiles/grafana/profile.json +1083 -0
  33. package/profiles/grafana/profile.test.json +235 -0
  34. package/profiles/mattermost/openapi.yaml +27434 -0
  35. package/profiles/mattermost/profile.json +463 -0
  36. package/profiles/mattermost/profile.test.json +607 -0
  37. package/profiles/n8n/profile-optimized.json +1002 -364
  38. package/profiles/n8n/profile-optimized.test.json +43 -43
  39. package/dist/src/argument-normalizer.d.ts +0 -5
  40. package/dist/src/argument-normalizer.d.ts.map +0 -1
  41. package/dist/src/argument-normalizer.js +0 -61
  42. package/dist/src/argument-normalizer.js.map +0 -1
  43. package/dist/src/cli-config.d.ts +0 -9
  44. package/dist/src/cli-config.d.ts.map +0 -1
  45. package/dist/src/cli-config.js +0 -111
  46. package/dist/src/cli-config.js.map +0 -1
  47. package/dist/src/composite-executor.d.ts +0 -77
  48. package/dist/src/composite-executor.d.ts.map +0 -1
  49. package/dist/src/composite-executor.js +0 -193
  50. package/dist/src/composite-executor.js.map +0 -1
  51. package/dist/src/constants.d.ts +0 -85
  52. package/dist/src/constants.d.ts.map +0 -1
  53. package/dist/src/constants.js +0 -85
  54. package/dist/src/constants.js.map +0 -1
  55. package/dist/src/dag-executor.d.ts +0 -49
  56. package/dist/src/dag-executor.d.ts.map +0 -1
  57. package/dist/src/dag-executor.js +0 -138
  58. package/dist/src/dag-executor.js.map +0 -1
  59. package/dist/src/errors.d.ts +0 -59
  60. package/dist/src/errors.d.ts.map +0 -1
  61. package/dist/src/errors.js +0 -119
  62. package/dist/src/errors.js.map +0 -1
  63. package/dist/src/filtering.d.ts +0 -19
  64. package/dist/src/filtering.d.ts.map +0 -1
  65. package/dist/src/filtering.js +0 -292
  66. package/dist/src/filtering.js.map +0 -1
  67. package/dist/src/http-client-factory.d.ts +0 -62
  68. package/dist/src/http-client-factory.d.ts.map +0 -1
  69. package/dist/src/http-client-factory.js +0 -133
  70. package/dist/src/http-client-factory.js.map +0 -1
  71. package/dist/src/http-transport-config.d.ts +0 -6
  72. package/dist/src/http-transport-config.d.ts.map +0 -1
  73. package/dist/src/http-transport-config.js +0 -47
  74. package/dist/src/http-transport-config.js.map +0 -1
  75. package/dist/src/http-transport.d.ts +0 -316
  76. package/dist/src/http-transport.d.ts.map +0 -1
  77. package/dist/src/http-transport.js +0 -2412
  78. package/dist/src/http-transport.js.map +0 -1
  79. package/dist/src/interceptors.d.ts +0 -116
  80. package/dist/src/interceptors.d.ts.map +0 -1
  81. package/dist/src/interceptors.js +0 -392
  82. package/dist/src/interceptors.js.map +0 -1
  83. package/dist/src/jsonrpc-validator.d.ts +0 -27
  84. package/dist/src/jsonrpc-validator.d.ts.map +0 -1
  85. package/dist/src/jsonrpc-validator.js +0 -58
  86. package/dist/src/jsonrpc-validator.js.map +0 -1
  87. package/dist/src/logger.d.ts +0 -59
  88. package/dist/src/logger.d.ts.map +0 -1
  89. package/dist/src/logger.js +0 -177
  90. package/dist/src/logger.js.map +0 -1
  91. package/dist/src/mcp-server-manager.d.ts +0 -20
  92. package/dist/src/mcp-server-manager.d.ts.map +0 -1
  93. package/dist/src/mcp-server-manager.js +0 -38
  94. package/dist/src/mcp-server-manager.js.map +0 -1
  95. package/dist/src/mcp-server.d.ts +0 -203
  96. package/dist/src/mcp-server.d.ts.map +0 -1
  97. package/dist/src/mcp-server.js +0 -1369
  98. package/dist/src/mcp-server.js.map +0 -1
  99. package/dist/src/metrics.d.ts +0 -97
  100. package/dist/src/metrics.d.ts.map +0 -1
  101. package/dist/src/metrics.js +0 -273
  102. package/dist/src/metrics.js.map +0 -1
  103. package/dist/src/naming-warnings.d.ts +0 -23
  104. package/dist/src/naming-warnings.d.ts.map +0 -1
  105. package/dist/src/naming-warnings.js +0 -83
  106. package/dist/src/naming-warnings.js.map +0 -1
  107. package/dist/src/naming.d.ts +0 -58
  108. package/dist/src/naming.d.ts.map +0 -1
  109. package/dist/src/naming.js +0 -510
  110. package/dist/src/naming.js.map +0 -1
  111. package/dist/src/oauth-provider.d.ts +0 -131
  112. package/dist/src/oauth-provider.d.ts.map +0 -1
  113. package/dist/src/oauth-provider.js +0 -836
  114. package/dist/src/oauth-provider.js.map +0 -1
  115. package/dist/src/openapi-parser.d.ts +0 -70
  116. package/dist/src/openapi-parser.d.ts.map +0 -1
  117. package/dist/src/openapi-parser.js +0 -436
  118. package/dist/src/openapi-parser.js.map +0 -1
  119. package/dist/src/profile-loader.d.ts +0 -78
  120. package/dist/src/profile-loader.d.ts.map +0 -1
  121. package/dist/src/profile-loader.js +0 -483
  122. package/dist/src/profile-loader.js.map +0 -1
  123. package/dist/src/profile-registry.d.ts +0 -18
  124. package/dist/src/profile-registry.d.ts.map +0 -1
  125. package/dist/src/profile-registry.js +0 -26
  126. package/dist/src/profile-registry.js.map +0 -1
  127. package/dist/src/profile-resolver.d.ts +0 -19
  128. package/dist/src/profile-resolver.d.ts.map +0 -1
  129. package/dist/src/profile-resolver.js +0 -167
  130. package/dist/src/profile-resolver.js.map +0 -1
  131. package/dist/src/proxy-executor.d.ts +0 -86
  132. package/dist/src/proxy-executor.d.ts.map +0 -1
  133. package/dist/src/proxy-executor.js +0 -497
  134. package/dist/src/proxy-executor.js.map +0 -1
  135. package/dist/src/schema-validator.d.ts +0 -30
  136. package/dist/src/schema-validator.d.ts.map +0 -1
  137. package/dist/src/schema-validator.js +0 -128
  138. package/dist/src/schema-validator.js.map +0 -1
  139. package/dist/src/startup-profile.d.ts +0 -17
  140. package/dist/src/startup-profile.d.ts.map +0 -1
  141. package/dist/src/startup-profile.js +0 -30
  142. package/dist/src/startup-profile.js.map +0 -1
  143. package/dist/src/startup-validation.d.ts +0 -11
  144. package/dist/src/startup-validation.d.ts.map +0 -1
  145. package/dist/src/startup-validation.js +0 -21
  146. package/dist/src/startup-validation.js.map +0 -1
  147. package/dist/src/tool-filter.d.ts +0 -65
  148. package/dist/src/tool-filter.d.ts.map +0 -1
  149. package/dist/src/tool-filter.js +0 -471
  150. package/dist/src/tool-filter.js.map +0 -1
  151. package/dist/src/tool-generator.d.ts +0 -67
  152. package/dist/src/tool-generator.d.ts.map +0 -1
  153. package/dist/src/tool-generator.js +0 -182
  154. package/dist/src/tool-generator.js.map +0 -1
  155. package/dist/src/validation-utils.d.ts +0 -49
  156. package/dist/src/validation-utils.d.ts.map +0 -1
  157. package/dist/src/validation-utils.js +0 -138
  158. package/dist/src/validation-utils.js.map +0 -1
  159. package/profiles/gitlab/developer-profile.json +0 -1508
  160. package/profiles/gitlab/developer-profile.test.json +0 -3432
@@ -0,0 +1,1606 @@
1
+ {
2
+ "$schema": "../../src/testing/test-schema.ts",
3
+ "profile_name": "gitlab-optimized-oauth",
4
+ "variables": {
5
+ "projectId": "123",
6
+ "groupId": "456",
7
+ "issueIid": 1,
8
+ "mergeRequestIid": 2,
9
+ "discussionId": "discussion-1",
10
+ "noteId": 10,
11
+ "awardId": 7,
12
+ "snippetId": 55,
13
+ "filePath": "README.md",
14
+ "ref": "main",
15
+ "fromRef": "main",
16
+ "toRef": "feature-branch",
17
+ "pipelineId": 1001,
18
+ "jobId": 2002,
19
+ "artifactPath": "reports/coverage.xml",
20
+ "hookId": 9001,
21
+ "variableKey": "DEPLOY_ENV"
22
+ },
23
+ "scenarios": [
24
+ {
25
+ "name": "Projects - List",
26
+ "tool": "retrieve_content",
27
+ "arguments": {
28
+ "action": "list_projects"
29
+ },
30
+ "mocks": [
31
+ {
32
+ "operationId": "getApiV4Projects",
33
+ "response": {
34
+ "body": [{"id": 123, "name": "demo"}]
35
+ }
36
+ }
37
+ ],
38
+ "expect": {
39
+ "success": true,
40
+ "result": [{"id": 123}]
41
+ }
42
+ },
43
+ {
44
+ "name": "Projects - List owned",
45
+ "tool": "retrieve_content",
46
+ "arguments": {
47
+ "action": "list_projects",
48
+ "owned": true
49
+ },
50
+ "mocks": [
51
+ {
52
+ "operationId": "getApiV4Projects",
53
+ "response": {
54
+ "body": [{"id": 456, "name": "my-project", "path_with_namespace": "me/my-project"}]
55
+ }
56
+ }
57
+ ],
58
+ "expect": {
59
+ "success": true,
60
+ "result": [{"id": 456}]
61
+ }
62
+ },
63
+ {
64
+ "name": "Projects - List membership",
65
+ "tool": "retrieve_content",
66
+ "arguments": {
67
+ "action": "list_projects",
68
+ "membership": true
69
+ },
70
+ "mocks": [
71
+ {
72
+ "operationId": "getApiV4Projects",
73
+ "response": {
74
+ "body": [{"id": 789, "name": "team-project", "path_with_namespace": "team/team-project"}]
75
+ }
76
+ }
77
+ ],
78
+ "expect": {
79
+ "success": true,
80
+ "result": [{"id": 789}]
81
+ }
82
+ },
83
+ {
84
+ "name": "Projects - Get",
85
+ "tool": "retrieve_content",
86
+ "arguments": {
87
+ "action": "get_project",
88
+ "project_id": "{{projectId}}"
89
+ },
90
+ "mocks": [
91
+ {
92
+ "operationId": "getApiV4ProjectsId",
93
+ "response": {
94
+ "body": {"id": 123, "name": "demo"}
95
+ }
96
+ }
97
+ ],
98
+ "expect": {
99
+ "success": true,
100
+ "result": {"id": 123}
101
+ }
102
+ },
103
+ {
104
+ "name": "Issues - List",
105
+ "tool": "retrieve_content",
106
+ "arguments": {
107
+ "action": "list_issues",
108
+ "project_id": "{{projectId}}",
109
+ "state": "opened"
110
+ },
111
+ "mocks": [
112
+ {
113
+ "operationId": "getApiV4ProjectsIdIssues",
114
+ "response": {
115
+ "body": [{"id": 1, "iid": 1, "title": "Bug"}]
116
+ }
117
+ }
118
+ ],
119
+ "expect": {
120
+ "success": true,
121
+ "result": [{"title": "Bug"}]
122
+ }
123
+ },
124
+ {
125
+ "name": "Issues - List Global",
126
+ "tool": "retrieve_content",
127
+ "arguments": {
128
+ "action": "list_issues_global",
129
+ "state": "opened"
130
+ },
131
+ "mocks": [
132
+ {
133
+ "operationId": "getApiV4Issues",
134
+ "response": {
135
+ "body": [{"id": 11, "iid": 2, "title": "Global Bug"}]
136
+ }
137
+ }
138
+ ],
139
+ "expect": {
140
+ "success": true,
141
+ "result": [{"title": "Global Bug"}]
142
+ }
143
+ },
144
+ {
145
+ "name": "Issues - Get",
146
+ "tool": "retrieve_content",
147
+ "arguments": {
148
+ "action": "get_issue",
149
+ "project_id": "{{projectId}}",
150
+ "issue_iid": "{{issueIid}}"
151
+ },
152
+ "mocks": [
153
+ {
154
+ "operationId": "getApiV4ProjectsIdIssuesIssueIid",
155
+ "response": {
156
+ "body": {"id": 1, "iid": 1, "title": "Bug"}
157
+ }
158
+ }
159
+ ],
160
+ "expect": {
161
+ "success": true,
162
+ "result": {"title": "Bug"}
163
+ }
164
+ },
165
+ {
166
+ "name": "Issues - List Notes",
167
+ "tool": "retrieve_content",
168
+ "arguments": {
169
+ "action": "list_issue_notes",
170
+ "project_id": "{{projectId}}",
171
+ "issue_iid": "{{issueIid}}"
172
+ },
173
+ "mocks": [
174
+ {
175
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidNotes",
176
+ "response": {
177
+ "body": [{"id": 10, "body": "Note"}]
178
+ }
179
+ }
180
+ ],
181
+ "expect": {
182
+ "success": true,
183
+ "result": [{"id": 10}]
184
+ }
185
+ },
186
+ {
187
+ "name": "Issues - Get Note",
188
+ "tool": "retrieve_content",
189
+ "arguments": {
190
+ "action": "get_issue_note",
191
+ "project_id": "{{projectId}}",
192
+ "issue_iid": "{{issueIid}}",
193
+ "note_id": "{{noteId}}"
194
+ },
195
+ "mocks": [
196
+ {
197
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidNotesNoteId",
198
+ "response": {
199
+ "body": {"id": 10, "body": "Note"}
200
+ }
201
+ }
202
+ ],
203
+ "expect": {
204
+ "success": true,
205
+ "result": {"id": 10}
206
+ }
207
+ },
208
+ {
209
+ "name": "Merge Requests - List",
210
+ "tool": "retrieve_content",
211
+ "arguments": {
212
+ "action": "list_merge_requests",
213
+ "project_id": "{{projectId}}",
214
+ "state": "opened"
215
+ },
216
+ "mocks": [
217
+ {
218
+ "operationId": "getApiV4ProjectsIdMergeRequests",
219
+ "response": {
220
+ "body": [{"id": 2, "iid": 2, "title": "MR"}]
221
+ }
222
+ }
223
+ ],
224
+ "expect": {
225
+ "success": true,
226
+ "result": [{"title": "MR"}]
227
+ }
228
+ },
229
+ {
230
+ "name": "Merge Requests - Get",
231
+ "tool": "retrieve_content",
232
+ "arguments": {
233
+ "action": "get_merge_request",
234
+ "project_id": "{{projectId}}",
235
+ "merge_request_iid": "{{mergeRequestIid}}"
236
+ },
237
+ "mocks": [
238
+ {
239
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIid",
240
+ "response": {
241
+ "body": {"id": 2, "iid": 2, "title": "MR"}
242
+ }
243
+ }
244
+ ],
245
+ "expect": {
246
+ "success": true,
247
+ "result": {"title": "MR"}
248
+ }
249
+ },
250
+ {
251
+ "name": "Merge Requests - List Notes",
252
+ "tool": "retrieve_content",
253
+ "arguments": {
254
+ "action": "list_merge_request_notes",
255
+ "project_id": "{{projectId}}",
256
+ "merge_request_iid": "{{mergeRequestIid}}"
257
+ },
258
+ "mocks": [
259
+ {
260
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotes",
261
+ "response": {
262
+ "body": [{"id": 11, "body": "MR Note"}]
263
+ }
264
+ }
265
+ ],
266
+ "expect": {
267
+ "success": true,
268
+ "result": [{"id": 11}]
269
+ }
270
+ },
271
+ {
272
+ "name": "Merge Requests - Get Note",
273
+ "tool": "retrieve_content",
274
+ "arguments": {
275
+ "action": "get_merge_request_note",
276
+ "project_id": "{{projectId}}",
277
+ "merge_request_iid": "{{mergeRequestIid}}",
278
+ "note_id": "{{noteId}}"
279
+ },
280
+ "mocks": [
281
+ {
282
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
283
+ "response": {
284
+ "body": {"id": 11, "body": "MR Note"}
285
+ }
286
+ }
287
+ ],
288
+ "expect": {
289
+ "success": true,
290
+ "result": {"id": 11}
291
+ }
292
+ },
293
+ {
294
+ "name": "Merge Requests - List Commits",
295
+ "tool": "retrieve_content",
296
+ "arguments": {
297
+ "action": "list_merge_request_commits",
298
+ "project_id": "{{projectId}}",
299
+ "merge_request_iid": "{{mergeRequestIid}}"
300
+ },
301
+ "mocks": [
302
+ {
303
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidCommits",
304
+ "response": {
305
+ "body": [{"id": "abc123", "title": "Commit"}]
306
+ }
307
+ }
308
+ ],
309
+ "expect": {
310
+ "success": true,
311
+ "result": [{"title": "Commit"}]
312
+ }
313
+ },
314
+ {
315
+ "name": "Merge Requests - List Diffs",
316
+ "tool": "retrieve_content",
317
+ "arguments": {
318
+ "action": "list_merge_request_diffs",
319
+ "project_id": "{{projectId}}",
320
+ "merge_request_iid": "{{mergeRequestIid}}"
321
+ },
322
+ "mocks": [
323
+ {
324
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidDiffs",
325
+ "response": {
326
+ "body": [{"old_path": "a.txt", "new_path": "b.txt"}]
327
+ }
328
+ }
329
+ ],
330
+ "expect": {
331
+ "success": true,
332
+ "result": [{"old_path": "a.txt"}]
333
+ }
334
+ },
335
+ {
336
+ "name": "Merge Requests - List Raw Diffs",
337
+ "tool": "retrieve_content",
338
+ "arguments": {
339
+ "action": "list_merge_request_raw_diffs",
340
+ "project_id": "{{projectId}}",
341
+ "merge_request_iid": "{{mergeRequestIid}}"
342
+ },
343
+ "mocks": [
344
+ {
345
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidRawDiffs",
346
+ "response": {
347
+ "body": "diff --git a/file.txt b/file.txt"
348
+ }
349
+ }
350
+ ],
351
+ "expect": {
352
+ "success": true
353
+ }
354
+ },
355
+ {
356
+ "name": "Merge Requests - List Pipelines",
357
+ "tool": "retrieve_content",
358
+ "arguments": {
359
+ "action": "list_merge_request_pipelines",
360
+ "project_id": "{{projectId}}",
361
+ "merge_request_iid": "{{mergeRequestIid}}"
362
+ },
363
+ "mocks": [
364
+ {
365
+ "operationId": "getApiV4ProjectsIdMergeRequestsMergeRequestIidPipelines",
366
+ "response": {
367
+ "body": [{"id": 100, "status": "success"}]
368
+ }
369
+ }
370
+ ],
371
+ "expect": {
372
+ "success": true,
373
+ "result": [{"id": 100}]
374
+ }
375
+ },
376
+ {
377
+ "name": "Snippets - List",
378
+ "tool": "retrieve_content",
379
+ "arguments": {
380
+ "action": "list_snippets",
381
+ "project_id": "{{projectId}}"
382
+ },
383
+ "mocks": [
384
+ {
385
+ "operationId": "getApiV4ProjectsIdSnippets",
386
+ "response": {
387
+ "body": [{"id": 55, "title": "Snippet"}]
388
+ }
389
+ }
390
+ ],
391
+ "expect": {
392
+ "success": true,
393
+ "result": [{"id": 55}]
394
+ }
395
+ },
396
+ {
397
+ "name": "Snippets - Get",
398
+ "tool": "retrieve_content",
399
+ "arguments": {
400
+ "action": "get_snippet",
401
+ "project_id": "{{projectId}}",
402
+ "snippet_id": "{{snippetId}}"
403
+ },
404
+ "mocks": [
405
+ {
406
+ "operationId": "getApiV4ProjectsIdSnippetsSnippetId",
407
+ "response": {
408
+ "body": {"id": 55, "title": "Snippet"}
409
+ }
410
+ }
411
+ ],
412
+ "expect": {
413
+ "success": true,
414
+ "result": {"id": 55}
415
+ }
416
+ },
417
+ {
418
+ "name": "Repository Files - Get",
419
+ "tool": "retrieve_content",
420
+ "arguments": {
421
+ "action": "get_file",
422
+ "project_id": "{{projectId}}",
423
+ "file_path": "{{filePath}}",
424
+ "ref": "{{ref}}"
425
+ },
426
+ "mocks": [
427
+ {
428
+ "operationId": "getApiV4ProjectsIdRepositoryFilesFilePath",
429
+ "response": {
430
+ "body": {"file_name": "README.md", "file_path": "README.md"}
431
+ }
432
+ }
433
+ ],
434
+ "expect": {
435
+ "success": true,
436
+ "result": {"file_name": "README.md"}
437
+ }
438
+ },
439
+ {
440
+ "name": "Create Issue",
441
+ "tool": "create_content",
442
+ "arguments": {
443
+ "action": "create_issue",
444
+ "project_id": "{{projectId}}",
445
+ "title": "New Issue"
446
+ },
447
+ "mocks": [
448
+ {
449
+ "operationId": "postApiV4ProjectsIdIssues",
450
+ "response": {
451
+ "status": 201,
452
+ "body": {"id": 3, "iid": 3, "title": "New Issue"}
453
+ }
454
+ }
455
+ ],
456
+ "expect": {
457
+ "success": true,
458
+ "result": {"title": "New Issue"}
459
+ }
460
+ },
461
+ {
462
+ "name": "Create Merge Request",
463
+ "tool": "create_content",
464
+ "arguments": {
465
+ "action": "create_merge_request",
466
+ "project_id": "{{projectId}}",
467
+ "title": "New MR",
468
+ "source_branch": "feature/a",
469
+ "target_branch": "main"
470
+ },
471
+ "mocks": [
472
+ {
473
+ "operationId": "postApiV4ProjectsIdMergeRequests",
474
+ "response": {
475
+ "status": 201,
476
+ "body": {"id": 4, "iid": 4, "title": "New MR"}
477
+ }
478
+ }
479
+ ],
480
+ "expect": {
481
+ "success": true,
482
+ "result": {"title": "New MR"}
483
+ }
484
+ },
485
+ {
486
+ "name": "Create Issue Note",
487
+ "tool": "create_content",
488
+ "arguments": {
489
+ "action": "create_issue_note",
490
+ "project_id": "{{projectId}}",
491
+ "issue_iid": "{{issueIid}}",
492
+ "body": "Note"
493
+ },
494
+ "mocks": [
495
+ {
496
+ "operationId": "postApiV4ProjectsIdIssuesIssueIidNotes",
497
+ "response": {
498
+ "status": 201,
499
+ "body": {"id": 12, "body": "Note"}
500
+ }
501
+ }
502
+ ],
503
+ "expect": {
504
+ "success": true,
505
+ "result": {"id": 12}
506
+ }
507
+ },
508
+ {
509
+ "name": "Create Merge Request Note",
510
+ "tool": "create_content",
511
+ "arguments": {
512
+ "action": "create_merge_request_note",
513
+ "project_id": "{{projectId}}",
514
+ "merge_request_iid": "{{mergeRequestIid}}",
515
+ "body": "MR Note"
516
+ },
517
+ "mocks": [
518
+ {
519
+ "operationId": "postApiV4ProjectsIdMergeRequestsMergeRequestIidNotes",
520
+ "response": {
521
+ "status": 201,
522
+ "body": {"id": 13, "body": "MR Note"}
523
+ }
524
+ }
525
+ ],
526
+ "expect": {
527
+ "success": true,
528
+ "result": {"id": 13}
529
+ }
530
+ },
531
+ {
532
+ "name": "Create Merge Request Pipeline",
533
+ "tool": "create_content",
534
+ "arguments": {
535
+ "action": "create_merge_request_pipeline",
536
+ "project_id": "{{projectId}}",
537
+ "merge_request_iid": "{{mergeRequestIid}}"
538
+ },
539
+ "mocks": [
540
+ {
541
+ "operationId": "postApiV4ProjectsIdMergeRequestsMergeRequestIidPipelines",
542
+ "response": {
543
+ "status": 201,
544
+ "body": {"id": 101, "status": "running"}
545
+ }
546
+ }
547
+ ],
548
+ "expect": {
549
+ "success": true,
550
+ "result": {"id": 101}
551
+ }
552
+ },
553
+ {
554
+ "name": "Update Issue",
555
+ "tool": "update_content",
556
+ "arguments": {
557
+ "action": "update_issue",
558
+ "project_id": "{{projectId}}",
559
+ "issue_iid": "{{issueIid}}",
560
+ "title": "Updated Issue"
561
+ },
562
+ "mocks": [
563
+ {
564
+ "operationId": "putApiV4ProjectsIdIssuesIssueIid",
565
+ "response": {
566
+ "body": {"id": 1, "iid": 1, "title": "Updated Issue"}
567
+ }
568
+ }
569
+ ],
570
+ "expect": {
571
+ "success": true,
572
+ "result": {"title": "Updated Issue"}
573
+ }
574
+ },
575
+ {
576
+ "name": "Update Merge Request",
577
+ "tool": "update_content",
578
+ "arguments": {
579
+ "action": "update_merge_request",
580
+ "project_id": "{{projectId}}",
581
+ "merge_request_iid": "{{mergeRequestIid}}",
582
+ "title": "Updated MR"
583
+ },
584
+ "mocks": [
585
+ {
586
+ "operationId": "putApiV4ProjectsIdMergeRequestsMergeRequestIid",
587
+ "response": {
588
+ "body": {"id": 2, "iid": 2, "title": "Updated MR"}
589
+ }
590
+ }
591
+ ],
592
+ "expect": {
593
+ "success": true,
594
+ "result": {"title": "Updated MR"}
595
+ }
596
+ },
597
+ {
598
+ "name": "Update Issue Note",
599
+ "tool": "update_content",
600
+ "arguments": {
601
+ "action": "update_issue_note",
602
+ "project_id": "{{projectId}}",
603
+ "issue_iid": "{{issueIid}}",
604
+ "note_id": "{{noteId}}",
605
+ "body": "Updated Note"
606
+ },
607
+ "mocks": [
608
+ {
609
+ "operationId": "putApiV4ProjectsIdIssuesIssueIidNotesNoteId",
610
+ "response": {
611
+ "body": {"id": 10, "body": "Updated Note"}
612
+ }
613
+ }
614
+ ],
615
+ "expect": {
616
+ "success": true,
617
+ "result": {"id": 10}
618
+ }
619
+ },
620
+ {
621
+ "name": "Update Merge Request Note",
622
+ "tool": "update_content",
623
+ "arguments": {
624
+ "action": "update_merge_request_note",
625
+ "project_id": "{{projectId}}",
626
+ "merge_request_iid": "{{mergeRequestIid}}",
627
+ "note_id": "{{noteId}}",
628
+ "body": "Updated MR Note"
629
+ },
630
+ "mocks": [
631
+ {
632
+ "operationId": "putApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
633
+ "response": {
634
+ "body": {"id": 11, "body": "Updated MR Note"}
635
+ }
636
+ }
637
+ ],
638
+ "expect": {
639
+ "success": true,
640
+ "result": {"id": 11}
641
+ }
642
+ },
643
+ {
644
+ "name": "Delete Issue",
645
+ "tool": "delete_content",
646
+ "arguments": {
647
+ "action": "delete_issue",
648
+ "project_id": "{{projectId}}",
649
+ "issue_iid": "{{issueIid}}"
650
+ },
651
+ "mocks": [
652
+ {
653
+ "operationId": "deleteApiV4ProjectsIdIssuesIssueIid",
654
+ "response": {
655
+ "status": 204
656
+ }
657
+ }
658
+ ],
659
+ "expect": {
660
+ "success": true
661
+ }
662
+ },
663
+ {
664
+ "name": "Delete Merge Request",
665
+ "tool": "delete_content",
666
+ "arguments": {
667
+ "action": "delete_merge_request",
668
+ "project_id": "{{projectId}}",
669
+ "merge_request_iid": "{{mergeRequestIid}}"
670
+ },
671
+ "mocks": [
672
+ {
673
+ "operationId": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIid",
674
+ "response": {
675
+ "status": 204
676
+ }
677
+ }
678
+ ],
679
+ "expect": {
680
+ "success": true
681
+ }
682
+ },
683
+ {
684
+ "name": "Delete Issue Note",
685
+ "tool": "delete_content",
686
+ "arguments": {
687
+ "action": "delete_issue_note",
688
+ "project_id": "{{projectId}}",
689
+ "issue_iid": "{{issueIid}}",
690
+ "note_id": "{{noteId}}"
691
+ },
692
+ "mocks": [
693
+ {
694
+ "operationId": "deleteApiV4ProjectsIdIssuesIssueIidNotesNoteId",
695
+ "response": {
696
+ "status": 204
697
+ }
698
+ }
699
+ ],
700
+ "expect": {
701
+ "success": true
702
+ }
703
+ },
704
+ {
705
+ "name": "Delete Merge Request Note",
706
+ "tool": "delete_content",
707
+ "arguments": {
708
+ "action": "delete_merge_request_note",
709
+ "project_id": "{{projectId}}",
710
+ "merge_request_iid": "{{mergeRequestIid}}",
711
+ "note_id": "{{noteId}}"
712
+ },
713
+ "mocks": [
714
+ {
715
+ "operationId": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
716
+ "response": {
717
+ "status": 204
718
+ }
719
+ }
720
+ ],
721
+ "expect": {
722
+ "success": true
723
+ }
724
+ },
725
+ {
726
+ "name": "Projects - List Members",
727
+ "tool": "retrieve_content",
728
+ "arguments": {
729
+ "action": "list_project_members",
730
+ "project_id": "{{projectId}}"
731
+ },
732
+ "mocks": [
733
+ {
734
+ "operationId": "getApiV4ProjectsIdMembers",
735
+ "response": {
736
+ "body": [{"id": 101, "name": "Member"}]
737
+ }
738
+ }
739
+ ],
740
+ "expect": {
741
+ "success": true,
742
+ "result": [{"id": 101}]
743
+ }
744
+ },
745
+ {
746
+ "name": "Project Hooks - List",
747
+ "tool": "retrieve_content",
748
+ "arguments": {
749
+ "action": "list_project_hooks",
750
+ "project_id": "{{projectId}}"
751
+ },
752
+ "mocks": [
753
+ {
754
+ "operationId": "getApiV4ProjectsIdHooks",
755
+ "response": {
756
+ "body": [{"id": 9001, "url": "https://example.com/hook"}]
757
+ }
758
+ }
759
+ ],
760
+ "expect": {
761
+ "success": true,
762
+ "result": [{"id": 9001}]
763
+ }
764
+ },
765
+ {
766
+ "name": "Project Hooks - Get",
767
+ "tool": "retrieve_content",
768
+ "arguments": {
769
+ "action": "get_project_hook",
770
+ "project_id": "{{projectId}}",
771
+ "hook_id": "{{hookId}}"
772
+ },
773
+ "mocks": [
774
+ {
775
+ "operationId": "getApiV4ProjectsIdHooksHookId",
776
+ "response": {
777
+ "body": {"id": 9001, "url": "https://example.com/hook"}
778
+ }
779
+ }
780
+ ],
781
+ "expect": {
782
+ "success": true,
783
+ "result": {"id": 9001}
784
+ }
785
+ },
786
+ {
787
+ "name": "Project Variables - List",
788
+ "tool": "retrieve_content",
789
+ "arguments": {
790
+ "action": "list_project_variables",
791
+ "project_id": "{{projectId}}"
792
+ },
793
+ "mocks": [
794
+ {
795
+ "operationId": "getApiV4ProjectsIdVariables",
796
+ "response": {
797
+ "body": [{"key": "DEPLOY_ENV", "value": "staging"}]
798
+ }
799
+ }
800
+ ],
801
+ "expect": {
802
+ "success": true,
803
+ "result": [{"key": "DEPLOY_ENV"}]
804
+ }
805
+ },
806
+ {
807
+ "name": "Project Variables - Get",
808
+ "tool": "retrieve_content",
809
+ "arguments": {
810
+ "action": "get_project_variable",
811
+ "project_id": "{{projectId}}",
812
+ "key": "{{variableKey}}"
813
+ },
814
+ "mocks": [
815
+ {
816
+ "operationId": "getApiV4ProjectsIdVariablesKey",
817
+ "response": {
818
+ "body": {"key": "DEPLOY_ENV", "value": "staging"}
819
+ }
820
+ }
821
+ ],
822
+ "expect": {
823
+ "success": true,
824
+ "result": {"key": "DEPLOY_ENV"}
825
+ }
826
+ },
827
+ {
828
+ "name": "Issues - List Discussions",
829
+ "tool": "retrieve_content",
830
+ "arguments": {
831
+ "action": "list_issue_discussions",
832
+ "project_id": "{{projectId}}",
833
+ "issue_iid": "{{issueIid}}"
834
+ },
835
+ "mocks": [
836
+ {
837
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidDiscussions",
838
+ "response": {
839
+ "body": [{"id": "discussion-1", "resolved": false}]
840
+ }
841
+ }
842
+ ],
843
+ "expect": {
844
+ "success": true,
845
+ "result": [{"id": "discussion-1"}]
846
+ }
847
+ },
848
+ {
849
+ "name": "Issues - Get Discussion",
850
+ "tool": "retrieve_content",
851
+ "arguments": {
852
+ "action": "get_issue_discussion",
853
+ "project_id": "{{projectId}}",
854
+ "issue_iid": "{{issueIid}}",
855
+ "discussion_id": "{{discussionId}}"
856
+ },
857
+ "mocks": [
858
+ {
859
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
860
+ "response": {
861
+ "body": {"id": "discussion-1", "resolved": false}
862
+ }
863
+ }
864
+ ],
865
+ "expect": {
866
+ "success": true,
867
+ "result": {"id": "discussion-1"}
868
+ }
869
+ },
870
+ {
871
+ "name": "Issues - List Note Award Emoji",
872
+ "tool": "retrieve_content",
873
+ "arguments": {
874
+ "action": "list_issue_note_award_emoji",
875
+ "project_id": "{{projectId}}",
876
+ "issue_iid": "{{issueIid}}",
877
+ "note_id": "{{noteId}}"
878
+ },
879
+ "mocks": [
880
+ {
881
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmoji",
882
+ "response": {
883
+ "body": [{"id": 7, "name": "thumbsup"}]
884
+ }
885
+ }
886
+ ],
887
+ "expect": {
888
+ "success": true,
889
+ "result": [{"id": 7}]
890
+ }
891
+ },
892
+ {
893
+ "name": "Issues - Get Note Award Emoji",
894
+ "tool": "retrieve_content",
895
+ "arguments": {
896
+ "action": "get_issue_note_award_emoji",
897
+ "project_id": "{{projectId}}",
898
+ "issue_iid": "{{issueIid}}",
899
+ "note_id": "{{noteId}}",
900
+ "award_id": "{{awardId}}"
901
+ },
902
+ "mocks": [
903
+ {
904
+ "operationId": "getApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmojiAwardId",
905
+ "response": {
906
+ "body": {"id": 7, "name": "thumbsup"}
907
+ }
908
+ }
909
+ ],
910
+ "expect": {
911
+ "success": true,
912
+ "result": {"id": 7}
913
+ }
914
+ },
915
+ {
916
+ "name": "Repository - List Tree",
917
+ "tool": "retrieve_content",
918
+ "arguments": {
919
+ "action": "list_repository_tree",
920
+ "project_id": "{{projectId}}",
921
+ "path": "src"
922
+ },
923
+ "mocks": [
924
+ {
925
+ "operationId": "getApiV4ProjectsIdRepositoryTree",
926
+ "response": {
927
+ "body": [{"id": "abc", "name": "index.js", "type": "blob"}]
928
+ }
929
+ }
930
+ ],
931
+ "expect": {
932
+ "success": true,
933
+ "result": [{"name": "index.js"}]
934
+ }
935
+ },
936
+ {
937
+ "name": "Repository - Compare Refs",
938
+ "tool": "retrieve_content",
939
+ "arguments": {
940
+ "action": "compare_refs",
941
+ "project_id": "{{projectId}}",
942
+ "from": "{{fromRef}}",
943
+ "to": "{{toRef}}"
944
+ },
945
+ "mocks": [
946
+ {
947
+ "operationId": "getApiV4ProjectsIdRepositoryCompare",
948
+ "response": {
949
+ "body": {"compare_timeout": false, "commits": []}
950
+ }
951
+ }
952
+ ],
953
+ "expect": {
954
+ "success": true,
955
+ "result": {"compare_timeout": false}
956
+ }
957
+ },
958
+ {
959
+ "name": "Repository - Get Commit",
960
+ "tool": "retrieve_content",
961
+ "arguments": {
962
+ "action": "get_commit",
963
+ "project_id": "{{projectId}}",
964
+ "sha": "abc123"
965
+ },
966
+ "mocks": [
967
+ {
968
+ "operationId": "getApiV4ProjectsIdRepositoryCommitsSha",
969
+ "response": {
970
+ "body": {"id": "abc123", "title": "Commit"}
971
+ }
972
+ }
973
+ ],
974
+ "expect": {
975
+ "success": true,
976
+ "result": {"id": "abc123"}
977
+ }
978
+ },
979
+ {
980
+ "name": "Pipelines - List",
981
+ "tool": "retrieve_content",
982
+ "arguments": {
983
+ "action": "list_pipelines",
984
+ "project_id": "{{projectId}}",
985
+ "ref": "{{ref}}"
986
+ },
987
+ "mocks": [
988
+ {
989
+ "operationId": "getApiV4ProjectsIdPipelines",
990
+ "response": {
991
+ "body": [{"id": 1001, "status": "success"}]
992
+ }
993
+ }
994
+ ],
995
+ "expect": {
996
+ "success": true,
997
+ "result": [{"id": 1001}]
998
+ }
999
+ },
1000
+ {
1001
+ "name": "Pipelines - List Jobs",
1002
+ "tool": "retrieve_content",
1003
+ "arguments": {
1004
+ "action": "list_pipeline_jobs",
1005
+ "project_id": "{{projectId}}",
1006
+ "pipeline_id": "{{pipelineId}}"
1007
+ },
1008
+ "mocks": [
1009
+ {
1010
+ "operationId": "getApiV4ProjectsIdPipelinesPipelineIdJobs",
1011
+ "response": {
1012
+ "body": [{"id": 2002, "status": "success"}]
1013
+ }
1014
+ }
1015
+ ],
1016
+ "expect": {
1017
+ "success": true,
1018
+ "result": [{"id": 2002}]
1019
+ }
1020
+ },
1021
+ {
1022
+ "name": "Jobs - Get",
1023
+ "tool": "retrieve_content",
1024
+ "arguments": {
1025
+ "action": "get_job",
1026
+ "project_id": "{{projectId}}",
1027
+ "job_id": "{{jobId}}"
1028
+ },
1029
+ "mocks": [
1030
+ {
1031
+ "operationId": "getSingleJob",
1032
+ "response": {
1033
+ "body": {"id": 2002, "status": "success"}
1034
+ }
1035
+ }
1036
+ ],
1037
+ "expect": {
1038
+ "success": true,
1039
+ "result": {"id": 2002}
1040
+ }
1041
+ },
1042
+ {
1043
+ "name": "Jobs - Download Artifacts Archive",
1044
+ "tool": "retrieve_content",
1045
+ "arguments": {
1046
+ "action": "download_job_artifacts",
1047
+ "project_id": "{{projectId}}",
1048
+ "job_id": "{{jobId}}"
1049
+ },
1050
+ "mocks": [
1051
+ {
1052
+ "operationId": "getSingleJob",
1053
+ "response": {
1054
+ "body": {
1055
+ "id": 2002,
1056
+ "artifacts_file": {
1057
+ "filename": "artifacts.zip"
1058
+ }
1059
+ }
1060
+ }
1061
+ },
1062
+ {
1063
+ "operationId": "getApiV4ProjectsIdJobsJobIdArtifacts",
1064
+ "response": {
1065
+ "status": 200,
1066
+ "body": "PK...",
1067
+ "headers": {
1068
+ "content-type": "application/zip"
1069
+ }
1070
+ }
1071
+ }
1072
+ ],
1073
+ "expect": {
1074
+ "success": true,
1075
+ "result": {
1076
+ "fileName": "artifacts.zip"
1077
+ }
1078
+ }
1079
+ },
1080
+ {
1081
+ "name": "Jobs - Download Artifact File",
1082
+ "tool": "retrieve_content",
1083
+ "arguments": {
1084
+ "action": "download_job_artifact",
1085
+ "project_id": "{{projectId}}",
1086
+ "job_id": "{{jobId}}",
1087
+ "artifact_path": "{{artifactPath}}"
1088
+ },
1089
+ "mocks": [
1090
+ {
1091
+ "operationId": "getSingleJob",
1092
+ "response": {
1093
+ "body": {
1094
+ "id": 2002,
1095
+ "artifacts_file": {
1096
+ "filename": "artifacts.zip"
1097
+ }
1098
+ }
1099
+ }
1100
+ },
1101
+ {
1102
+ "operationId": "getApiV4ProjectsIdJobsJobIdArtifactsArtifactPath",
1103
+ "response": {
1104
+ "status": 200,
1105
+ "body": "<xml/>",
1106
+ "headers": {
1107
+ "content-type": "application/xml"
1108
+ }
1109
+ }
1110
+ }
1111
+ ],
1112
+ "expect": {
1113
+ "success": true,
1114
+ "result": {
1115
+ "fileName": "artifacts.zip"
1116
+ }
1117
+ }
1118
+ },
1119
+ {
1120
+ "name": "Labels - List Project Labels",
1121
+ "tool": "retrieve_content",
1122
+ "arguments": {
1123
+ "action": "list_project_labels",
1124
+ "project_id": "{{projectId}}"
1125
+ },
1126
+ "mocks": [
1127
+ {
1128
+ "operationId": "getApiV4ProjectsIdLabels",
1129
+ "response": {
1130
+ "body": [{"id": 1, "name": "bug"}]
1131
+ }
1132
+ }
1133
+ ],
1134
+ "expect": {
1135
+ "success": true,
1136
+ "result": [{"name": "bug"}]
1137
+ }
1138
+ },
1139
+ {
1140
+ "name": "Labels - List Group Labels",
1141
+ "tool": "retrieve_content",
1142
+ "arguments": {
1143
+ "action": "list_group_labels",
1144
+ "group_id": "{{groupId}}"
1145
+ },
1146
+ "mocks": [
1147
+ {
1148
+ "operationId": "getApiV4GroupsIdLabels",
1149
+ "response": {
1150
+ "body": [{"id": 2, "name": "team"}]
1151
+ }
1152
+ }
1153
+ ],
1154
+ "expect": {
1155
+ "success": true,
1156
+ "result": [{"name": "team"}]
1157
+ }
1158
+ },
1159
+ {
1160
+ "name": "Milestones - List Project Milestones",
1161
+ "tool": "retrieve_content",
1162
+ "arguments": {
1163
+ "action": "list_project_milestones",
1164
+ "project_id": "{{projectId}}"
1165
+ },
1166
+ "mocks": [
1167
+ {
1168
+ "operationId": "getApiV4ProjectsIdMilestones",
1169
+ "response": {
1170
+ "body": [{"id": 1, "iid": 1, "title": "v1"}]
1171
+ }
1172
+ }
1173
+ ],
1174
+ "expect": {
1175
+ "success": true,
1176
+ "result": [{"title": "v1"}]
1177
+ }
1178
+ },
1179
+ {
1180
+ "name": "Milestones - List Group Milestones",
1181
+ "tool": "retrieve_content",
1182
+ "arguments": {
1183
+ "action": "list_group_milestones",
1184
+ "group_id": "{{groupId}}"
1185
+ },
1186
+ "mocks": [
1187
+ {
1188
+ "operationId": "getApiV4GroupsIdMilestones",
1189
+ "response": {
1190
+ "body": [{"id": 2, "iid": 2, "title": "v2"}]
1191
+ }
1192
+ }
1193
+ ],
1194
+ "expect": {
1195
+ "success": true,
1196
+ "result": [{"title": "v2"}]
1197
+ }
1198
+ },
1199
+ {
1200
+ "name": "Issues - Create Discussion",
1201
+ "tool": "create_content",
1202
+ "arguments": {
1203
+ "action": "create_issue_discussion",
1204
+ "project_id": "{{projectId}}",
1205
+ "issue_iid": "{{issueIid}}",
1206
+ "body": "Discussion"
1207
+ },
1208
+ "mocks": [
1209
+ {
1210
+ "operationId": "postApiV4ProjectsIdIssuesIssueIidDiscussions",
1211
+ "response": {
1212
+ "status": 201,
1213
+ "body": {"id": "discussion-1", "resolved": false}
1214
+ }
1215
+ }
1216
+ ],
1217
+ "expect": {
1218
+ "success": true,
1219
+ "result": {"id": "discussion-1"}
1220
+ }
1221
+ },
1222
+ {
1223
+ "name": "Issues - Reply Discussion",
1224
+ "tool": "create_content",
1225
+ "arguments": {
1226
+ "action": "reply_issue_discussion",
1227
+ "project_id": "{{projectId}}",
1228
+ "issue_iid": "{{issueIid}}",
1229
+ "discussion_id": "{{discussionId}}",
1230
+ "body": "Reply"
1231
+ },
1232
+ "mocks": [
1233
+ {
1234
+ "operationId": "postApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionIdNotes",
1235
+ "response": {
1236
+ "status": 201,
1237
+ "body": {"id": "discussion-1", "notes": []}
1238
+ }
1239
+ }
1240
+ ],
1241
+ "expect": {
1242
+ "success": true,
1243
+ "result": {"id": "discussion-1"}
1244
+ }
1245
+ },
1246
+ {
1247
+ "name": "Issues - Create Note Award Emoji",
1248
+ "tool": "create_content",
1249
+ "arguments": {
1250
+ "action": "create_issue_note_award_emoji",
1251
+ "project_id": "{{projectId}}",
1252
+ "issue_iid": "{{issueIid}}",
1253
+ "note_id": "{{noteId}}",
1254
+ "name": "thumbsup"
1255
+ },
1256
+ "mocks": [
1257
+ {
1258
+ "operationId": "postApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmoji",
1259
+ "response": {
1260
+ "status": 201,
1261
+ "body": {"id": 7, "name": "thumbsup"}
1262
+ }
1263
+ }
1264
+ ],
1265
+ "expect": {
1266
+ "success": true,
1267
+ "result": {"id": 7}
1268
+ }
1269
+ },
1270
+ {
1271
+ "name": "Repository Files - Create",
1272
+ "tool": "create_content",
1273
+ "arguments": {
1274
+ "action": "create_file",
1275
+ "project_id": "{{projectId}}",
1276
+ "file_path": "{{filePath}}",
1277
+ "branch": "{{ref}}",
1278
+ "content": "Hello",
1279
+ "commit_message": "Add file"
1280
+ },
1281
+ "mocks": [
1282
+ {
1283
+ "operationId": "postApiV4ProjectsIdRepositoryFilesFilePath",
1284
+ "response": {
1285
+ "status": 201,
1286
+ "body": {"file_name": "README.md", "file_path": "README.md"}
1287
+ }
1288
+ }
1289
+ ],
1290
+ "expect": {
1291
+ "success": true,
1292
+ "result": {"file_name": "README.md"}
1293
+ }
1294
+ },
1295
+ {
1296
+ "name": "Project Variables - Create",
1297
+ "tool": "create_content",
1298
+ "arguments": {
1299
+ "action": "create_project_variable",
1300
+ "project_id": "{{projectId}}",
1301
+ "key": "{{variableKey}}",
1302
+ "value": "staging"
1303
+ },
1304
+ "mocks": [
1305
+ {
1306
+ "operationId": "postApiV4ProjectsIdVariables",
1307
+ "response": {
1308
+ "status": 201,
1309
+ "body": {"key": "DEPLOY_ENV", "value": "staging"}
1310
+ }
1311
+ }
1312
+ ],
1313
+ "expect": {
1314
+ "success": true,
1315
+ "result": {"key": "DEPLOY_ENV"}
1316
+ }
1317
+ },
1318
+ {
1319
+ "name": "Project Hooks - Create",
1320
+ "tool": "create_content",
1321
+ "arguments": {
1322
+ "action": "create_project_hook",
1323
+ "project_id": "{{projectId}}",
1324
+ "url": "https://example.com/hook"
1325
+ },
1326
+ "mocks": [
1327
+ {
1328
+ "operationId": "postApiV4ProjectsIdHooks",
1329
+ "response": {
1330
+ "status": 201,
1331
+ "body": {"id": 9001, "url": "https://example.com/hook"}
1332
+ }
1333
+ }
1334
+ ],
1335
+ "expect": {
1336
+ "success": true,
1337
+ "result": {"id": 9001}
1338
+ }
1339
+ },
1340
+ {
1341
+ "name": "Issues - Resolve Discussion",
1342
+ "tool": "update_content",
1343
+ "arguments": {
1344
+ "action": "set_issue_discussion_resolved",
1345
+ "project_id": "{{projectId}}",
1346
+ "issue_iid": "{{issueIid}}",
1347
+ "discussion_id": "{{discussionId}}",
1348
+ "resolved": true
1349
+ },
1350
+ "mocks": [
1351
+ {
1352
+ "operationId": "putApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
1353
+ "response": {
1354
+ "body": {"id": "discussion-1", "resolved": true}
1355
+ }
1356
+ }
1357
+ ],
1358
+ "expect": {
1359
+ "success": true,
1360
+ "result": {"resolved": true}
1361
+ }
1362
+ },
1363
+ {
1364
+ "name": "Repository Files - Update",
1365
+ "tool": "update_content",
1366
+ "arguments": {
1367
+ "action": "update_file",
1368
+ "project_id": "{{projectId}}",
1369
+ "file_path": "{{filePath}}",
1370
+ "branch": "{{ref}}",
1371
+ "content": "Updated",
1372
+ "commit_message": "Update file"
1373
+ },
1374
+ "mocks": [
1375
+ {
1376
+ "operationId": "putApiV4ProjectsIdRepositoryFilesFilePath",
1377
+ "response": {
1378
+ "body": {"file_name": "README.md", "file_path": "README.md"}
1379
+ }
1380
+ }
1381
+ ],
1382
+ "expect": {
1383
+ "success": true,
1384
+ "result": {"file_name": "README.md"}
1385
+ }
1386
+ },
1387
+ {
1388
+ "name": "Jobs - Retry",
1389
+ "tool": "update_content",
1390
+ "arguments": {
1391
+ "action": "retry_job",
1392
+ "project_id": "{{projectId}}",
1393
+ "job_id": "{{jobId}}"
1394
+ },
1395
+ "mocks": [
1396
+ {
1397
+ "operationId": "postApiV4ProjectsIdJobsJobIdRetry",
1398
+ "response": {
1399
+ "body": {"id": 2002, "status": "pending"}
1400
+ }
1401
+ }
1402
+ ],
1403
+ "expect": {
1404
+ "success": true,
1405
+ "result": {"status": "pending"}
1406
+ }
1407
+ },
1408
+ {
1409
+ "name": "Jobs - Cancel",
1410
+ "tool": "update_content",
1411
+ "arguments": {
1412
+ "action": "cancel_job",
1413
+ "project_id": "{{projectId}}",
1414
+ "job_id": "{{jobId}}"
1415
+ },
1416
+ "mocks": [
1417
+ {
1418
+ "operationId": "postApiV4ProjectsIdJobsJobIdCancel",
1419
+ "response": {
1420
+ "body": {"id": 2002, "status": "canceled"}
1421
+ }
1422
+ }
1423
+ ],
1424
+ "expect": {
1425
+ "success": true,
1426
+ "result": {"status": "canceled"}
1427
+ }
1428
+ },
1429
+ {
1430
+ "name": "Project Variables - Update",
1431
+ "tool": "update_content",
1432
+ "arguments": {
1433
+ "action": "update_project_variable",
1434
+ "project_id": "{{projectId}}",
1435
+ "key": "{{variableKey}}",
1436
+ "value": "production"
1437
+ },
1438
+ "mocks": [
1439
+ {
1440
+ "operationId": "putApiV4ProjectsIdVariablesKey",
1441
+ "response": {
1442
+ "body": {"key": "DEPLOY_ENV", "value": "production"}
1443
+ }
1444
+ }
1445
+ ],
1446
+ "expect": {
1447
+ "success": true,
1448
+ "result": {"key": "DEPLOY_ENV"}
1449
+ }
1450
+ },
1451
+ {
1452
+ "name": "Project Hooks - Update",
1453
+ "tool": "update_content",
1454
+ "arguments": {
1455
+ "action": "update_project_hook",
1456
+ "project_id": "{{projectId}}",
1457
+ "hook_id": "{{hookId}}",
1458
+ "url": "https://example.com/hook-updated"
1459
+ },
1460
+ "mocks": [
1461
+ {
1462
+ "operationId": "putApiV4ProjectsIdHooksHookId",
1463
+ "response": {
1464
+ "body": {"id": 9001, "url": "https://example.com/hook-updated"}
1465
+ }
1466
+ }
1467
+ ],
1468
+ "expect": {
1469
+ "success": true,
1470
+ "result": {"id": 9001}
1471
+ }
1472
+ },
1473
+ {
1474
+ "name": "Issues - Delete Discussion",
1475
+ "tool": "delete_content",
1476
+ "arguments": {
1477
+ "action": "delete_issue_discussion",
1478
+ "project_id": "{{projectId}}",
1479
+ "issue_iid": "{{issueIid}}",
1480
+ "discussion_id": "{{discussionId}}"
1481
+ },
1482
+ "mocks": [
1483
+ {
1484
+ "operationId": "deleteApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
1485
+ "response": {
1486
+ "status": 204
1487
+ }
1488
+ }
1489
+ ],
1490
+ "expect": {
1491
+ "success": true
1492
+ }
1493
+ },
1494
+ {
1495
+ "name": "Issues - Delete Note Award Emoji",
1496
+ "tool": "delete_content",
1497
+ "arguments": {
1498
+ "action": "delete_issue_note_award_emoji",
1499
+ "project_id": "{{projectId}}",
1500
+ "issue_iid": "{{issueIid}}",
1501
+ "note_id": "{{noteId}}",
1502
+ "award_id": "{{awardId}}"
1503
+ },
1504
+ "mocks": [
1505
+ {
1506
+ "operationId": "deleteApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmojiAwardId",
1507
+ "response": {
1508
+ "status": 204
1509
+ }
1510
+ }
1511
+ ],
1512
+ "expect": {
1513
+ "success": true
1514
+ }
1515
+ },
1516
+ {
1517
+ "name": "Repository Files - Delete",
1518
+ "tool": "delete_content",
1519
+ "arguments": {
1520
+ "action": "delete_file",
1521
+ "project_id": "{{projectId}}",
1522
+ "file_path": "{{filePath}}",
1523
+ "branch": "{{ref}}",
1524
+ "commit_message": "Remove file"
1525
+ },
1526
+ "mocks": [
1527
+ {
1528
+ "operationId": "deleteApiV4ProjectsIdRepositoryFilesFilePath",
1529
+ "response": {
1530
+ "status": 204
1531
+ }
1532
+ }
1533
+ ],
1534
+ "expect": {
1535
+ "success": true
1536
+ }
1537
+ },
1538
+ {
1539
+ "name": "Project Variables - Delete",
1540
+ "tool": "delete_content",
1541
+ "arguments": {
1542
+ "action": "delete_project_variable",
1543
+ "project_id": "{{projectId}}",
1544
+ "key": "{{variableKey}}"
1545
+ },
1546
+ "mocks": [
1547
+ {
1548
+ "operationId": "deleteApiV4ProjectsIdVariablesKey",
1549
+ "response": {
1550
+ "status": 204
1551
+ }
1552
+ }
1553
+ ],
1554
+ "expect": {
1555
+ "success": true
1556
+ }
1557
+ },
1558
+ {
1559
+ "name": "Project Hooks - Delete",
1560
+ "tool": "delete_content",
1561
+ "arguments": {
1562
+ "action": "delete_project_hook",
1563
+ "project_id": "{{projectId}}",
1564
+ "hook_id": "{{hookId}}"
1565
+ },
1566
+ "mocks": [
1567
+ {
1568
+ "operationId": "deleteApiV4ProjectsIdHooksHookId",
1569
+ "response": {
1570
+ "status": 204
1571
+ }
1572
+ }
1573
+ ],
1574
+ "expect": {
1575
+ "success": true
1576
+ }
1577
+ },
1578
+ {
1579
+ "name": "GLQL - Query",
1580
+ "tool": "run_glql",
1581
+ "arguments": {
1582
+ "action": "query",
1583
+ "glql_yaml": "{ projects { nodes { id name } } }"
1584
+ },
1585
+ "mocks": [
1586
+ {
1587
+ "operationId": "postApiV4Glql",
1588
+ "response": {
1589
+ "body": {"data": {"projects": {"nodes": []}}}
1590
+ }
1591
+ }
1592
+ ],
1593
+ "expect": {
1594
+ "success": true,
1595
+ "result": {"data": {"projects": {"nodes": []}}}
1596
+ }
1597
+ }
1598
+ ],
1599
+ "coverage": {
1600
+ "require_all_actions": true,
1601
+ "skip_actions": {
1602
+ "retrieve_content.download_snippet": "Proxy download behavior covered elsewhere",
1603
+ "retrieve_content.download_file": "Proxy download behavior covered elsewhere"
1604
+ }
1605
+ }
1606
+ }