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,915 @@
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-dependabot';
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": "dependabot_list_alerts_for_enterprise",
55
+ "description": "List Dependabot alerts for an enterprise",
56
+ "method": "GET",
57
+ "path": "/enterprises/{enterprise}/dependabot/alerts",
58
+ "deleteSendsJsonBody": false,
59
+ "inputSchema": {
60
+ "type": "object",
61
+ "properties": {
62
+ "enterprise": {
63
+ "type": "string",
64
+ "description": "The slug version of the enterprise name."
65
+ },
66
+ "state": {
67
+ "type": "string",
68
+ "description": "A comma-separated list of states. If specified, only alerts with these states will be returned.\n\nCan be: `auto_dismissed`, `dismissed`, `fixed`, `open`"
69
+ },
70
+ "severity": {
71
+ "type": "string",
72
+ "description": "A comma-separated list of severities. If specified, only alerts with these severities will be returned.\n\nCan be: `low`, `medium`, `high`, `critical`"
73
+ },
74
+ "ecosystem": {
75
+ "type": "string",
76
+ "description": "A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.\n\nCan be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust`"
77
+ },
78
+ "package": {
79
+ "type": "string",
80
+ "description": "A comma-separated list of package names. If specified, only alerts for these packages will be returned."
81
+ },
82
+ "epss_percentage": {
83
+ "type": "string",
84
+ "description": "CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:\n- An exact number (`n`)\n- Comparators such as `>n`, `<n`, `>=n`, `<=n`\n- A range like `n..n`, where `n` is a number from 0.0 to 1.0\n\nFilters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned."
85
+ },
86
+ "has": {
87
+ "type": "array",
88
+ "description": "Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.\nMultiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported."
89
+ },
90
+ "assignee": {
91
+ "type": "string",
92
+ "description": "Filter alerts by assignees.\nProvide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`) to return alerts assigned to any of the specified users.\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees."
93
+ },
94
+ "scope": {
95
+ "type": "string",
96
+ "description": "The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.",
97
+ "enum": [
98
+ "development",
99
+ "runtime"
100
+ ]
101
+ },
102
+ "sort": {
103
+ "type": "string",
104
+ "description": "The property by which to sort the results.\n`created` means when the alert was created.\n`updated` means when the alert's state last changed.\n`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage.",
105
+ "enum": [
106
+ "created",
107
+ "updated",
108
+ "epss_percentage"
109
+ ]
110
+ },
111
+ "direction": {
112
+ "type": "string",
113
+ "description": "The direction to sort the results by.",
114
+ "enum": [
115
+ "asc",
116
+ "desc"
117
+ ]
118
+ },
119
+ "before": {
120
+ "type": "string",
121
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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).\""
122
+ },
123
+ "after": {
124
+ "type": "string",
125
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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).\""
126
+ },
127
+ "per_page": {
128
+ "type": "number",
129
+ "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).\""
130
+ }
131
+ },
132
+ "required": [
133
+ "enterprise"
134
+ ]
135
+ }
136
+ },
137
+ {
138
+ "name": "dependabot_repository_access_for_org",
139
+ "description": "Lists the repositories Dependabot can access in an organization",
140
+ "method": "GET",
141
+ "path": "/organizations/{org}/dependabot/repository-access",
142
+ "deleteSendsJsonBody": false,
143
+ "inputSchema": {
144
+ "type": "object",
145
+ "properties": {
146
+ "org": {
147
+ "type": "string",
148
+ "description": "The organization name. The name is not case sensitive."
149
+ },
150
+ "page": {
151
+ "type": "number",
152
+ "description": "The page number of results to fetch."
153
+ },
154
+ "per_page": {
155
+ "type": "number",
156
+ "description": "Number of results per page."
157
+ }
158
+ },
159
+ "required": [
160
+ "org"
161
+ ]
162
+ }
163
+ },
164
+ {
165
+ "name": "dependabot_update_repository_access_for_org",
166
+ "description": "Updates Dependabot's repository access list for an organization",
167
+ "method": "PATCH",
168
+ "path": "/organizations/{org}/dependabot/repository-access",
169
+ "deleteSendsJsonBody": false,
170
+ "inputSchema": {
171
+ "type": "object",
172
+ "properties": {
173
+ "org": {
174
+ "type": "string",
175
+ "description": "The organization name. The name is not case sensitive."
176
+ },
177
+ "repository_ids_to_add": {
178
+ "type": "array",
179
+ "description": "List of repository IDs to add."
180
+ },
181
+ "repository_ids_to_remove": {
182
+ "type": "array",
183
+ "description": "List of repository IDs to remove."
184
+ }
185
+ },
186
+ "required": [
187
+ "org"
188
+ ]
189
+ }
190
+ },
191
+ {
192
+ "name": "dependabot_set_repository_access_default_level",
193
+ "description": "Set the default repository access level for Dependabot",
194
+ "method": "PUT",
195
+ "path": "/organizations/{org}/dependabot/repository-access/default-level",
196
+ "deleteSendsJsonBody": false,
197
+ "inputSchema": {
198
+ "type": "object",
199
+ "properties": {
200
+ "org": {
201
+ "type": "string",
202
+ "description": "The organization name. The name is not case sensitive."
203
+ },
204
+ "default_level": {
205
+ "type": "string",
206
+ "description": "The default repository access level for Dependabot updates.",
207
+ "enum": [
208
+ "public",
209
+ "internal"
210
+ ]
211
+ }
212
+ },
213
+ "required": [
214
+ "org",
215
+ "default_level"
216
+ ]
217
+ }
218
+ },
219
+ {
220
+ "name": "dependabot_list_alerts_for_org",
221
+ "description": "List Dependabot alerts for an organization",
222
+ "method": "GET",
223
+ "path": "/orgs/{org}/dependabot/alerts",
224
+ "deleteSendsJsonBody": false,
225
+ "inputSchema": {
226
+ "type": "object",
227
+ "properties": {
228
+ "org": {
229
+ "type": "string",
230
+ "description": "The organization name. The name is not case sensitive."
231
+ },
232
+ "state": {
233
+ "type": "string",
234
+ "description": "A comma-separated list of states. If specified, only alerts with these states will be returned.\n\nCan be: `auto_dismissed`, `dismissed`, `fixed`, `open`"
235
+ },
236
+ "severity": {
237
+ "type": "string",
238
+ "description": "A comma-separated list of severities. If specified, only alerts with these severities will be returned.\n\nCan be: `low`, `medium`, `high`, `critical`"
239
+ },
240
+ "ecosystem": {
241
+ "type": "string",
242
+ "description": "A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.\n\nCan be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust`"
243
+ },
244
+ "package": {
245
+ "type": "string",
246
+ "description": "A comma-separated list of package names. If specified, only alerts for these packages will be returned."
247
+ },
248
+ "epss_percentage": {
249
+ "type": "string",
250
+ "description": "CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:\n- An exact number (`n`)\n- Comparators such as `>n`, `<n`, `>=n`, `<=n`\n- A range like `n..n`, where `n` is a number from 0.0 to 1.0\n\nFilters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned."
251
+ },
252
+ "artifact_registry_url": {
253
+ "type": "string",
254
+ "description": "A comma-separated list of artifact registry URLs. If specified, only alerts for repositories with storage records matching these URLs will be returned."
255
+ },
256
+ "artifact_registry": {
257
+ "type": "string",
258
+ "description": "A comma-separated list of Artifact Registry name strings. If specified, only alerts for repositories with storage records matching these registries will be returned.\n\nCan be: `jfrog-artifactory`"
259
+ },
260
+ "has": {
261
+ "type": "array",
262
+ "description": "Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.\nMultiple `has` filters can be passed to filter for alerts that have all of the values."
263
+ },
264
+ "assignee": {
265
+ "type": "string",
266
+ "description": "Filter alerts by assignees.\nProvide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`) to return alerts assigned to any of the specified users.\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees."
267
+ },
268
+ "runtime_risk": {
269
+ "type": "string",
270
+ "description": "A comma-separated list of runtime risk strings. If specified, only alerts for repositories with deployment records matching these risks will be returned.\n\nCan be: `critical-resource`, `internet-exposed`, `sensitive-data`, `lateral-movement`"
271
+ },
272
+ "scope": {
273
+ "type": "string",
274
+ "description": "The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.",
275
+ "enum": [
276
+ "development",
277
+ "runtime"
278
+ ]
279
+ },
280
+ "sort": {
281
+ "type": "string",
282
+ "description": "The property by which to sort the results.\n`created` means when the alert was created.\n`updated` means when the alert's state last changed.\n`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage.",
283
+ "enum": [
284
+ "created",
285
+ "updated",
286
+ "epss_percentage"
287
+ ]
288
+ },
289
+ "direction": {
290
+ "type": "string",
291
+ "description": "The direction to sort the results by.",
292
+ "enum": [
293
+ "asc",
294
+ "desc"
295
+ ]
296
+ },
297
+ "before": {
298
+ "type": "string",
299
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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).\""
300
+ },
301
+ "after": {
302
+ "type": "string",
303
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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).\""
304
+ },
305
+ "per_page": {
306
+ "type": "number",
307
+ "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).\""
308
+ }
309
+ },
310
+ "required": [
311
+ "org"
312
+ ]
313
+ }
314
+ },
315
+ {
316
+ "name": "dependabot_list_org_secrets",
317
+ "description": "List organization secrets",
318
+ "method": "GET",
319
+ "path": "/orgs/{org}/dependabot/secrets",
320
+ "deleteSendsJsonBody": false,
321
+ "inputSchema": {
322
+ "type": "object",
323
+ "properties": {
324
+ "org": {
325
+ "type": "string",
326
+ "description": "The organization name. The name is not case sensitive."
327
+ },
328
+ "per_page": {
329
+ "type": "number",
330
+ "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).\""
331
+ },
332
+ "page": {
333
+ "type": "number",
334
+ "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).\""
335
+ }
336
+ },
337
+ "required": [
338
+ "org"
339
+ ]
340
+ }
341
+ },
342
+ {
343
+ "name": "dependabot_get_org_public_key",
344
+ "description": "Get an organization public key",
345
+ "method": "GET",
346
+ "path": "/orgs/{org}/dependabot/secrets/public-key",
347
+ "deleteSendsJsonBody": false,
348
+ "inputSchema": {
349
+ "type": "object",
350
+ "properties": {
351
+ "org": {
352
+ "type": "string",
353
+ "description": "The organization name. The name is not case sensitive."
354
+ }
355
+ },
356
+ "required": [
357
+ "org"
358
+ ]
359
+ }
360
+ },
361
+ {
362
+ "name": "dependabot_get_org_secret",
363
+ "description": "Get an organization secret",
364
+ "method": "GET",
365
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}",
366
+ "deleteSendsJsonBody": false,
367
+ "inputSchema": {
368
+ "type": "object",
369
+ "properties": {
370
+ "org": {
371
+ "type": "string",
372
+ "description": "The organization name. The name is not case sensitive."
373
+ },
374
+ "secret_name": {
375
+ "type": "string",
376
+ "description": "The name of the secret."
377
+ }
378
+ },
379
+ "required": [
380
+ "org",
381
+ "secret_name"
382
+ ]
383
+ }
384
+ },
385
+ {
386
+ "name": "dependabot_create_or_update_org_secret",
387
+ "description": "Create or update an organization secret",
388
+ "method": "PUT",
389
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}",
390
+ "deleteSendsJsonBody": false,
391
+ "inputSchema": {
392
+ "type": "object",
393
+ "properties": {
394
+ "org": {
395
+ "type": "string",
396
+ "description": "The organization name. The name is not case sensitive."
397
+ },
398
+ "secret_name": {
399
+ "type": "string",
400
+ "description": "The name of the secret."
401
+ },
402
+ "encrypted_value": {
403
+ "type": "string",
404
+ "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/dependabot/secrets#get-an-organization-public-key) endpoint."
405
+ },
406
+ "key_id": {
407
+ "type": "string",
408
+ "description": "ID of the key you used to encrypt the secret."
409
+ },
410
+ "visibility": {
411
+ "type": "string",
412
+ "description": "Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.",
413
+ "enum": [
414
+ "all",
415
+ "private",
416
+ "selected"
417
+ ]
418
+ },
419
+ "selected_repository_ids": {
420
+ "type": "array",
421
+ "description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints."
422
+ }
423
+ },
424
+ "required": [
425
+ "org",
426
+ "secret_name",
427
+ "visibility"
428
+ ]
429
+ }
430
+ },
431
+ {
432
+ "name": "dependabot_delete_org_secret",
433
+ "description": "Delete an organization secret",
434
+ "method": "DELETE",
435
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}",
436
+ "deleteSendsJsonBody": false,
437
+ "inputSchema": {
438
+ "type": "object",
439
+ "properties": {
440
+ "org": {
441
+ "type": "string",
442
+ "description": "The organization name. The name is not case sensitive."
443
+ },
444
+ "secret_name": {
445
+ "type": "string",
446
+ "description": "The name of the secret."
447
+ }
448
+ },
449
+ "required": [
450
+ "org",
451
+ "secret_name"
452
+ ]
453
+ }
454
+ },
455
+ {
456
+ "name": "dependabot_list_selected_repos_for_org_secret",
457
+ "description": "List selected repositories for an organization secret",
458
+ "method": "GET",
459
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}/repositories",
460
+ "deleteSendsJsonBody": false,
461
+ "inputSchema": {
462
+ "type": "object",
463
+ "properties": {
464
+ "org": {
465
+ "type": "string",
466
+ "description": "The organization name. The name is not case sensitive."
467
+ },
468
+ "secret_name": {
469
+ "type": "string",
470
+ "description": "The name of the secret."
471
+ },
472
+ "page": {
473
+ "type": "number",
474
+ "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).\""
475
+ },
476
+ "per_page": {
477
+ "type": "number",
478
+ "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).\""
479
+ }
480
+ },
481
+ "required": [
482
+ "org",
483
+ "secret_name"
484
+ ]
485
+ }
486
+ },
487
+ {
488
+ "name": "dependabot_set_selected_repos_for_org_secret",
489
+ "description": "Set selected repositories for an organization secret",
490
+ "method": "PUT",
491
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}/repositories",
492
+ "deleteSendsJsonBody": false,
493
+ "inputSchema": {
494
+ "type": "object",
495
+ "properties": {
496
+ "org": {
497
+ "type": "string",
498
+ "description": "The organization name. The name is not case sensitive."
499
+ },
500
+ "secret_name": {
501
+ "type": "string",
502
+ "description": "The name of the secret."
503
+ },
504
+ "selected_repository_ids": {
505
+ "type": "array",
506
+ "description": "An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints."
507
+ }
508
+ },
509
+ "required": [
510
+ "org",
511
+ "secret_name",
512
+ "selected_repository_ids"
513
+ ]
514
+ }
515
+ },
516
+ {
517
+ "name": "dependabot_add_selected_repo_to_org_secret",
518
+ "description": "Add selected repository to an organization secret",
519
+ "method": "PUT",
520
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}",
521
+ "deleteSendsJsonBody": false,
522
+ "inputSchema": {
523
+ "type": "object",
524
+ "properties": {
525
+ "org": {
526
+ "type": "string",
527
+ "description": "The organization name. The name is not case sensitive."
528
+ },
529
+ "secret_name": {
530
+ "type": "string",
531
+ "description": "The name of the secret."
532
+ },
533
+ "repository_id": {
534
+ "type": "number",
535
+ "description": "The repository_id parameter"
536
+ }
537
+ },
538
+ "required": [
539
+ "org",
540
+ "secret_name",
541
+ "repository_id"
542
+ ]
543
+ }
544
+ },
545
+ {
546
+ "name": "dependabot_remove_selected_repo_from_org_secret",
547
+ "description": "Remove selected repository from an organization secret",
548
+ "method": "DELETE",
549
+ "path": "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}",
550
+ "deleteSendsJsonBody": false,
551
+ "inputSchema": {
552
+ "type": "object",
553
+ "properties": {
554
+ "org": {
555
+ "type": "string",
556
+ "description": "The organization name. The name is not case sensitive."
557
+ },
558
+ "secret_name": {
559
+ "type": "string",
560
+ "description": "The name of the secret."
561
+ },
562
+ "repository_id": {
563
+ "type": "number",
564
+ "description": "The repository_id parameter"
565
+ }
566
+ },
567
+ "required": [
568
+ "org",
569
+ "secret_name",
570
+ "repository_id"
571
+ ]
572
+ }
573
+ },
574
+ {
575
+ "name": "dependabot_list_alerts_for_repo",
576
+ "description": "List Dependabot alerts for a repository",
577
+ "method": "GET",
578
+ "path": "/repos/{owner}/{repo}/dependabot/alerts",
579
+ "deleteSendsJsonBody": false,
580
+ "inputSchema": {
581
+ "type": "object",
582
+ "properties": {
583
+ "owner": {
584
+ "type": "string",
585
+ "description": "The account owner of the repository. The name is not case sensitive."
586
+ },
587
+ "repo": {
588
+ "type": "string",
589
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
590
+ },
591
+ "state": {
592
+ "type": "string",
593
+ "description": "A comma-separated list of states. If specified, only alerts with these states will be returned.\n\nCan be: `auto_dismissed`, `dismissed`, `fixed`, `open`"
594
+ },
595
+ "severity": {
596
+ "type": "string",
597
+ "description": "A comma-separated list of severities. If specified, only alerts with these severities will be returned.\n\nCan be: `low`, `medium`, `high`, `critical`"
598
+ },
599
+ "ecosystem": {
600
+ "type": "string",
601
+ "description": "A comma-separated list of ecosystems. If specified, only alerts for these ecosystems will be returned.\n\nCan be: `composer`, `go`, `maven`, `npm`, `nuget`, `pip`, `pub`, `rubygems`, `rust`"
602
+ },
603
+ "package": {
604
+ "type": "string",
605
+ "description": "A comma-separated list of package names. If specified, only alerts for these packages will be returned."
606
+ },
607
+ "manifest": {
608
+ "type": "string",
609
+ "description": "A comma-separated list of full manifest paths. If specified, only alerts for these manifests will be returned."
610
+ },
611
+ "epss_percentage": {
612
+ "type": "string",
613
+ "description": "CVE Exploit Prediction Scoring System (EPSS) percentage. Can be specified as:\n- An exact number (`n`)\n- Comparators such as `>n`, `<n`, `>=n`, `<=n`\n- A range like `n..n`, where `n` is a number from 0.0 to 1.0\n\nFilters the list of alerts based on EPSS percentages. If specified, only alerts with the provided EPSS percentages will be returned."
614
+ },
615
+ "has": {
616
+ "type": "array",
617
+ "description": "Filters the list of alerts based on whether the alert has the given value. If specified, only alerts meeting this criterion will be returned.\nMultiple `has` filters can be passed to filter for alerts that have all of the values. Currently, only `patch` is supported."
618
+ },
619
+ "assignee": {
620
+ "type": "string",
621
+ "description": "Filter alerts by assignees.\nProvide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`) to return alerts assigned to any of the specified users.\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees."
622
+ },
623
+ "scope": {
624
+ "type": "string",
625
+ "description": "The scope of the vulnerable dependency. If specified, only alerts with this scope will be returned.",
626
+ "enum": [
627
+ "development",
628
+ "runtime"
629
+ ]
630
+ },
631
+ "sort": {
632
+ "type": "string",
633
+ "description": "The property by which to sort the results.\n`created` means when the alert was created.\n`updated` means when the alert's state last changed.\n`epss_percentage` sorts alerts by the Exploit Prediction Scoring System (EPSS) percentage.",
634
+ "enum": [
635
+ "created",
636
+ "updated",
637
+ "epss_percentage"
638
+ ]
639
+ },
640
+ "direction": {
641
+ "type": "string",
642
+ "description": "The direction to sort the results by.",
643
+ "enum": [
644
+ "asc",
645
+ "desc"
646
+ ]
647
+ },
648
+ "before": {
649
+ "type": "string",
650
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. 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).\""
651
+ },
652
+ "after": {
653
+ "type": "string",
654
+ "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. 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).\""
655
+ },
656
+ "per_page": {
657
+ "type": "number",
658
+ "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).\""
659
+ }
660
+ },
661
+ "required": [
662
+ "owner",
663
+ "repo"
664
+ ]
665
+ }
666
+ },
667
+ {
668
+ "name": "dependabot_get_alert",
669
+ "description": "Get a Dependabot alert",
670
+ "method": "GET",
671
+ "path": "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}",
672
+ "deleteSendsJsonBody": false,
673
+ "inputSchema": {
674
+ "type": "object",
675
+ "properties": {
676
+ "owner": {
677
+ "type": "string",
678
+ "description": "The account owner of the repository. The name is not case sensitive."
679
+ },
680
+ "repo": {
681
+ "type": "string",
682
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
683
+ },
684
+ "alert_number": {
685
+ "type": "number",
686
+ "description": "The number that identifies a Dependabot alert in its repository.\nYou can find this at the end of the URL for a Dependabot alert within GitHub,\nor in `number` fields in the response from the\n`GET /repos/{owner}/{repo}/dependabot/alerts` operation."
687
+ }
688
+ },
689
+ "required": [
690
+ "owner",
691
+ "repo",
692
+ "alert_number"
693
+ ]
694
+ }
695
+ },
696
+ {
697
+ "name": "dependabot_update_alert",
698
+ "description": "Update a Dependabot alert",
699
+ "method": "PATCH",
700
+ "path": "/repos/{owner}/{repo}/dependabot/alerts/{alert_number}",
701
+ "deleteSendsJsonBody": false,
702
+ "inputSchema": {
703
+ "type": "object",
704
+ "properties": {
705
+ "owner": {
706
+ "type": "string",
707
+ "description": "The account owner of the repository. The name is not case sensitive."
708
+ },
709
+ "repo": {
710
+ "type": "string",
711
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
712
+ },
713
+ "alert_number": {
714
+ "type": "number",
715
+ "description": "The number that identifies a Dependabot alert in its repository.\nYou can find this at the end of the URL for a Dependabot alert within GitHub,\nor in `number` fields in the response from the\n`GET /repos/{owner}/{repo}/dependabot/alerts` operation."
716
+ },
717
+ "state": {
718
+ "type": "string",
719
+ "description": "The state of the Dependabot alert.\nA `dismissed_reason` must be provided when setting the state to `dismissed`.",
720
+ "enum": [
721
+ "dismissed",
722
+ "open"
723
+ ]
724
+ },
725
+ "dismissed_reason": {
726
+ "type": "string",
727
+ "description": "**Required when `state` is `dismissed`.** A reason for dismissing the alert.",
728
+ "enum": [
729
+ "fix_started",
730
+ "inaccurate",
731
+ "no_bandwidth",
732
+ "not_used",
733
+ "tolerable_risk"
734
+ ]
735
+ },
736
+ "dismissed_comment": {
737
+ "type": "string",
738
+ "description": "An optional comment associated with dismissing the alert."
739
+ },
740
+ "assignees": {
741
+ "type": "array",
742
+ "description": "Usernames to assign to this Dependabot Alert.\nPass one or more user logins to _replace_ the set of assignees on this alert.\nSend an empty array (`[]`) to clear all assignees from the alert."
743
+ }
744
+ },
745
+ "required": [
746
+ "owner",
747
+ "repo",
748
+ "alert_number"
749
+ ]
750
+ }
751
+ },
752
+ {
753
+ "name": "dependabot_list_repo_secrets",
754
+ "description": "List repository secrets",
755
+ "method": "GET",
756
+ "path": "/repos/{owner}/{repo}/dependabot/secrets",
757
+ "deleteSendsJsonBody": false,
758
+ "inputSchema": {
759
+ "type": "object",
760
+ "properties": {
761
+ "owner": {
762
+ "type": "string",
763
+ "description": "The account owner of the repository. The name is not case sensitive."
764
+ },
765
+ "repo": {
766
+ "type": "string",
767
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
768
+ },
769
+ "per_page": {
770
+ "type": "number",
771
+ "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).\""
772
+ },
773
+ "page": {
774
+ "type": "number",
775
+ "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).\""
776
+ }
777
+ },
778
+ "required": [
779
+ "owner",
780
+ "repo"
781
+ ]
782
+ }
783
+ },
784
+ {
785
+ "name": "dependabot_get_repo_public_key",
786
+ "description": "Get a repository public key",
787
+ "method": "GET",
788
+ "path": "/repos/{owner}/{repo}/dependabot/secrets/public-key",
789
+ "deleteSendsJsonBody": false,
790
+ "inputSchema": {
791
+ "type": "object",
792
+ "properties": {
793
+ "owner": {
794
+ "type": "string",
795
+ "description": "The account owner of the repository. The name is not case sensitive."
796
+ },
797
+ "repo": {
798
+ "type": "string",
799
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
800
+ }
801
+ },
802
+ "required": [
803
+ "owner",
804
+ "repo"
805
+ ]
806
+ }
807
+ },
808
+ {
809
+ "name": "dependabot_get_repo_secret",
810
+ "description": "Get a repository secret",
811
+ "method": "GET",
812
+ "path": "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}",
813
+ "deleteSendsJsonBody": false,
814
+ "inputSchema": {
815
+ "type": "object",
816
+ "properties": {
817
+ "owner": {
818
+ "type": "string",
819
+ "description": "The account owner of the repository. The name is not case sensitive."
820
+ },
821
+ "repo": {
822
+ "type": "string",
823
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
824
+ },
825
+ "secret_name": {
826
+ "type": "string",
827
+ "description": "The name of the secret."
828
+ }
829
+ },
830
+ "required": [
831
+ "owner",
832
+ "repo",
833
+ "secret_name"
834
+ ]
835
+ }
836
+ },
837
+ {
838
+ "name": "dependabot_create_or_update_repo_secret",
839
+ "description": "Create or update a repository secret",
840
+ "method": "PUT",
841
+ "path": "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}",
842
+ "deleteSendsJsonBody": false,
843
+ "inputSchema": {
844
+ "type": "object",
845
+ "properties": {
846
+ "owner": {
847
+ "type": "string",
848
+ "description": "The account owner of the repository. The name is not case sensitive."
849
+ },
850
+ "repo": {
851
+ "type": "string",
852
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
853
+ },
854
+ "secret_name": {
855
+ "type": "string",
856
+ "description": "The name of the secret."
857
+ },
858
+ "encrypted_value": {
859
+ "type": "string",
860
+ "description": "Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/dependabot/secrets#get-a-repository-public-key) endpoint."
861
+ },
862
+ "key_id": {
863
+ "type": "string",
864
+ "description": "ID of the key you used to encrypt the secret."
865
+ }
866
+ },
867
+ "required": [
868
+ "owner",
869
+ "repo",
870
+ "secret_name"
871
+ ]
872
+ }
873
+ },
874
+ {
875
+ "name": "dependabot_delete_repo_secret",
876
+ "description": "Delete a repository secret",
877
+ "method": "DELETE",
878
+ "path": "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}",
879
+ "deleteSendsJsonBody": false,
880
+ "inputSchema": {
881
+ "type": "object",
882
+ "properties": {
883
+ "owner": {
884
+ "type": "string",
885
+ "description": "The account owner of the repository. The name is not case sensitive."
886
+ },
887
+ "repo": {
888
+ "type": "string",
889
+ "description": "The name of the repository without the `.git` extension. The name is not case sensitive."
890
+ },
891
+ "secret_name": {
892
+ "type": "string",
893
+ "description": "The name of the secret."
894
+ }
895
+ },
896
+ "required": [
897
+ "owner",
898
+ "repo",
899
+ "secret_name"
900
+ ]
901
+ }
902
+ }
903
+ ];
904
+
905
+ export const tools = ENDPOINTS.map((e) => ({
906
+ name: e.name,
907
+ description: e.description,
908
+ method: e.method,
909
+ path: e.path,
910
+ deleteSendsJsonBody: Boolean(e.deleteSendsJsonBody),
911
+ inputSchema: e.inputSchema,
912
+ handler: async (params) => ({
913
+ content: [{ type: 'text', text: JSON.stringify(await apiRequest(e.method, e.path, params, { deleteSendsJsonBody: e.deleteSendsJsonBody }), null, 2) }],
914
+ }),
915
+ }));