Skip to content

Commit 7fbf80d

Browse files
CopilotomgitsadsLuluBeatson
authored
Migrate actions toolset to modelcontextprotocol/go-sdk (#1446)
* Initial plan * Migrate actions toolset to modelcontextprotocol/go-sdk - Removed //go:build ignore tags from actions.go and actions_test.go - Updated imports to use modelcontextprotocol/go-sdk instead of mark3labs/mcp-go - Updated all tool constructor signatures to return new types - Converted all tool definitions from DSL format to jsonschema.Schema format - Updated tool handler signatures to use generics - Updated parameter extraction to use args map instead of request - Replaced mcp.NewToolResultText/Error with utils package functions - Updated all tests to work with new handler signature - Updated toolsnaps for all actions tools Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com> * re-add actions toolset * create toolsnaps * create toolsnaps --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com> Co-authored-by: LuluBeatson <lulubeatson@github.com> Co-authored-by: Adam Holt <me@adamholt.co.uk>
1 parent 17aaf6b commit 7fbf80d

17 files changed

+1381
-613
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"annotations": {
3+
"title": "Cancel workflow run"
4+
},
5+
"description": "Cancel a workflow run",
6+
"inputSchema": {
7+
"type": "object",
8+
"required": [
9+
"owner",
10+
"repo",
11+
"run_id"
12+
],
13+
"properties": {
14+
"owner": {
15+
"type": "string",
16+
"description": "Repository owner"
17+
},
18+
"repo": {
19+
"type": "string",
20+
"description": "Repository name"
21+
},
22+
"run_id": {
23+
"type": "number",
24+
"description": "The unique identifier of the workflow run"
25+
}
26+
}
27+
},
28+
"name": "cancel_workflow_run"
29+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"annotations": {
3+
"destructiveHint": true,
4+
"title": "Delete workflow logs"
5+
},
6+
"description": "Delete logs for a workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"owner": {
16+
"type": "string",
17+
"description": "Repository owner"
18+
},
19+
"repo": {
20+
"type": "string",
21+
"description": "Repository name"
22+
},
23+
"run_id": {
24+
"type": "number",
25+
"description": "The unique identifier of the workflow run"
26+
}
27+
}
28+
},
29+
"name": "delete_workflow_run_logs"
30+
}
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": "Download workflow artifact"
5+
},
6+
"description": "Get download URL for a workflow run artifact",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"artifact_id"
13+
],
14+
"properties": {
15+
"artifact_id": {
16+
"type": "number",
17+
"description": "The unique identifier of the artifact"
18+
},
19+
"owner": {
20+
"type": "string",
21+
"description": "Repository owner"
22+
},
23+
"repo": {
24+
"type": "string",
25+
"description": "Repository name"
26+
}
27+
}
28+
},
29+
"name": "download_workflow_run_artifact"
30+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "Get job logs"
5+
},
6+
"description": "Download logs for a specific workflow job or efficiently get all failed job logs for a workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo"
12+
],
13+
"properties": {
14+
"failed_only": {
15+
"type": "boolean",
16+
"description": "When true, gets logs for all failed jobs in run_id"
17+
},
18+
"job_id": {
19+
"type": "number",
20+
"description": "The unique identifier of the workflow job (required for single job logs)"
21+
},
22+
"owner": {
23+
"type": "string",
24+
"description": "Repository owner"
25+
},
26+
"repo": {
27+
"type": "string",
28+
"description": "Repository name"
29+
},
30+
"return_content": {
31+
"type": "boolean",
32+
"description": "Returns actual log content instead of URLs"
33+
},
34+
"run_id": {
35+
"type": "number",
36+
"description": "Workflow run ID (required when using failed_only)"
37+
},
38+
"tail_lines": {
39+
"type": "number",
40+
"description": "Number of lines to return from the end of the log",
41+
"default": 500
42+
}
43+
}
44+
},
45+
"name": "get_job_logs"
46+
}
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 workflow run"
5+
},
6+
"description": "Get details of a specific workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"owner": {
16+
"type": "string",
17+
"description": "Repository owner"
18+
},
19+
"repo": {
20+
"type": "string",
21+
"description": "Repository name"
22+
},
23+
"run_id": {
24+
"type": "number",
25+
"description": "The unique identifier of the workflow run"
26+
}
27+
}
28+
},
29+
"name": "get_workflow_run"
30+
}
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 workflow run logs"
5+
},
6+
"description": "Download logs for a specific workflow run (EXPENSIVE: downloads ALL logs as ZIP. Consider using get_job_logs with failed_only=true for debugging failed jobs)",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"owner": {
16+
"type": "string",
17+
"description": "Repository owner"
18+
},
19+
"repo": {
20+
"type": "string",
21+
"description": "Repository name"
22+
},
23+
"run_id": {
24+
"type": "number",
25+
"description": "The unique identifier of the workflow run"
26+
}
27+
}
28+
},
29+
"name": "get_workflow_run_logs"
30+
}
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 workflow usage"
5+
},
6+
"description": "Get usage metrics for a workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"owner": {
16+
"type": "string",
17+
"description": "Repository owner"
18+
},
19+
"repo": {
20+
"type": "string",
21+
"description": "Repository name"
22+
},
23+
"run_id": {
24+
"type": "number",
25+
"description": "The unique identifier of the workflow run"
26+
}
27+
}
28+
},
29+
"name": "get_workflow_run_usage"
30+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List workflow jobs"
5+
},
6+
"description": "List jobs for a specific workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"filter": {
16+
"type": "string",
17+
"description": "Filters jobs by their completed_at timestamp",
18+
"enum": [
19+
"latest",
20+
"all"
21+
]
22+
},
23+
"owner": {
24+
"type": "string",
25+
"description": "Repository owner"
26+
},
27+
"page": {
28+
"type": "number",
29+
"description": "Page number for pagination (min 1)",
30+
"minimum": 1
31+
},
32+
"perPage": {
33+
"type": "number",
34+
"description": "Results per page for pagination (min 1, max 100)",
35+
"minimum": 1,
36+
"maximum": 100
37+
},
38+
"repo": {
39+
"type": "string",
40+
"description": "Repository name"
41+
},
42+
"run_id": {
43+
"type": "number",
44+
"description": "The unique identifier of the workflow run"
45+
}
46+
}
47+
},
48+
"name": "list_workflow_jobs"
49+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"annotations": {
3+
"readOnlyHint": true,
4+
"title": "List workflow artifacts"
5+
},
6+
"description": "List artifacts for a workflow run",
7+
"inputSchema": {
8+
"type": "object",
9+
"required": [
10+
"owner",
11+
"repo",
12+
"run_id"
13+
],
14+
"properties": {
15+
"owner": {
16+
"type": "string",
17+
"description": "Repository owner"
18+
},
19+
"page": {
20+
"type": "number",
21+
"description": "Page number for pagination (min 1)",
22+
"minimum": 1
23+
},
24+
"perPage": {
25+
"type": "number",
26+
"description": "Results per page for pagination (min 1, max 100)",
27+
"minimum": 1,
28+
"maximum": 100
29+
},
30+
"repo": {
31+
"type": "string",
32+
"description": "Repository name"
33+
},
34+
"run_id": {
35+
"type": "number",
36+
"description": "The unique identifier of the workflow run"
37+
}
38+
}
39+
},
40+
"name": "list_workflow_run_artifacts"
41+
}

0 commit comments

Comments
 (0)