adoptai-mcp 1.0.0

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 (174) hide show
  1. package/README.md +70 -0
  2. package/bin/adoptai-mcp.js +2 -0
  3. package/dist/apps/canva.js +1 -0
  4. package/dist/apps/figma.js +1 -0
  5. package/dist/apps/github.js +2 -0
  6. package/dist/apps/notion.js +1 -0
  7. package/dist/apps/registry.js +20 -0
  8. package/dist/apps/salesforce.js +1 -0
  9. package/dist/cli/add.js +532 -0
  10. package/dist/cli/index.js +39 -0
  11. package/dist/cli/list.js +19 -0
  12. package/dist/cli/remove.js +37 -0
  13. package/dist/cli/serve.js +27 -0
  14. package/dist/cli/status.js +24 -0
  15. package/dist/config/clients.js +118 -0
  16. package/dist/config/credentials.js +34 -0
  17. package/dist/core/auth-manager.js +237 -0
  18. package/dist/core/config-writer.js +161 -0
  19. package/dist/core/doctor.js +199 -0
  20. package/dist/core/package.json +3 -0
  21. package/dist/core/server-base.js +81 -0
  22. package/dist/integrations/canva/.env +3 -0
  23. package/dist/integrations/canva/auth.js +287 -0
  24. package/dist/integrations/canva/env.js +9 -0
  25. package/dist/integrations/canva/index.js +12 -0
  26. package/dist/integrations/canva/package.json +31 -0
  27. package/dist/integrations/canva/publish-to-adoptai.js +365 -0
  28. package/dist/integrations/canva/setup.js +90 -0
  29. package/dist/integrations/canva/tools.js +1315 -0
  30. package/dist/integrations/canva/tools.original.js +1315 -0
  31. package/dist/integrations/figma/auth.js +48 -0
  32. package/dist/integrations/figma/index.js +11 -0
  33. package/dist/integrations/figma/package.json +27 -0
  34. package/dist/integrations/figma/publish-to-adoptai.js +384 -0
  35. package/dist/integrations/figma/setup.js +90 -0
  36. package/dist/integrations/figma/tools.js +1137 -0
  37. package/dist/integrations/github/auth.js +53 -0
  38. package/dist/integrations/github/index.js +11 -0
  39. package/dist/integrations/github/package.json +28 -0
  40. package/dist/integrations/github/publish-to-adoptai.js +240 -0
  41. package/dist/integrations/github/setup.js +103 -0
  42. package/dist/integrations/github/tools.js +78 -0
  43. package/dist/integrations/github-actions/auth.js +53 -0
  44. package/dist/integrations/github-actions/index.js +11 -0
  45. package/dist/integrations/github-actions/package.json +27 -0
  46. package/dist/integrations/github-actions/setup.js +103 -0
  47. package/dist/integrations/github-actions/tools.js +5642 -0
  48. package/dist/integrations/github-activity/auth.js +53 -0
  49. package/dist/integrations/github-activity/index.js +11 -0
  50. package/dist/integrations/github-activity/package.json +27 -0
  51. package/dist/integrations/github-activity/setup.js +103 -0
  52. package/dist/integrations/github-activity/tools.js +925 -0
  53. package/dist/integrations/github-apps/auth.js +53 -0
  54. package/dist/integrations/github-apps/index.js +11 -0
  55. package/dist/integrations/github-apps/package.json +27 -0
  56. package/dist/integrations/github-apps/setup.js +103 -0
  57. package/dist/integrations/github-apps/tools.js +791 -0
  58. package/dist/integrations/github-billing/auth.js +53 -0
  59. package/dist/integrations/github-billing/index.js +11 -0
  60. package/dist/integrations/github-billing/package.json +27 -0
  61. package/dist/integrations/github-billing/setup.js +103 -0
  62. package/dist/integrations/github-billing/tools.js +438 -0
  63. package/dist/integrations/github-checks/auth.js +53 -0
  64. package/dist/integrations/github-checks/index.js +11 -0
  65. package/dist/integrations/github-checks/package.json +27 -0
  66. package/dist/integrations/github-checks/setup.js +103 -0
  67. package/dist/integrations/github-checks/tools.js +607 -0
  68. package/dist/integrations/github-code-scanning/auth.js +53 -0
  69. package/dist/integrations/github-code-scanning/index.js +11 -0
  70. package/dist/integrations/github-code-scanning/package.json +27 -0
  71. package/dist/integrations/github-code-scanning/setup.js +103 -0
  72. package/dist/integrations/github-code-scanning/tools.js +987 -0
  73. package/dist/integrations/github-dependabot/auth.js +53 -0
  74. package/dist/integrations/github-dependabot/index.js +11 -0
  75. package/dist/integrations/github-dependabot/package.json +27 -0
  76. package/dist/integrations/github-dependabot/setup.js +103 -0
  77. package/dist/integrations/github-dependabot/tools.js +915 -0
  78. package/dist/integrations/github-gists/auth.js +53 -0
  79. package/dist/integrations/github-gists/index.js +11 -0
  80. package/dist/integrations/github-gists/package.json +27 -0
  81. package/dist/integrations/github-gists/setup.js +103 -0
  82. package/dist/integrations/github-gists/tools.js +545 -0
  83. package/dist/integrations/github-git/auth.js +53 -0
  84. package/dist/integrations/github-git/index.js +11 -0
  85. package/dist/integrations/github-git/package.json +27 -0
  86. package/dist/integrations/github-git/setup.js +103 -0
  87. package/dist/integrations/github-git/tools.js +513 -0
  88. package/dist/integrations/github-issues/auth.js +53 -0
  89. package/dist/integrations/github-issues/index.js +11 -0
  90. package/dist/integrations/github-issues/package.json +27 -0
  91. package/dist/integrations/github-issues/setup.js +103 -0
  92. package/dist/integrations/github-issues/tools.js +2232 -0
  93. package/dist/integrations/github-orgs/auth.js +53 -0
  94. package/dist/integrations/github-orgs/index.js +11 -0
  95. package/dist/integrations/github-orgs/package.json +27 -0
  96. package/dist/integrations/github-orgs/setup.js +103 -0
  97. package/dist/integrations/github-orgs/tools.js +3512 -0
  98. package/dist/integrations/github-packages/auth.js +53 -0
  99. package/dist/integrations/github-packages/index.js +11 -0
  100. package/dist/integrations/github-packages/package.json +27 -0
  101. package/dist/integrations/github-packages/setup.js +103 -0
  102. package/dist/integrations/github-packages/tools.js +1088 -0
  103. package/dist/integrations/github-pulls/auth.js +53 -0
  104. package/dist/integrations/github-pulls/index.js +11 -0
  105. package/dist/integrations/github-pulls/package.json +27 -0
  106. package/dist/integrations/github-pulls/setup.js +103 -0
  107. package/dist/integrations/github-pulls/tools.js +1252 -0
  108. package/dist/integrations/github-reactions/auth.js +53 -0
  109. package/dist/integrations/github-reactions/index.js +11 -0
  110. package/dist/integrations/github-reactions/package.json +27 -0
  111. package/dist/integrations/github-reactions/setup.js +103 -0
  112. package/dist/integrations/github-reactions/tools.js +706 -0
  113. package/dist/integrations/github-repos/auth.js +53 -0
  114. package/dist/integrations/github-repos/index.js +11 -0
  115. package/dist/integrations/github-repos/package.json +27 -0
  116. package/dist/integrations/github-repos/setup.js +103 -0
  117. package/dist/integrations/github-repos/tools.js +7286 -0
  118. package/dist/integrations/github-search/auth.js +53 -0
  119. package/dist/integrations/github-search/index.js +11 -0
  120. package/dist/integrations/github-search/package.json +27 -0
  121. package/dist/integrations/github-search/setup.js +103 -0
  122. package/dist/integrations/github-search/tools.js +370 -0
  123. package/dist/integrations/github-teams/auth.js +53 -0
  124. package/dist/integrations/github-teams/index.js +11 -0
  125. package/dist/integrations/github-teams/package.json +27 -0
  126. package/dist/integrations/github-teams/setup.js +103 -0
  127. package/dist/integrations/github-teams/tools.js +633 -0
  128. package/dist/integrations/github-users/auth.js +53 -0
  129. package/dist/integrations/github-users/index.js +11 -0
  130. package/dist/integrations/github-users/package.json +27 -0
  131. package/dist/integrations/github-users/setup.js +103 -0
  132. package/dist/integrations/github-users/tools.js +1118 -0
  133. package/dist/integrations/notion/api.js +108 -0
  134. package/dist/integrations/notion/auth.js +59 -0
  135. package/dist/integrations/notion/endpoints.json +630 -0
  136. package/dist/integrations/notion/index.js +11 -0
  137. package/dist/integrations/notion/package.json +33 -0
  138. package/dist/integrations/notion/publish-to-adoptai.js +271 -0
  139. package/dist/integrations/notion/scripts/generate-endpoints.mjs +306 -0
  140. package/dist/integrations/notion/setup.js +89 -0
  141. package/dist/integrations/notion/tools.js +586 -0
  142. package/dist/integrations/notion/tools.original.js +568 -0
  143. package/dist/integrations/salesforce/.env +8 -0
  144. package/dist/integrations/salesforce/.env.example +15 -0
  145. package/dist/integrations/salesforce/auth.js +311 -0
  146. package/dist/integrations/salesforce/endpoints.json +1359 -0
  147. package/dist/integrations/salesforce/env.js +9 -0
  148. package/dist/integrations/salesforce/index.js +12 -0
  149. package/dist/integrations/salesforce/package.json +42 -0
  150. package/dist/integrations/salesforce/publish-smart-specs.js +890 -0
  151. package/dist/integrations/salesforce/publish-to-adoptai.js +386 -0
  152. package/dist/integrations/salesforce/scripts/extract-postman.mjs +222 -0
  153. package/dist/integrations/salesforce/setup.js +112 -0
  154. package/dist/integrations/salesforce/tools.js +4544 -0
  155. package/dist/integrations/salesforce/tools.original.js +4487 -0
  156. package/dist/server/mcp-server.js +50 -0
  157. package/dist/server/tool-loader.js +47 -0
  158. package/dist/specs/figma-api.json +13621 -0
  159. package/dist/specs/split/salesforce-auth.json +3931 -0
  160. package/dist/specs/split/salesforce-bulk-v1.json +1489 -0
  161. package/dist/specs/split/salesforce-bulk-v2.json +1951 -0
  162. package/dist/specs/split/salesforce-composite.json +1246 -0
  163. package/dist/specs/split/salesforce-connect.json +11639 -0
  164. package/dist/specs/split/salesforce-einstein-prediction-service.json +576 -0
  165. package/dist/specs/split/salesforce-event-platform.json +2682 -0
  166. package/dist/specs/split/salesforce-graphql.json +1754 -0
  167. package/dist/specs/split/salesforce-industries.json +4115 -0
  168. package/dist/specs/split/salesforce-metadata.json +555 -0
  169. package/dist/specs/split/salesforce-rest.json +4798 -0
  170. package/dist/specs/split/salesforce-soap.json +210 -0
  171. package/dist/specs/split/salesforce-subscription-management.json +1299 -0
  172. package/dist/specs/split/salesforce-tooling.json +2026 -0
  173. package/dist/specs/split/salesforce-ui.json +7426 -0
  174. package/package.json +47 -0
@@ -0,0 +1,706 @@
1
+ import axios from 'axios';
2
+ import { buildAuthHeaders } from './auth.js';
3
+
4
+ const BASE_URL = 'https://api.github.com';
5
+ const APP_ID = 'github-reactions';
6
+
7
+ function handleError(err) {
8
+ const status = err.response?.status;
9
+ const msg = err.response?.data?.message || err.response?.data?.error || err.message;
10
+ if (status === 401) throw new Error(`Token invalid.\nRun: npx adoptai-${APP_ID}-mcp --client cursor`);
11
+ if (status === 403) throw new Error('Insufficient permissions. Check your API key scopes.');
12
+ if (status === 404) throw new Error('Resource not found. Check your parameters.');
13
+ if (status === 429) throw new Error('Rate limit exceeded. Please wait and try again.');
14
+ throw new Error(msg || 'API request failed');
15
+ }
16
+
17
+ async function apiRequest(method, pathTemplate, params = {}, opts = {}) {
18
+ const { deleteSendsJsonBody = false } = opts;
19
+ const headers = buildAuthHeaders();
20
+ let url = BASE_URL + pathTemplate;
21
+ const pathKeys = [...pathTemplate.matchAll(/\{([^}]+)\}/g)].map((m) => m[1]);
22
+ for (const key of pathKeys) {
23
+ const value = params[key];
24
+ if (value !== undefined && value !== null) url = url.replace(`{${key}}`, encodeURIComponent(String(value)));
25
+ }
26
+ const rest = { ...params };
27
+ for (const key of pathKeys) delete rest[key];
28
+ const m = method.toUpperCase();
29
+ const useQuery = m === 'GET' || (m === 'DELETE' && !deleteSendsJsonBody);
30
+ const queryParams = {};
31
+ const bodyParams = {};
32
+ for (const [key, value] of Object.entries(rest)) {
33
+ if (value === undefined) continue;
34
+ if (useQuery) queryParams[key] = value; else bodyParams[key] = value;
35
+ }
36
+ try {
37
+ const res = await axios({
38
+ method: m,
39
+ url,
40
+ headers: { 'Content-Type': 'application/json', ...headers },
41
+ params: Object.keys(queryParams).length ? queryParams : undefined,
42
+ data: Object.keys(bodyParams).length ? bodyParams : undefined,
43
+ timeout: 30000,
44
+ });
45
+ if (res.status === 204 || res.data === '' || res.data === undefined) return { ok: true, status: res.status };
46
+ return res.data;
47
+ } catch (err) {
48
+ handleError(err);
49
+ }
50
+ }
51
+
52
+ const ENDPOINTS = [
53
+ {
54
+ "name": "reactions_list_for_commit_comment",
55
+ "description": "List reactions for a commit comment",
56
+ "method": "GET",
57
+ "path": "/repos/{owner}/{repo}/comments/{comment_id}/reactions",
58
+ "deleteSendsJsonBody": false,
59
+ "inputSchema": {
60
+ "type": "object",
61
+ "properties": {
62
+ "owner": {
63
+ "type": "string",
64
+ "description": "The account owner of the repository. The name is not case sensitive."
65
+ },
66
+ "repo": {
67
+ "type": "string",
68
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
69
+ },
70
+ "comment_id": {
71
+ "type": "number",
72
+ "description": "The unique identifier of the comment."
73
+ },
74
+ "content": {
75
+ "type": "string",
76
+ "description": "Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment.",
77
+ "enum": [
78
+ "+1",
79
+ "-1",
80
+ "laugh",
81
+ "confused",
82
+ "heart",
83
+ "hooray",
84
+ "rocket",
85
+ "eyes"
86
+ ]
87
+ },
88
+ "per_page": {
89
+ "type": "number",
90
+ "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
91
+ },
92
+ "page": {
93
+ "type": "number",
94
+ "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
95
+ }
96
+ },
97
+ "required": [
98
+ "owner",
99
+ "repo",
100
+ "comment_id"
101
+ ]
102
+ }
103
+ },
104
+ {
105
+ "name": "reactions_create_for_commit_comment",
106
+ "description": "Create reaction for a commit comment",
107
+ "method": "POST",
108
+ "path": "/repos/{owner}/{repo}/comments/{comment_id}/reactions",
109
+ "deleteSendsJsonBody": false,
110
+ "inputSchema": {
111
+ "type": "object",
112
+ "properties": {
113
+ "owner": {
114
+ "type": "string",
115
+ "description": "The account owner of the repository. The name is not case sensitive."
116
+ },
117
+ "repo": {
118
+ "type": "string",
119
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
120
+ },
121
+ "comment_id": {
122
+ "type": "number",
123
+ "description": "The unique identifier of the comment."
124
+ },
125
+ "content": {
126
+ "type": "string",
127
+ "description": "The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the commit comment.",
128
+ "enum": [
129
+ "+1",
130
+ "-1",
131
+ "laugh",
132
+ "confused",
133
+ "heart",
134
+ "hooray",
135
+ "rocket",
136
+ "eyes"
137
+ ]
138
+ }
139
+ },
140
+ "required": [
141
+ "owner",
142
+ "repo",
143
+ "comment_id",
144
+ "content"
145
+ ]
146
+ }
147
+ },
148
+ {
149
+ "name": "reactions_delete_for_commit_comment",
150
+ "description": "Delete a commit comment reaction",
151
+ "method": "DELETE",
152
+ "path": "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}",
153
+ "deleteSendsJsonBody": false,
154
+ "inputSchema": {
155
+ "type": "object",
156
+ "properties": {
157
+ "owner": {
158
+ "type": "string",
159
+ "description": "The account owner of the repository. The name is not case sensitive."
160
+ },
161
+ "repo": {
162
+ "type": "string",
163
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
164
+ },
165
+ "comment_id": {
166
+ "type": "number",
167
+ "description": "The unique identifier of the comment."
168
+ },
169
+ "reaction_id": {
170
+ "type": "number",
171
+ "description": "The unique identifier of the reaction."
172
+ }
173
+ },
174
+ "required": [
175
+ "owner",
176
+ "repo",
177
+ "comment_id",
178
+ "reaction_id"
179
+ ]
180
+ }
181
+ },
182
+ {
183
+ "name": "reactions_list_for_issue_comment",
184
+ "description": "List reactions for an issue comment",
185
+ "method": "GET",
186
+ "path": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
187
+ "deleteSendsJsonBody": false,
188
+ "inputSchema": {
189
+ "type": "object",
190
+ "properties": {
191
+ "owner": {
192
+ "type": "string",
193
+ "description": "The account owner of the repository. The name is not case sensitive."
194
+ },
195
+ "repo": {
196
+ "type": "string",
197
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
198
+ },
199
+ "comment_id": {
200
+ "type": "number",
201
+ "description": "The unique identifier of the comment."
202
+ },
203
+ "content": {
204
+ "type": "string",
205
+ "description": "Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment.",
206
+ "enum": [
207
+ "+1",
208
+ "-1",
209
+ "laugh",
210
+ "confused",
211
+ "heart",
212
+ "hooray",
213
+ "rocket",
214
+ "eyes"
215
+ ]
216
+ },
217
+ "per_page": {
218
+ "type": "number",
219
+ "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
220
+ },
221
+ "page": {
222
+ "type": "number",
223
+ "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
224
+ }
225
+ },
226
+ "required": [
227
+ "owner",
228
+ "repo",
229
+ "comment_id"
230
+ ]
231
+ }
232
+ },
233
+ {
234
+ "name": "reactions_create_for_issue_comment",
235
+ "description": "Create reaction for an issue comment",
236
+ "method": "POST",
237
+ "path": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",
238
+ "deleteSendsJsonBody": false,
239
+ "inputSchema": {
240
+ "type": "object",
241
+ "properties": {
242
+ "owner": {
243
+ "type": "string",
244
+ "description": "The account owner of the repository. The name is not case sensitive."
245
+ },
246
+ "repo": {
247
+ "type": "string",
248
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
249
+ },
250
+ "comment_id": {
251
+ "type": "number",
252
+ "description": "The unique identifier of the comment."
253
+ },
254
+ "content": {
255
+ "type": "string",
256
+ "description": "The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue comment.",
257
+ "enum": [
258
+ "+1",
259
+ "-1",
260
+ "laugh",
261
+ "confused",
262
+ "heart",
263
+ "hooray",
264
+ "rocket",
265
+ "eyes"
266
+ ]
267
+ }
268
+ },
269
+ "required": [
270
+ "owner",
271
+ "repo",
272
+ "comment_id",
273
+ "content"
274
+ ]
275
+ }
276
+ },
277
+ {
278
+ "name": "reactions_delete_for_issue_comment",
279
+ "description": "Delete an issue comment reaction",
280
+ "method": "DELETE",
281
+ "path": "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}",
282
+ "deleteSendsJsonBody": false,
283
+ "inputSchema": {
284
+ "type": "object",
285
+ "properties": {
286
+ "owner": {
287
+ "type": "string",
288
+ "description": "The account owner of the repository. The name is not case sensitive."
289
+ },
290
+ "repo": {
291
+ "type": "string",
292
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
293
+ },
294
+ "comment_id": {
295
+ "type": "number",
296
+ "description": "The unique identifier of the comment."
297
+ },
298
+ "reaction_id": {
299
+ "type": "number",
300
+ "description": "The unique identifier of the reaction."
301
+ }
302
+ },
303
+ "required": [
304
+ "owner",
305
+ "repo",
306
+ "comment_id",
307
+ "reaction_id"
308
+ ]
309
+ }
310
+ },
311
+ {
312
+ "name": "reactions_list_for_issue",
313
+ "description": "List reactions for an issue",
314
+ "method": "GET",
315
+ "path": "/repos/{owner}/{repo}/issues/{issue_number}/reactions",
316
+ "deleteSendsJsonBody": false,
317
+ "inputSchema": {
318
+ "type": "object",
319
+ "properties": {
320
+ "owner": {
321
+ "type": "string",
322
+ "description": "The account owner of the repository. The name is not case sensitive."
323
+ },
324
+ "repo": {
325
+ "type": "string",
326
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
327
+ },
328
+ "issue_number": {
329
+ "type": "number",
330
+ "description": "The number that identifies the issue."
331
+ },
332
+ "content": {
333
+ "type": "string",
334
+ "description": "Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue.",
335
+ "enum": [
336
+ "+1",
337
+ "-1",
338
+ "laugh",
339
+ "confused",
340
+ "heart",
341
+ "hooray",
342
+ "rocket",
343
+ "eyes"
344
+ ]
345
+ },
346
+ "per_page": {
347
+ "type": "number",
348
+ "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
349
+ },
350
+ "page": {
351
+ "type": "number",
352
+ "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
353
+ }
354
+ },
355
+ "required": [
356
+ "owner",
357
+ "repo",
358
+ "issue_number"
359
+ ]
360
+ }
361
+ },
362
+ {
363
+ "name": "reactions_create_for_issue",
364
+ "description": "Create reaction for an issue",
365
+ "method": "POST",
366
+ "path": "/repos/{owner}/{repo}/issues/{issue_number}/reactions",
367
+ "deleteSendsJsonBody": false,
368
+ "inputSchema": {
369
+ "type": "object",
370
+ "properties": {
371
+ "owner": {
372
+ "type": "string",
373
+ "description": "The account owner of the repository. The name is not case sensitive."
374
+ },
375
+ "repo": {
376
+ "type": "string",
377
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
378
+ },
379
+ "issue_number": {
380
+ "type": "number",
381
+ "description": "The number that identifies the issue."
382
+ },
383
+ "content": {
384
+ "type": "string",
385
+ "description": "The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the issue.",
386
+ "enum": [
387
+ "+1",
388
+ "-1",
389
+ "laugh",
390
+ "confused",
391
+ "heart",
392
+ "hooray",
393
+ "rocket",
394
+ "eyes"
395
+ ]
396
+ }
397
+ },
398
+ "required": [
399
+ "owner",
400
+ "repo",
401
+ "issue_number",
402
+ "content"
403
+ ]
404
+ }
405
+ },
406
+ {
407
+ "name": "reactions_delete_for_issue",
408
+ "description": "Delete an issue reaction",
409
+ "method": "DELETE",
410
+ "path": "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}",
411
+ "deleteSendsJsonBody": false,
412
+ "inputSchema": {
413
+ "type": "object",
414
+ "properties": {
415
+ "owner": {
416
+ "type": "string",
417
+ "description": "The account owner of the repository. The name is not case sensitive."
418
+ },
419
+ "repo": {
420
+ "type": "string",
421
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
422
+ },
423
+ "issue_number": {
424
+ "type": "number",
425
+ "description": "The number that identifies the issue."
426
+ },
427
+ "reaction_id": {
428
+ "type": "number",
429
+ "description": "The unique identifier of the reaction."
430
+ }
431
+ },
432
+ "required": [
433
+ "owner",
434
+ "repo",
435
+ "issue_number",
436
+ "reaction_id"
437
+ ]
438
+ }
439
+ },
440
+ {
441
+ "name": "reactions_list_for_pull_request_review_comment",
442
+ "description": "List reactions for a pull request review comment",
443
+ "method": "GET",
444
+ "path": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
445
+ "deleteSendsJsonBody": false,
446
+ "inputSchema": {
447
+ "type": "object",
448
+ "properties": {
449
+ "owner": {
450
+ "type": "string",
451
+ "description": "The account owner of the repository. The name is not case sensitive."
452
+ },
453
+ "repo": {
454
+ "type": "string",
455
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
456
+ },
457
+ "comment_id": {
458
+ "type": "number",
459
+ "description": "The unique identifier of the comment."
460
+ },
461
+ "content": {
462
+ "type": "string",
463
+ "description": "Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment.",
464
+ "enum": [
465
+ "+1",
466
+ "-1",
467
+ "laugh",
468
+ "confused",
469
+ "heart",
470
+ "hooray",
471
+ "rocket",
472
+ "eyes"
473
+ ]
474
+ },
475
+ "per_page": {
476
+ "type": "number",
477
+ "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
478
+ },
479
+ "page": {
480
+ "type": "number",
481
+ "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
482
+ }
483
+ },
484
+ "required": [
485
+ "owner",
486
+ "repo",
487
+ "comment_id"
488
+ ]
489
+ }
490
+ },
491
+ {
492
+ "name": "reactions_create_for_pull_request_review_comment",
493
+ "description": "Create reaction for a pull request review comment",
494
+ "method": "POST",
495
+ "path": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",
496
+ "deleteSendsJsonBody": false,
497
+ "inputSchema": {
498
+ "type": "object",
499
+ "properties": {
500
+ "owner": {
501
+ "type": "string",
502
+ "description": "The account owner of the repository. The name is not case sensitive."
503
+ },
504
+ "repo": {
505
+ "type": "string",
506
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
507
+ },
508
+ "comment_id": {
509
+ "type": "number",
510
+ "description": "The unique identifier of the comment."
511
+ },
512
+ "content": {
513
+ "type": "string",
514
+ "description": "The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the pull request review comment.",
515
+ "enum": [
516
+ "+1",
517
+ "-1",
518
+ "laugh",
519
+ "confused",
520
+ "heart",
521
+ "hooray",
522
+ "rocket",
523
+ "eyes"
524
+ ]
525
+ }
526
+ },
527
+ "required": [
528
+ "owner",
529
+ "repo",
530
+ "comment_id",
531
+ "content"
532
+ ]
533
+ }
534
+ },
535
+ {
536
+ "name": "reactions_delete_for_pull_request_comment",
537
+ "description": "Delete a pull request comment reaction",
538
+ "method": "DELETE",
539
+ "path": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}",
540
+ "deleteSendsJsonBody": false,
541
+ "inputSchema": {
542
+ "type": "object",
543
+ "properties": {
544
+ "owner": {
545
+ "type": "string",
546
+ "description": "The account owner of the repository. The name is not case sensitive."
547
+ },
548
+ "repo": {
549
+ "type": "string",
550
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
551
+ },
552
+ "comment_id": {
553
+ "type": "number",
554
+ "description": "The unique identifier of the comment."
555
+ },
556
+ "reaction_id": {
557
+ "type": "number",
558
+ "description": "The unique identifier of the reaction."
559
+ }
560
+ },
561
+ "required": [
562
+ "owner",
563
+ "repo",
564
+ "comment_id",
565
+ "reaction_id"
566
+ ]
567
+ }
568
+ },
569
+ {
570
+ "name": "reactions_list_for_release",
571
+ "description": "List reactions for a release",
572
+ "method": "GET",
573
+ "path": "/repos/{owner}/{repo}/releases/{release_id}/reactions",
574
+ "deleteSendsJsonBody": false,
575
+ "inputSchema": {
576
+ "type": "object",
577
+ "properties": {
578
+ "owner": {
579
+ "type": "string",
580
+ "description": "The account owner of the repository. The name is not case sensitive."
581
+ },
582
+ "repo": {
583
+ "type": "string",
584
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
585
+ },
586
+ "release_id": {
587
+ "type": "number",
588
+ "description": "The unique identifier of the release."
589
+ },
590
+ "content": {
591
+ "type": "string",
592
+ "description": "Returns a single [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release.",
593
+ "enum": [
594
+ "+1",
595
+ "laugh",
596
+ "heart",
597
+ "hooray",
598
+ "rocket",
599
+ "eyes"
600
+ ]
601
+ },
602
+ "per_page": {
603
+ "type": "number",
604
+ "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
605
+ },
606
+ "page": {
607
+ "type": "number",
608
+ "description": "The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""
609
+ }
610
+ },
611
+ "required": [
612
+ "owner",
613
+ "repo",
614
+ "release_id"
615
+ ]
616
+ }
617
+ },
618
+ {
619
+ "name": "reactions_create_for_release",
620
+ "description": "Create reaction for a release",
621
+ "method": "POST",
622
+ "path": "/repos/{owner}/{repo}/releases/{release_id}/reactions",
623
+ "deleteSendsJsonBody": false,
624
+ "inputSchema": {
625
+ "type": "object",
626
+ "properties": {
627
+ "owner": {
628
+ "type": "string",
629
+ "description": "The account owner of the repository. The name is not case sensitive."
630
+ },
631
+ "repo": {
632
+ "type": "string",
633
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
634
+ },
635
+ "release_id": {
636
+ "type": "number",
637
+ "description": "The unique identifier of the release."
638
+ },
639
+ "content": {
640
+ "type": "string",
641
+ "description": "The [reaction type](https://docs.github.com/rest/reactions/reactions#about-reactions) to add to the release.",
642
+ "enum": [
643
+ "+1",
644
+ "laugh",
645
+ "heart",
646
+ "hooray",
647
+ "rocket",
648
+ "eyes"
649
+ ]
650
+ }
651
+ },
652
+ "required": [
653
+ "owner",
654
+ "repo",
655
+ "release_id",
656
+ "content"
657
+ ]
658
+ }
659
+ },
660
+ {
661
+ "name": "reactions_delete_for_release",
662
+ "description": "Delete a release reaction",
663
+ "method": "DELETE",
664
+ "path": "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}",
665
+ "deleteSendsJsonBody": false,
666
+ "inputSchema": {
667
+ "type": "object",
668
+ "properties": {
669
+ "owner": {
670
+ "type": "string",
671
+ "description": "The account owner of the repository. The name is not case sensitive."
672
+ },
673
+ "repo": {
674
+ "type": "string",
675
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
676
+ },
677
+ "release_id": {
678
+ "type": "number",
679
+ "description": "The unique identifier of the release."
680
+ },
681
+ "reaction_id": {
682
+ "type": "number",
683
+ "description": "The unique identifier of the reaction."
684
+ }
685
+ },
686
+ "required": [
687
+ "owner",
688
+ "repo",
689
+ "release_id",
690
+ "reaction_id"
691
+ ]
692
+ }
693
+ }
694
+ ];
695
+
696
+ export const tools = ENDPOINTS.map((e) => ({
697
+ name: e.name,
698
+ description: e.description,
699
+ method: e.method,
700
+ path: e.path,
701
+ deleteSendsJsonBody: Boolean(e.deleteSendsJsonBody),
702
+ inputSchema: e.inputSchema,
703
+ handler: async (params) => ({
704
+ content: [{ type: 'text', text: JSON.stringify(await apiRequest(e.method, e.path, params, { deleteSendsJsonBody: e.deleteSendsJsonBody }), null, 2) }],
705
+ }),
706
+ }));