Skip to content

Commit bba8eda

Browse files
committed
Add GitHub Packages tools and tests
- Introduced new tools for managing GitHub Packages, including listing, retrieving, and deleting packages and their versions. - Implemented comprehensive unit tests for the new package-related tools to ensure functionality and error handling. - Updated toolset metadata to include the new packages tools in the available tools list.
1 parent e5522fc commit bba8eda

12 files changed

+2060
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"annotations": {
3+
"title": "Delete organization package",
4+
"readOnlyHint": false
5+
},
6+
"description": "Delete an entire package from a GitHub organization. This will delete all versions of the package. Requires delete:packages scope.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_name": {
14+
"description": "Package name",
15+
"type": "string"
16+
},
17+
"package_type": {
18+
"description": "Package type",
19+
"enum": [
20+
"npm",
21+
"maven",
22+
"rubygems",
23+
"docker",
24+
"nuget",
25+
"container"
26+
],
27+
"type": "string"
28+
}
29+
},
30+
"required": [
31+
"org",
32+
"package_type",
33+
"package_name"
34+
],
35+
"type": "object"
36+
},
37+
"name": "delete_org_package"
38+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"annotations": {
3+
"title": "Delete organization package version",
4+
"readOnlyHint": false
5+
},
6+
"description": "Delete a specific version of a package from a GitHub organization. Requires delete:packages scope.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_name": {
14+
"description": "Package name",
15+
"type": "string"
16+
},
17+
"package_type": {
18+
"description": "Package type",
19+
"enum": [
20+
"npm",
21+
"maven",
22+
"rubygems",
23+
"docker",
24+
"nuget",
25+
"container"
26+
],
27+
"type": "string"
28+
},
29+
"package_version_id": {
30+
"description": "Package version ID",
31+
"type": "number"
32+
}
33+
},
34+
"required": [
35+
"org",
36+
"package_type",
37+
"package_name",
38+
"package_version_id"
39+
],
40+
"type": "object"
41+
},
42+
"name": "delete_org_package_version"
43+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"annotations": {
3+
"title": "Delete user package",
4+
"readOnlyHint": false
5+
},
6+
"description": "Delete an entire package from the authenticated user's account. This will delete all versions of the package. Requires delete:packages scope.",
7+
"inputSchema": {
8+
"properties": {
9+
"package_name": {
10+
"description": "Package name",
11+
"type": "string"
12+
},
13+
"package_type": {
14+
"description": "Package type",
15+
"enum": [
16+
"npm",
17+
"maven",
18+
"rubygems",
19+
"docker",
20+
"nuget",
21+
"container"
22+
],
23+
"type": "string"
24+
}
25+
},
26+
"required": [
27+
"package_type",
28+
"package_name"
29+
],
30+
"type": "object"
31+
},
32+
"name": "delete_user_package"
33+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"annotations": {
3+
"title": "Delete user package version",
4+
"readOnlyHint": false
5+
},
6+
"description": "Delete a specific version of a package from the authenticated user's account. Requires delete:packages scope.",
7+
"inputSchema": {
8+
"properties": {
9+
"package_name": {
10+
"description": "Package name",
11+
"type": "string"
12+
},
13+
"package_type": {
14+
"description": "Package type",
15+
"enum": [
16+
"npm",
17+
"maven",
18+
"rubygems",
19+
"docker",
20+
"nuget",
21+
"container"
22+
],
23+
"type": "string"
24+
},
25+
"package_version_id": {
26+
"description": "Package version ID",
27+
"type": "number"
28+
}
29+
},
30+
"required": [
31+
"package_type",
32+
"package_name",
33+
"package_version_id"
34+
],
35+
"type": "object"
36+
},
37+
"name": "delete_user_package_version"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"annotations": {
3+
"title": "Get organization package details",
4+
"readOnlyHint": true
5+
},
6+
"description": "Get details of a specific package for an organization.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_name": {
14+
"description": "Package name",
15+
"type": "string"
16+
},
17+
"package_type": {
18+
"description": "Package type",
19+
"enum": [
20+
"npm",
21+
"maven",
22+
"rubygems",
23+
"docker",
24+
"nuget",
25+
"container"
26+
],
27+
"type": "string"
28+
}
29+
},
30+
"required": [
31+
"org",
32+
"package_type",
33+
"package_name"
34+
],
35+
"type": "object"
36+
},
37+
"name": "get_org_package"
38+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"annotations": {
3+
"title": "Get package version details",
4+
"readOnlyHint": true
5+
},
6+
"description": "Get details of a specific package version, including metadata.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_name": {
14+
"description": "Package name",
15+
"type": "string"
16+
},
17+
"package_type": {
18+
"description": "Package type",
19+
"enum": [
20+
"npm",
21+
"maven",
22+
"rubygems",
23+
"docker",
24+
"nuget",
25+
"container"
26+
],
27+
"type": "string"
28+
},
29+
"package_version_id": {
30+
"description": "Package version ID",
31+
"type": "number"
32+
}
33+
},
34+
"required": [
35+
"org",
36+
"package_type",
37+
"package_name",
38+
"package_version_id"
39+
],
40+
"type": "object"
41+
},
42+
"name": "get_package_version"
43+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"annotations": {
3+
"title": "List organization packages",
4+
"readOnlyHint": true
5+
},
6+
"description": "List packages for a GitHub organization. Returns package metadata including name, type, visibility, and version count.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_type": {
14+
"description": "Filter by package type",
15+
"enum": [
16+
"npm",
17+
"maven",
18+
"rubygems",
19+
"docker",
20+
"nuget",
21+
"container"
22+
],
23+
"type": "string"
24+
},
25+
"page": {
26+
"description": "Page number for pagination (min 1)",
27+
"minimum": 1,
28+
"type": "number"
29+
},
30+
"perPage": {
31+
"description": "Results per page for pagination (min 1, max 100)",
32+
"maximum": 100,
33+
"minimum": 1,
34+
"type": "number"
35+
},
36+
"visibility": {
37+
"description": "Filter by package visibility",
38+
"enum": [
39+
"public",
40+
"private",
41+
"internal"
42+
],
43+
"type": "string"
44+
}
45+
},
46+
"required": [
47+
"org"
48+
],
49+
"type": "object"
50+
},
51+
"name": "list_org_packages"
52+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"annotations": {
3+
"title": "List package versions",
4+
"readOnlyHint": true
5+
},
6+
"description": "List versions of a package for an organization. Each version includes metadata.",
7+
"inputSchema": {
8+
"properties": {
9+
"org": {
10+
"description": "Organization name",
11+
"type": "string"
12+
},
13+
"package_name": {
14+
"description": "Package name",
15+
"type": "string"
16+
},
17+
"package_type": {
18+
"description": "Package type",
19+
"enum": [
20+
"npm",
21+
"maven",
22+
"rubygems",
23+
"docker",
24+
"nuget",
25+
"container"
26+
],
27+
"type": "string"
28+
},
29+
"page": {
30+
"description": "Page number for pagination (min 1)",
31+
"minimum": 1,
32+
"type": "number"
33+
},
34+
"perPage": {
35+
"description": "Results per page for pagination (min 1, max 100)",
36+
"maximum": 100,
37+
"minimum": 1,
38+
"type": "number"
39+
},
40+
"state": {
41+
"description": "Filter by version state",
42+
"enum": [
43+
"active",
44+
"deleted"
45+
],
46+
"type": "string"
47+
}
48+
},
49+
"required": [
50+
"org",
51+
"package_type",
52+
"package_name"
53+
],
54+
"type": "object"
55+
},
56+
"name": "list_package_versions"
57+
}

0 commit comments

Comments
 (0)