Skip to content

Commit a405519

Browse files
CopilotomgitsadsLuluBeatson
authored
Migrate code-scanning toolset to modelcontextprotocol/go-sdk (#1430)
* Initial plan * Migrate code-scanning toolset to modelcontextprotocol/go-sdk Co-authored-by: omgitsads <[email protected]> * fix lint * re-add code_security toolset * nolint:unused --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: omgitsads <[email protected]> Co-authored-by: LuluBeatson <[email protected]>
1 parent 6c07546 commit a405519

File tree

6 files changed

+171
-146
lines changed

6 files changed

+171
-146
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: 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: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
{
22
"annotations": {
3-
"title": "List code scanning alerts",
4-
"readOnlyHint": true
3+
"readOnlyHint": true,
4+
"title": "List code scanning alerts"
55
},
66
"description": "List code scanning alerts in a GitHub repository.",
77
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
813
"properties": {
914
"owner": {
10-
"description": "The owner of the repository.",
11-
"type": "string"
15+
"type": "string",
16+
"description": "The owner of the repository."
1217
},
1318
"ref": {
14-
"description": "The Git reference for the results you want to list.",
15-
"type": "string"
19+
"type": "string",
20+
"description": "The Git reference for the results you want to list."
1621
},
1722
"repo": {
18-
"description": "The name of the repository.",
19-
"type": "string"
23+
"type": "string",
24+
"description": "The name of the repository."
2025
},
2126
"severity": {
27+
"type": "string",
2228
"description": "Filter code scanning alerts by severity",
2329
"enum": [
2430
"critical",
@@ -28,30 +34,24 @@
2834
"warning",
2935
"note",
3036
"error"
31-
],
32-
"type": "string"
37+
]
3338
},
3439
"state": {
35-
"default": "open",
40+
"type": "string",
3641
"description": "Filter code scanning alerts by state. Defaults to open",
42+
"default": "open",
3743
"enum": [
3844
"open",
3945
"closed",
4046
"dismissed",
4147
"fixed"
42-
],
43-
"type": "string"
48+
]
4449
},
4550
"tool_name": {
46-
"description": "The name of the tool used for code scanning.",
47-
"type": "string"
51+
"type": "string",
52+
"description": "The name of the tool used for code scanning."
4853
}
49-
},
50-
"required": [
51-
"owner",
52-
"repo"
53-
],
54-
"type": "object"
54+
}
5555
},
5656
"name": "list_code_scanning_alerts"
5757
}

0 commit comments

Comments
 (0)