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,1088 @@
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-packages';
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": "packages_list_docker_migration_conflicting_packages_for_orga",
55
+ "description": "Get list of conflicting packages during Docker migration for organization",
56
+ "method": "GET",
57
+ "path": "/orgs/{org}/docker/conflicts",
58
+ "deleteSendsJsonBody": false,
59
+ "inputSchema": {
60
+ "type": "object",
61
+ "properties": {
62
+ "org": {
63
+ "type": "string",
64
+ "description": "The organization name. The name is not case sensitive."
65
+ }
66
+ },
67
+ "required": [
68
+ "org"
69
+ ]
70
+ }
71
+ },
72
+ {
73
+ "name": "packages_list_packages_for_organization",
74
+ "description": "List packages for an organization",
75
+ "method": "GET",
76
+ "path": "/orgs/{org}/packages",
77
+ "deleteSendsJsonBody": false,
78
+ "inputSchema": {
79
+ "type": "object",
80
+ "properties": {
81
+ "package_type": {
82
+ "type": "string",
83
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
84
+ "enum": [
85
+ "npm",
86
+ "maven",
87
+ "rubygems",
88
+ "docker",
89
+ "nuget",
90
+ "container"
91
+ ]
92
+ },
93
+ "org": {
94
+ "type": "string",
95
+ "description": "The organization name. The name is not case sensitive."
96
+ },
97
+ "visibility": {
98
+ "type": "string",
99
+ "description": "The selected visibility of the packages. This parameter is optional and only filters an existing result set.\n\nThe `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.\nFor the list of GitHub Packages registries that support granular permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
100
+ "enum": [
101
+ "public",
102
+ "private",
103
+ "internal"
104
+ ]
105
+ },
106
+ "page": {
107
+ "type": "number",
108
+ "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).\""
109
+ },
110
+ "per_page": {
111
+ "type": "number",
112
+ "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).\""
113
+ }
114
+ },
115
+ "required": [
116
+ "package_type",
117
+ "org"
118
+ ]
119
+ }
120
+ },
121
+ {
122
+ "name": "packages_get_package_for_organization",
123
+ "description": "Get a package for an organization",
124
+ "method": "GET",
125
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}",
126
+ "deleteSendsJsonBody": false,
127
+ "inputSchema": {
128
+ "type": "object",
129
+ "properties": {
130
+ "package_type": {
131
+ "type": "string",
132
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
133
+ "enum": [
134
+ "npm",
135
+ "maven",
136
+ "rubygems",
137
+ "docker",
138
+ "nuget",
139
+ "container"
140
+ ]
141
+ },
142
+ "package_name": {
143
+ "type": "string",
144
+ "description": "The name of the package."
145
+ },
146
+ "org": {
147
+ "type": "string",
148
+ "description": "The organization name. The name is not case sensitive."
149
+ }
150
+ },
151
+ "required": [
152
+ "package_type",
153
+ "package_name",
154
+ "org"
155
+ ]
156
+ }
157
+ },
158
+ {
159
+ "name": "packages_delete_package_for_org",
160
+ "description": "Delete a package for an organization",
161
+ "method": "DELETE",
162
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}",
163
+ "deleteSendsJsonBody": false,
164
+ "inputSchema": {
165
+ "type": "object",
166
+ "properties": {
167
+ "package_type": {
168
+ "type": "string",
169
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
170
+ "enum": [
171
+ "npm",
172
+ "maven",
173
+ "rubygems",
174
+ "docker",
175
+ "nuget",
176
+ "container"
177
+ ]
178
+ },
179
+ "package_name": {
180
+ "type": "string",
181
+ "description": "The name of the package."
182
+ },
183
+ "org": {
184
+ "type": "string",
185
+ "description": "The organization name. The name is not case sensitive."
186
+ }
187
+ },
188
+ "required": [
189
+ "package_type",
190
+ "package_name",
191
+ "org"
192
+ ]
193
+ }
194
+ },
195
+ {
196
+ "name": "packages_restore_package_for_org",
197
+ "description": "Restore a package for an organization",
198
+ "method": "POST",
199
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}/restore",
200
+ "deleteSendsJsonBody": false,
201
+ "inputSchema": {
202
+ "type": "object",
203
+ "properties": {
204
+ "package_type": {
205
+ "type": "string",
206
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
207
+ "enum": [
208
+ "npm",
209
+ "maven",
210
+ "rubygems",
211
+ "docker",
212
+ "nuget",
213
+ "container"
214
+ ]
215
+ },
216
+ "package_name": {
217
+ "type": "string",
218
+ "description": "The name of the package."
219
+ },
220
+ "org": {
221
+ "type": "string",
222
+ "description": "The organization name. The name is not case sensitive."
223
+ },
224
+ "token": {
225
+ "type": "string",
226
+ "description": "package token"
227
+ }
228
+ },
229
+ "required": [
230
+ "package_type",
231
+ "package_name",
232
+ "org"
233
+ ]
234
+ }
235
+ },
236
+ {
237
+ "name": "packages_get_all_package_versions_for_package_owned_by_org",
238
+ "description": "List package versions for a package owned by an organization",
239
+ "method": "GET",
240
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}/versions",
241
+ "deleteSendsJsonBody": false,
242
+ "inputSchema": {
243
+ "type": "object",
244
+ "properties": {
245
+ "package_type": {
246
+ "type": "string",
247
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
248
+ "enum": [
249
+ "npm",
250
+ "maven",
251
+ "rubygems",
252
+ "docker",
253
+ "nuget",
254
+ "container"
255
+ ]
256
+ },
257
+ "package_name": {
258
+ "type": "string",
259
+ "description": "The name of the package."
260
+ },
261
+ "org": {
262
+ "type": "string",
263
+ "description": "The organization name. The name is not case sensitive."
264
+ },
265
+ "page": {
266
+ "type": "number",
267
+ "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).\""
268
+ },
269
+ "per_page": {
270
+ "type": "number",
271
+ "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).\""
272
+ },
273
+ "state": {
274
+ "type": "string",
275
+ "description": "The state of the package, either active or deleted.",
276
+ "enum": [
277
+ "active",
278
+ "deleted"
279
+ ]
280
+ }
281
+ },
282
+ "required": [
283
+ "package_type",
284
+ "package_name",
285
+ "org"
286
+ ]
287
+ }
288
+ },
289
+ {
290
+ "name": "packages_get_package_version_for_organization",
291
+ "description": "Get a package version for an organization",
292
+ "method": "GET",
293
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}",
294
+ "deleteSendsJsonBody": false,
295
+ "inputSchema": {
296
+ "type": "object",
297
+ "properties": {
298
+ "package_type": {
299
+ "type": "string",
300
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
301
+ "enum": [
302
+ "npm",
303
+ "maven",
304
+ "rubygems",
305
+ "docker",
306
+ "nuget",
307
+ "container"
308
+ ]
309
+ },
310
+ "package_name": {
311
+ "type": "string",
312
+ "description": "The name of the package."
313
+ },
314
+ "org": {
315
+ "type": "string",
316
+ "description": "The organization name. The name is not case sensitive."
317
+ },
318
+ "package_version_id": {
319
+ "type": "number",
320
+ "description": "Unique identifier of the package version."
321
+ }
322
+ },
323
+ "required": [
324
+ "package_type",
325
+ "package_name",
326
+ "org",
327
+ "package_version_id"
328
+ ]
329
+ }
330
+ },
331
+ {
332
+ "name": "packages_delete_package_version_for_org",
333
+ "description": "Delete package version for an organization",
334
+ "method": "DELETE",
335
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}",
336
+ "deleteSendsJsonBody": false,
337
+ "inputSchema": {
338
+ "type": "object",
339
+ "properties": {
340
+ "package_type": {
341
+ "type": "string",
342
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
343
+ "enum": [
344
+ "npm",
345
+ "maven",
346
+ "rubygems",
347
+ "docker",
348
+ "nuget",
349
+ "container"
350
+ ]
351
+ },
352
+ "package_name": {
353
+ "type": "string",
354
+ "description": "The name of the package."
355
+ },
356
+ "org": {
357
+ "type": "string",
358
+ "description": "The organization name. The name is not case sensitive."
359
+ },
360
+ "package_version_id": {
361
+ "type": "number",
362
+ "description": "Unique identifier of the package version."
363
+ }
364
+ },
365
+ "required": [
366
+ "package_type",
367
+ "package_name",
368
+ "org",
369
+ "package_version_id"
370
+ ]
371
+ }
372
+ },
373
+ {
374
+ "name": "packages_restore_package_version_for_org",
375
+ "description": "Restore package version for an organization",
376
+ "method": "POST",
377
+ "path": "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore",
378
+ "deleteSendsJsonBody": false,
379
+ "inputSchema": {
380
+ "type": "object",
381
+ "properties": {
382
+ "package_type": {
383
+ "type": "string",
384
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
385
+ "enum": [
386
+ "npm",
387
+ "maven",
388
+ "rubygems",
389
+ "docker",
390
+ "nuget",
391
+ "container"
392
+ ]
393
+ },
394
+ "package_name": {
395
+ "type": "string",
396
+ "description": "The name of the package."
397
+ },
398
+ "org": {
399
+ "type": "string",
400
+ "description": "The organization name. The name is not case sensitive."
401
+ },
402
+ "package_version_id": {
403
+ "type": "number",
404
+ "description": "Unique identifier of the package version."
405
+ }
406
+ },
407
+ "required": [
408
+ "package_type",
409
+ "package_name",
410
+ "org",
411
+ "package_version_id"
412
+ ]
413
+ }
414
+ },
415
+ {
416
+ "name": "packages_list_docker_migration_conflicting_packages_for_auth",
417
+ "description": "Get list of conflicting packages during Docker migration for authenticated-user",
418
+ "method": "GET",
419
+ "path": "/user/docker/conflicts",
420
+ "deleteSendsJsonBody": false,
421
+ "inputSchema": {
422
+ "type": "object",
423
+ "properties": {},
424
+ "required": []
425
+ }
426
+ },
427
+ {
428
+ "name": "packages_list_packages_for_authenticated_user",
429
+ "description": "List packages for the authenticated user's namespace",
430
+ "method": "GET",
431
+ "path": "/user/packages",
432
+ "deleteSendsJsonBody": false,
433
+ "inputSchema": {
434
+ "type": "object",
435
+ "properties": {
436
+ "package_type": {
437
+ "type": "string",
438
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
439
+ "enum": [
440
+ "npm",
441
+ "maven",
442
+ "rubygems",
443
+ "docker",
444
+ "nuget",
445
+ "container"
446
+ ]
447
+ },
448
+ "visibility": {
449
+ "type": "string",
450
+ "description": "The selected visibility of the packages. This parameter is optional and only filters an existing result set.\n\nThe `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.\nFor the list of GitHub Packages registries that support granular permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
451
+ "enum": [
452
+ "public",
453
+ "private",
454
+ "internal"
455
+ ]
456
+ },
457
+ "page": {
458
+ "type": "number",
459
+ "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).\""
460
+ },
461
+ "per_page": {
462
+ "type": "number",
463
+ "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).\""
464
+ }
465
+ },
466
+ "required": [
467
+ "package_type"
468
+ ]
469
+ }
470
+ },
471
+ {
472
+ "name": "packages_get_package_for_authenticated_user",
473
+ "description": "Get a package for the authenticated user",
474
+ "method": "GET",
475
+ "path": "/user/packages/{package_type}/{package_name}",
476
+ "deleteSendsJsonBody": false,
477
+ "inputSchema": {
478
+ "type": "object",
479
+ "properties": {
480
+ "package_type": {
481
+ "type": "string",
482
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
483
+ "enum": [
484
+ "npm",
485
+ "maven",
486
+ "rubygems",
487
+ "docker",
488
+ "nuget",
489
+ "container"
490
+ ]
491
+ },
492
+ "package_name": {
493
+ "type": "string",
494
+ "description": "The name of the package."
495
+ }
496
+ },
497
+ "required": [
498
+ "package_type",
499
+ "package_name"
500
+ ]
501
+ }
502
+ },
503
+ {
504
+ "name": "packages_delete_package_for_authenticated_user",
505
+ "description": "Delete a package for the authenticated user",
506
+ "method": "DELETE",
507
+ "path": "/user/packages/{package_type}/{package_name}",
508
+ "deleteSendsJsonBody": false,
509
+ "inputSchema": {
510
+ "type": "object",
511
+ "properties": {
512
+ "package_type": {
513
+ "type": "string",
514
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
515
+ "enum": [
516
+ "npm",
517
+ "maven",
518
+ "rubygems",
519
+ "docker",
520
+ "nuget",
521
+ "container"
522
+ ]
523
+ },
524
+ "package_name": {
525
+ "type": "string",
526
+ "description": "The name of the package."
527
+ }
528
+ },
529
+ "required": [
530
+ "package_type",
531
+ "package_name"
532
+ ]
533
+ }
534
+ },
535
+ {
536
+ "name": "packages_restore_package_for_authenticated_user",
537
+ "description": "Restore a package for the authenticated user",
538
+ "method": "POST",
539
+ "path": "/user/packages/{package_type}/{package_name}/restore",
540
+ "deleteSendsJsonBody": false,
541
+ "inputSchema": {
542
+ "type": "object",
543
+ "properties": {
544
+ "package_type": {
545
+ "type": "string",
546
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
547
+ "enum": [
548
+ "npm",
549
+ "maven",
550
+ "rubygems",
551
+ "docker",
552
+ "nuget",
553
+ "container"
554
+ ]
555
+ },
556
+ "package_name": {
557
+ "type": "string",
558
+ "description": "The name of the package."
559
+ },
560
+ "token": {
561
+ "type": "string",
562
+ "description": "package token"
563
+ }
564
+ },
565
+ "required": [
566
+ "package_type",
567
+ "package_name"
568
+ ]
569
+ }
570
+ },
571
+ {
572
+ "name": "packages_get_all_package_versions_for_package_owned_by_authe",
573
+ "description": "List package versions for a package owned by the authenticated user",
574
+ "method": "GET",
575
+ "path": "/user/packages/{package_type}/{package_name}/versions",
576
+ "deleteSendsJsonBody": false,
577
+ "inputSchema": {
578
+ "type": "object",
579
+ "properties": {
580
+ "package_type": {
581
+ "type": "string",
582
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
583
+ "enum": [
584
+ "npm",
585
+ "maven",
586
+ "rubygems",
587
+ "docker",
588
+ "nuget",
589
+ "container"
590
+ ]
591
+ },
592
+ "package_name": {
593
+ "type": "string",
594
+ "description": "The name of the package."
595
+ },
596
+ "page": {
597
+ "type": "number",
598
+ "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).\""
599
+ },
600
+ "per_page": {
601
+ "type": "number",
602
+ "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).\""
603
+ },
604
+ "state": {
605
+ "type": "string",
606
+ "description": "The state of the package, either active or deleted.",
607
+ "enum": [
608
+ "active",
609
+ "deleted"
610
+ ]
611
+ }
612
+ },
613
+ "required": [
614
+ "package_type",
615
+ "package_name"
616
+ ]
617
+ }
618
+ },
619
+ {
620
+ "name": "packages_get_package_version_for_authenticated_user",
621
+ "description": "Get a package version for the authenticated user",
622
+ "method": "GET",
623
+ "path": "/user/packages/{package_type}/{package_name}/versions/{package_version_id}",
624
+ "deleteSendsJsonBody": false,
625
+ "inputSchema": {
626
+ "type": "object",
627
+ "properties": {
628
+ "package_type": {
629
+ "type": "string",
630
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
631
+ "enum": [
632
+ "npm",
633
+ "maven",
634
+ "rubygems",
635
+ "docker",
636
+ "nuget",
637
+ "container"
638
+ ]
639
+ },
640
+ "package_name": {
641
+ "type": "string",
642
+ "description": "The name of the package."
643
+ },
644
+ "package_version_id": {
645
+ "type": "number",
646
+ "description": "Unique identifier of the package version."
647
+ }
648
+ },
649
+ "required": [
650
+ "package_type",
651
+ "package_name",
652
+ "package_version_id"
653
+ ]
654
+ }
655
+ },
656
+ {
657
+ "name": "packages_delete_package_version_for_authenticated_user",
658
+ "description": "Delete a package version for the authenticated user",
659
+ "method": "DELETE",
660
+ "path": "/user/packages/{package_type}/{package_name}/versions/{package_version_id}",
661
+ "deleteSendsJsonBody": false,
662
+ "inputSchema": {
663
+ "type": "object",
664
+ "properties": {
665
+ "package_type": {
666
+ "type": "string",
667
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
668
+ "enum": [
669
+ "npm",
670
+ "maven",
671
+ "rubygems",
672
+ "docker",
673
+ "nuget",
674
+ "container"
675
+ ]
676
+ },
677
+ "package_name": {
678
+ "type": "string",
679
+ "description": "The name of the package."
680
+ },
681
+ "package_version_id": {
682
+ "type": "number",
683
+ "description": "Unique identifier of the package version."
684
+ }
685
+ },
686
+ "required": [
687
+ "package_type",
688
+ "package_name",
689
+ "package_version_id"
690
+ ]
691
+ }
692
+ },
693
+ {
694
+ "name": "packages_restore_package_version_for_authenticated_user",
695
+ "description": "Restore a package version for the authenticated user",
696
+ "method": "POST",
697
+ "path": "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore",
698
+ "deleteSendsJsonBody": false,
699
+ "inputSchema": {
700
+ "type": "object",
701
+ "properties": {
702
+ "package_type": {
703
+ "type": "string",
704
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
705
+ "enum": [
706
+ "npm",
707
+ "maven",
708
+ "rubygems",
709
+ "docker",
710
+ "nuget",
711
+ "container"
712
+ ]
713
+ },
714
+ "package_name": {
715
+ "type": "string",
716
+ "description": "The name of the package."
717
+ },
718
+ "package_version_id": {
719
+ "type": "number",
720
+ "description": "Unique identifier of the package version."
721
+ }
722
+ },
723
+ "required": [
724
+ "package_type",
725
+ "package_name",
726
+ "package_version_id"
727
+ ]
728
+ }
729
+ },
730
+ {
731
+ "name": "packages_list_docker_migration_conflicting_packages_for_user",
732
+ "description": "Get list of conflicting packages during Docker migration for user",
733
+ "method": "GET",
734
+ "path": "/users/{username}/docker/conflicts",
735
+ "deleteSendsJsonBody": false,
736
+ "inputSchema": {
737
+ "type": "object",
738
+ "properties": {
739
+ "username": {
740
+ "type": "string",
741
+ "description": "The handle for the GitHub user account."
742
+ }
743
+ },
744
+ "required": [
745
+ "username"
746
+ ]
747
+ }
748
+ },
749
+ {
750
+ "name": "packages_list_packages_for_user",
751
+ "description": "List packages for a user",
752
+ "method": "GET",
753
+ "path": "/users/{username}/packages",
754
+ "deleteSendsJsonBody": false,
755
+ "inputSchema": {
756
+ "type": "object",
757
+ "properties": {
758
+ "package_type": {
759
+ "type": "string",
760
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
761
+ "enum": [
762
+ "npm",
763
+ "maven",
764
+ "rubygems",
765
+ "docker",
766
+ "nuget",
767
+ "container"
768
+ ]
769
+ },
770
+ "visibility": {
771
+ "type": "string",
772
+ "description": "The selected visibility of the packages. This parameter is optional and only filters an existing result set.\n\nThe `internal` visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems `internal` is synonymous with `private`.\nFor the list of GitHub Packages registries that support granular permissions, see \"[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages).\"",
773
+ "enum": [
774
+ "public",
775
+ "private",
776
+ "internal"
777
+ ]
778
+ },
779
+ "username": {
780
+ "type": "string",
781
+ "description": "The handle for the GitHub user account."
782
+ },
783
+ "page": {
784
+ "type": "number",
785
+ "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).\""
786
+ },
787
+ "per_page": {
788
+ "type": "number",
789
+ "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).\""
790
+ }
791
+ },
792
+ "required": [
793
+ "package_type",
794
+ "username"
795
+ ]
796
+ }
797
+ },
798
+ {
799
+ "name": "packages_get_package_for_user",
800
+ "description": "Get a package for a user",
801
+ "method": "GET",
802
+ "path": "/users/{username}/packages/{package_type}/{package_name}",
803
+ "deleteSendsJsonBody": false,
804
+ "inputSchema": {
805
+ "type": "object",
806
+ "properties": {
807
+ "package_type": {
808
+ "type": "string",
809
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
810
+ "enum": [
811
+ "npm",
812
+ "maven",
813
+ "rubygems",
814
+ "docker",
815
+ "nuget",
816
+ "container"
817
+ ]
818
+ },
819
+ "package_name": {
820
+ "type": "string",
821
+ "description": "The name of the package."
822
+ },
823
+ "username": {
824
+ "type": "string",
825
+ "description": "The handle for the GitHub user account."
826
+ }
827
+ },
828
+ "required": [
829
+ "package_type",
830
+ "package_name",
831
+ "username"
832
+ ]
833
+ }
834
+ },
835
+ {
836
+ "name": "packages_delete_package_for_user",
837
+ "description": "Delete a package for a user",
838
+ "method": "DELETE",
839
+ "path": "/users/{username}/packages/{package_type}/{package_name}",
840
+ "deleteSendsJsonBody": false,
841
+ "inputSchema": {
842
+ "type": "object",
843
+ "properties": {
844
+ "package_type": {
845
+ "type": "string",
846
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
847
+ "enum": [
848
+ "npm",
849
+ "maven",
850
+ "rubygems",
851
+ "docker",
852
+ "nuget",
853
+ "container"
854
+ ]
855
+ },
856
+ "package_name": {
857
+ "type": "string",
858
+ "description": "The name of the package."
859
+ },
860
+ "username": {
861
+ "type": "string",
862
+ "description": "The handle for the GitHub user account."
863
+ }
864
+ },
865
+ "required": [
866
+ "package_type",
867
+ "package_name",
868
+ "username"
869
+ ]
870
+ }
871
+ },
872
+ {
873
+ "name": "packages_restore_package_for_user",
874
+ "description": "Restore a package for a user",
875
+ "method": "POST",
876
+ "path": "/users/{username}/packages/{package_type}/{package_name}/restore",
877
+ "deleteSendsJsonBody": false,
878
+ "inputSchema": {
879
+ "type": "object",
880
+ "properties": {
881
+ "package_type": {
882
+ "type": "string",
883
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
884
+ "enum": [
885
+ "npm",
886
+ "maven",
887
+ "rubygems",
888
+ "docker",
889
+ "nuget",
890
+ "container"
891
+ ]
892
+ },
893
+ "package_name": {
894
+ "type": "string",
895
+ "description": "The name of the package."
896
+ },
897
+ "username": {
898
+ "type": "string",
899
+ "description": "The handle for the GitHub user account."
900
+ },
901
+ "token": {
902
+ "type": "string",
903
+ "description": "package token"
904
+ }
905
+ },
906
+ "required": [
907
+ "package_type",
908
+ "package_name",
909
+ "username"
910
+ ]
911
+ }
912
+ },
913
+ {
914
+ "name": "packages_get_all_package_versions_for_package_owned_by_user",
915
+ "description": "List package versions for a package owned by a user",
916
+ "method": "GET",
917
+ "path": "/users/{username}/packages/{package_type}/{package_name}/versions",
918
+ "deleteSendsJsonBody": false,
919
+ "inputSchema": {
920
+ "type": "object",
921
+ "properties": {
922
+ "package_type": {
923
+ "type": "string",
924
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
925
+ "enum": [
926
+ "npm",
927
+ "maven",
928
+ "rubygems",
929
+ "docker",
930
+ "nuget",
931
+ "container"
932
+ ]
933
+ },
934
+ "package_name": {
935
+ "type": "string",
936
+ "description": "The name of the package."
937
+ },
938
+ "username": {
939
+ "type": "string",
940
+ "description": "The handle for the GitHub user account."
941
+ }
942
+ },
943
+ "required": [
944
+ "package_type",
945
+ "package_name",
946
+ "username"
947
+ ]
948
+ }
949
+ },
950
+ {
951
+ "name": "packages_get_package_version_for_user",
952
+ "description": "Get a package version for a user",
953
+ "method": "GET",
954
+ "path": "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}",
955
+ "deleteSendsJsonBody": false,
956
+ "inputSchema": {
957
+ "type": "object",
958
+ "properties": {
959
+ "package_type": {
960
+ "type": "string",
961
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
962
+ "enum": [
963
+ "npm",
964
+ "maven",
965
+ "rubygems",
966
+ "docker",
967
+ "nuget",
968
+ "container"
969
+ ]
970
+ },
971
+ "package_name": {
972
+ "type": "string",
973
+ "description": "The name of the package."
974
+ },
975
+ "package_version_id": {
976
+ "type": "number",
977
+ "description": "Unique identifier of the package version."
978
+ },
979
+ "username": {
980
+ "type": "string",
981
+ "description": "The handle for the GitHub user account."
982
+ }
983
+ },
984
+ "required": [
985
+ "package_type",
986
+ "package_name",
987
+ "package_version_id",
988
+ "username"
989
+ ]
990
+ }
991
+ },
992
+ {
993
+ "name": "packages_delete_package_version_for_user",
994
+ "description": "Delete package version for a user",
995
+ "method": "DELETE",
996
+ "path": "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}",
997
+ "deleteSendsJsonBody": false,
998
+ "inputSchema": {
999
+ "type": "object",
1000
+ "properties": {
1001
+ "package_type": {
1002
+ "type": "string",
1003
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
1004
+ "enum": [
1005
+ "npm",
1006
+ "maven",
1007
+ "rubygems",
1008
+ "docker",
1009
+ "nuget",
1010
+ "container"
1011
+ ]
1012
+ },
1013
+ "package_name": {
1014
+ "type": "string",
1015
+ "description": "The name of the package."
1016
+ },
1017
+ "username": {
1018
+ "type": "string",
1019
+ "description": "The handle for the GitHub user account."
1020
+ },
1021
+ "package_version_id": {
1022
+ "type": "number",
1023
+ "description": "Unique identifier of the package version."
1024
+ }
1025
+ },
1026
+ "required": [
1027
+ "package_type",
1028
+ "package_name",
1029
+ "username",
1030
+ "package_version_id"
1031
+ ]
1032
+ }
1033
+ },
1034
+ {
1035
+ "name": "packages_restore_package_version_for_user",
1036
+ "description": "Restore package version for a user",
1037
+ "method": "POST",
1038
+ "path": "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore",
1039
+ "deleteSendsJsonBody": false,
1040
+ "inputSchema": {
1041
+ "type": "object",
1042
+ "properties": {
1043
+ "package_type": {
1044
+ "type": "string",
1045
+ "description": "The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.",
1046
+ "enum": [
1047
+ "npm",
1048
+ "maven",
1049
+ "rubygems",
1050
+ "docker",
1051
+ "nuget",
1052
+ "container"
1053
+ ]
1054
+ },
1055
+ "package_name": {
1056
+ "type": "string",
1057
+ "description": "The name of the package."
1058
+ },
1059
+ "username": {
1060
+ "type": "string",
1061
+ "description": "The handle for the GitHub user account."
1062
+ },
1063
+ "package_version_id": {
1064
+ "type": "number",
1065
+ "description": "Unique identifier of the package version."
1066
+ }
1067
+ },
1068
+ "required": [
1069
+ "package_type",
1070
+ "package_name",
1071
+ "username",
1072
+ "package_version_id"
1073
+ ]
1074
+ }
1075
+ }
1076
+ ];
1077
+
1078
+ export const tools = ENDPOINTS.map((e) => ({
1079
+ name: e.name,
1080
+ description: e.description,
1081
+ method: e.method,
1082
+ path: e.path,
1083
+ deleteSendsJsonBody: Boolean(e.deleteSendsJsonBody),
1084
+ inputSchema: e.inputSchema,
1085
+ handler: async (params) => ({
1086
+ content: [{ type: 'text', text: JSON.stringify(await apiRequest(e.method, e.path, params, { deleteSendsJsonBody: e.deleteSendsJsonBody }), null, 2) }],
1087
+ }),
1088
+ }));