Skip to content

Commit e7b275a

Browse files
committed
Merge branch 'omgitsads/go-sdk' into copilot/migrate-issues-toolset
2 parents 9aa5576 + 9bf905b commit e7b275a

35 files changed

+2214
-1354
lines changed

internal/ghmcp/server.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ type MCPServerConfig struct {
5757
Logger *slog.Logger
5858
}
5959

60-
const stdioServerLogPrefix = "stdioserver"
61-
6260
func NewMCPServer(cfg MCPServerConfig) (*mcp.Server, error) {
6361
apiHost, err := parseAPIHost(cfg.Host)
6462
if err != nil {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"annotations": {
3+
"title": "Create Gist"
4+
},
5+
"description": "Create a new gist",
6+
"inputSchema": {
7+
"type": "object",
8+
"required": [
9+
"filename",
10+
"content"
11+
],
12+
"properties": {
13+
"content": {
14+
"type": "string",
15+
"description": "Content for simple single-file gist creation"
16+
},
17+
"description": {
18+
"type": "string",
19+
"description": "Description of the gist"
20+
},
21+
"filename": {
22+
"type": "string",
23+
"description": "Filename for simple single-file gist creation"
24+
},
25+
"public": {
26+
"type": "boolean",
27+
"description": "Whether the gist is public",
28+
"default": false
29+
}
30+
}
31+
},
32+
"name": "create_gist"
33+
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"annotations": {
3-
"title": "Get code scanning alert",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "Get code scanning alert"
55
},
66
"description": "Get details of a specific code scanning alert in a GitHub repository.",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"alertNumber"
13+
],
814
"properties": {
915
"alertNumber": {
10-
"description": "The number of the alert.",
11-
"type": "number"
16+
"type": "number",
17+
"description": "The number of the alert."
1218
},
1319
"owner": {
14-
"description": "The owner of the repository.",
15-
"type": "string"
20+
"type": "string",
21+
"description": "The owner of the repository."
1622
},
1723
"repo": {
18-
"description": "The name of the repository.",
19-
"type": "string"
24+
"type": "string",
25+
"description": "The name of the repository."
2026
}
21-
},
22-
"required": [
23-
"owner",
24-
"repo",
25-
"alertNumber"
26-
],
27-
"type": "object"
27+
}
2828
},
2929
"name": "get_code_scanning_alert"
3030
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get Gist Content"
5+
},
6+
"description": "Get gist content of a particular gist, by gist ID",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"gist_id"
11+
],
12+
"properties": {
13+
"gist_id": {
14+
"type": "string",
15+
"description": "The ID of the gist"
16+
}
17+
}
18+
},
19+
"name": "get_gist"
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get a global security advisory"
5+
},
6+
"description": "Get a global security advisory",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"ghsaId"
11+
],
12+
"properties": {
13+
"ghsaId": {
14+
"type": "string",
15+
"description": "GitHub Security Advisory ID (format: GHSA-xxxx-xxxx-xxxx)."
16+
}
17+
}
18+
},
19+
"name": "get_global_security_advisory"
20+
}
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"annotations": {
3-
"title": "Get a specific label from a repository.",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "Get a specific label from a repository."
55
},
66
"description": "Get a specific label from a repository.",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"name"
13+
],
814
"properties": {
915
"name": {
10-
"description": "Label name.",
11-
"type": "string"
16+
"type": "string",
17+
"description": "Label name."
1218
},
1319
"owner": {
14-
"description": "Repository owner (username or organization name)",
15-
"type": "string"
20+
"type": "string",
21+
"description": "Repository owner (username or organization name)"
1622
},
1723
"repo": {
18-
"description": "Repository name",
19-
"type": "string"
24+
"type": "string",
25+
"description": "Repository name"
2026
}
21-
},
22-
"required": [
23-
"owner",
24-
"repo",
25-
"name"
26-
],
27-
"type": "object"
27+
}
2828
},
2929
"name": "get_label"
3030
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
{
22
"annotations": {
3-
"title": "Get repository tree",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "Get repository tree"
55
},
66
"description": "Get the tree structure (files and directories) of a GitHub repository at a specific ref or SHA",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
813
"properties": {
914
"owner": {
10-
"description": "Repository owner (username or organization)",
11-
"type": "string"
15+
"type": "string",
16+
"description": "Repository owner (username or organization)"
1217
},
1318
"path_filter": {
14-
"description": "Optional path prefix to filter the tree results (e.g., 'src/' to only show files in the src directory)",
15-
"type": "string"
19+
"type": "string",
20+
"description": "Optional path prefix to filter the tree results (e.g., 'src/' to only show files in the src directory)"
1621
},
1722
"recursive": {
18-
"default": false,
23+
"type": "boolean",
1924
"description": "Setting this parameter to true returns the objects or subtrees referenced by the tree. Default is false",
20-
"type": "boolean"
25+
"default": false
2126
},
2227
"repo": {
23-
"description": "Repository name",
24-
"type": "string"
28+
"type": "string",
29+
"description": "Repository name"
2530
},
2631
"tree_sha": {
27-
"description": "The SHA1 value or ref (branch or tag) name of the tree. Defaults to the repository's default branch",
28-
"type": "string"
32+
"type": "string",
33+
"description": "The SHA1 value or ref (branch or tag) name of the tree. Defaults to the repository's default branch"
2934
}
30-
},
31-
"required": [
32-
"owner",
33-
"repo"
34-
],
35-
"type": "object"
35+
}
3636
},
3737
"name": "get_repository_tree"
3838
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get secret scanning alert"
5+
},
6+
"description": "Get details of a specific secret scanning alert in a GitHub repository.",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"alertNumber"
13+
],
14+
"properties": {
15+
"alertNumber": {
16+
"type": "number",
17+
"description": "The number of the alert."
18+
},
19+
"owner": {
20+
"type": "string",
21+
"description": "The owner of the repository."
22+
},
23+
"repo": {
24+
"type": "string",
25+
"description": "The name of the repository."
26+
}
27+
}
28+
},
29+
"name": "get_secret_scanning_alert"
30+
}
Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,51 @@
11
{
22
"annotations": {
3-
"title": "Write operations on repository labels.",
4-
"readOnlyHint": false
3+
"title": "Write operations on repository labels."
54
},
65
"description": "Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool.",
76
"inputSchema": {
7+
"type": "object",
8+
"required": [
9+
"method",
10+
"owner",
11+
"repo",
12+
"name"
13+
],
814
"properties": {
915
"color": {
10-
"description": "Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'.",
11-
"type": "string"
16+
"type": "string",
17+
"description": "Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'."
1218
},
1319
"description": {
14-
"description": "Label description text. Optional for 'create' and 'update'.",
15-
"type": "string"
20+
"type": "string",
21+
"description": "Label description text. Optional for 'create' and 'update'."
1622
},
1723
"method": {
24+
"type": "string",
1825
"description": "Operation to perform: 'create', 'update', or 'delete'",
1926
"enum": [
2027
"create",
2128
"update",
2229
"delete"
23-
],
24-
"type": "string"
30+
]
2531
},
2632
"name": {
27-
"description": "Label name - required for all operations",
28-
"type": "string"
33+
"type": "string",
34+
"description": "Label name - required for all operations"
2935
},
3036
"new_name": {
31-
"description": "New name for the label (used only with 'update' method to rename)",
32-
"type": "string"
37+
"type": "string",
38+
"description": "New name for the label (used only with 'update' method to rename)"
3339
},
3440
"owner": {
35-
"description": "Repository owner (username or organization name)",
36-
"type": "string"
41+
"type": "string",
42+
"description": "Repository owner (username or organization name)"
3743
},
3844
"repo": {
39-
"description": "Repository name",
40-
"type": "string"
45+
"type": "string",
46+
"description": "Repository name"
4147
}
42-
},
43-
"required": [
44-
"method",
45-
"owner",
46-
"repo",
47-
"name"
48-
],
49-
"type": "object"
48+
}
5049
},
5150
"name": "label_write"
5251
}

0 commit comments

Comments
 (0)