Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 30 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,94 +490,49 @@ The following sets of tools are available:

<summary>Actions</summary>

- **cancel_workflow_run** - Cancel workflow run
- **actions_get** - Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
- `method`: The method to execute (string, required)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)
- `resource_id`: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.
- Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.
- Provide an artifact ID for 'download_workflow_run_artifact' method.
- Provide a job ID for 'get_workflow_job' method.
(string, required)

- **delete_workflow_run_logs** - Delete workflow logs
- **actions_list** - List GitHub Actions workflows in a repository
- `method`: The action to perform (string, required)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (default: 1) (number, optional)
- `per_page`: Results per page for pagination (default: 30, max: 100) (number, optional)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **download_workflow_run_artifact** - Download workflow artifact
- `artifact_id`: The unique identifier of the artifact (number, required)
- `resource_id`: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
- Do not provide any resource ID for 'list_workflows' method.
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'list_workflow_runs' method.
- Provide a workflow run ID for 'list_workflow_jobs' and 'list_workflow_run_artifacts' methods.
(string, optional)
- `workflow_jobs_filter`: Filters for workflow jobs. **ONLY** used when method is 'list_workflow_jobs' (object, optional)
- `workflow_runs_filter`: Filters for workflow runs. **ONLY** used when method is 'list_workflow_runs' (object, optional)

- **actions_run_trigger** - Trigger GitHub Actions workflow actions
- `inputs`: Inputs the workflow accepts. Only used for 'run_workflow' method. (object, optional)
- `method`: The method to execute (string, required)
- `owner`: Repository owner (string, required)
- `ref`: The git reference for the workflow. The reference can be a branch or tag name. Required for 'run_workflow' method. (string, optional)
- `repo`: Repository name (string, required)
- `run_id`: The ID of the workflow run. Required for all methods except 'run_workflow'. (number, optional)
- `workflow_id`: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method. (string, optional)

- **get_job_logs** - Get job logs
- `failed_only`: When true, gets logs for all failed jobs in run_id (boolean, optional)
- `job_id`: The unique identifier of the workflow job (required for single job logs) (number, optional)
- **get_job_logs** - Get GitHub Actions workflow job logs
- `failed_only`: When true, gets logs for all failed jobs in the workflow run specified by run_id. Requires run_id to be provided. (boolean, optional)
- `job_id`: The unique identifier of the workflow job. Required when getting logs for a single job. (number, optional)
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `return_content`: Returns actual log content instead of URLs (boolean, optional)
- `run_id`: Workflow run ID (required when using failed_only) (number, optional)
- `run_id`: The unique identifier of the workflow run. Required when failed_only is true to get logs for all failed jobs in the run. (number, optional)
- `tail_lines`: Number of lines to return from the end of the log (number, optional)

- **get_workflow_run** - Get workflow run
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **get_workflow_run_logs** - Get workflow run logs
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **get_workflow_run_usage** - Get workflow usage
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **list_workflow_jobs** - List workflow jobs
- `filter`: Filters jobs by their completed_at timestamp (string, optional)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **list_workflow_run_artifacts** - List workflow artifacts
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **list_workflow_runs** - List workflow runs
- `actor`: Returns someone's workflow runs. Use the login for the user who created the workflow run. (string, optional)
- `branch`: Returns workflow runs associated with a branch. Use the name of the branch. (string, optional)
- `event`: Returns workflow runs for a specific event type (string, optional)
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)
- `status`: Returns workflow runs with the check run status (string, optional)
- `workflow_id`: The workflow ID or workflow file name (string, required)

- **list_workflows** - List workflows
- `owner`: Repository owner (string, required)
- `page`: Page number for pagination (min 1) (number, optional)
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
- `repo`: Repository name (string, required)

- **rerun_failed_jobs** - Rerun failed jobs
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **rerun_workflow_run** - Rerun workflow run
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)
- `run_id`: The unique identifier of the workflow run (number, required)

- **run_workflow** - Run workflow
- `inputs`: Inputs the workflow accepts (object, optional)
- `owner`: Repository owner (string, required)
- `ref`: The git reference for the workflow. The reference can be a branch or tag name. (string, required)
- `repo`: Repository name (string, required)
- `workflow_id`: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml) (string, required)

</details>

<details>
Expand Down
43 changes: 43 additions & 0 deletions pkg/github/__toolsnaps__/actions_get.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"annotations": {
"readOnlyHint": true,
"title": "Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)"
},
"description": "Get details about specific GitHub Actions resources.\nUse this tool to get details about individual workflows, workflow runs, jobs, and artifacts by their unique IDs.\n",
"inputSchema": {
"type": "object",
"required": [
"method",
"owner",
"repo",
"resource_id"
],
"properties": {
"method": {
"type": "string",
"description": "The method to execute",
"enum": [
"get_workflow",
"get_workflow_run",
"get_workflow_job",
"download_workflow_run_artifact",
"get_workflow_run_usage",
"get_workflow_run_logs_url"
]
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"resource_id": {
"type": "string",
"description": "The unique identifier of the resource. This will vary based on the \"method\" provided, so ensure you provide the correct ID:\n- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.\n- Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.\n- Provide an artifact ID for 'download_workflow_run_artifact' method.\n- Provide a job ID for 'get_workflow_job' method.\n"
}
}
},
"name": "actions_get"
}
128 changes: 128 additions & 0 deletions pkg/github/__toolsnaps__/actions_list.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"annotations": {
"readOnlyHint": true,
"title": "List GitHub Actions workflows in a repository"
},
"description": "Tools for listing GitHub Actions resources.\nUse this tool to list workflows in a repository, or list workflow runs, jobs, and artifacts for a specific workflow or workflow run.\n",
"inputSchema": {
"type": "object",
"required": [
"method",
"owner",
"repo"
],
"properties": {
"method": {
"type": "string",
"description": "The action to perform",
"enum": [
"list_workflows",
"list_workflow_runs",
"list_workflow_jobs",
"list_workflow_run_artifacts"
]
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"page": {
"type": "number",
"description": "Page number for pagination (default: 1)",
"minimum": 1
},
"per_page": {
"type": "number",
"description": "Results per page for pagination (default: 30, max: 100)",
"minimum": 1,
"maximum": 100
},
"repo": {
"type": "string",
"description": "Repository name"
},
"resource_id": {
"type": "string",
"description": "The unique identifier of the resource. This will vary based on the \"method\" provided, so ensure you provide the correct ID:\n- Do not provide any resource ID for 'list_workflows' method.\n- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'list_workflow_runs' method.\n- Provide a workflow run ID for 'list_workflow_jobs' and 'list_workflow_run_artifacts' methods.\n"
},
"workflow_jobs_filter": {
"type": "object",
"description": "Filters for workflow jobs. **ONLY** used when method is 'list_workflow_jobs'",
"properties": {
"filter": {
"type": "string",
"description": "Filters jobs by their completed_at timestamp",
"enum": [
"latest",
"all"
]
}
}
},
"workflow_runs_filter": {
"type": "object",
"description": "Filters for workflow runs. **ONLY** used when method is 'list_workflow_runs'",
"properties": {
"actor": {
"type": "string",
"description": "Filter to a specific GitHub user's workflow runs."
},
"branch": {
"type": "string",
"description": "Filter workflow runs to a specific Git branch. Use the name of the branch."
},
"event": {
"type": "string",
"description": "Filter workflow runs to a specific event type",
"enum": [
"branch_protection_rule",
"check_run",
"check_suite",
"create",
"delete",
"deployment",
"deployment_status",
"discussion",
"discussion_comment",
"fork",
"gollum",
"issue_comment",
"issues",
"label",
"merge_group",
"milestone",
"page_build",
"public",
"pull_request",
"pull_request_review",
"pull_request_review_comment",
"pull_request_target",
"push",
"registry_package",
"release",
"repository_dispatch",
"schedule",
"status",
"watch",
"workflow_call",
"workflow_dispatch",
"workflow_run"
]
},
"status": {
"type": "string",
"description": "Filter workflow runs to only runs with a specific status",
"enum": [
"queued",
"in_progress",
"completed",
"requested",
"waiting"
]
}
}
}
}
},
"name": "actions_list"
}
53 changes: 53 additions & 0 deletions pkg/github/__toolsnaps__/actions_run_trigger.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"annotations": {
"destructiveHint": true,
"title": "Trigger GitHub Actions workflow actions"
},
"description": "Trigger GitHub Actions workflow operations, including running, re-running, cancelling workflow runs, and deleting workflow run logs.",
"inputSchema": {
"type": "object",
"required": [
"method",
"owner",
"repo"
],
"properties": {
"inputs": {
"type": "object",
"description": "Inputs the workflow accepts. Only used for 'run_workflow' method."
},
"method": {
"type": "string",
"description": "The method to execute",
"enum": [
"run_workflow",
"rerun_workflow_run",
"rerun_failed_jobs",
"cancel_workflow_run",
"delete_workflow_run_logs"
]
},
"owner": {
"type": "string",
"description": "Repository owner"
},
"ref": {
"type": "string",
"description": "The git reference for the workflow. The reference can be a branch or tag name. Required for 'run_workflow' method."
},
"repo": {
"type": "string",
"description": "Repository name"
},
"run_id": {
"type": "number",
"description": "The ID of the workflow run. Required for all methods except 'run_workflow'."
},
"workflow_id": {
"type": "string",
"description": "The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method."
}
}
},
"name": "actions_run_trigger"
}
10 changes: 5 additions & 5 deletions pkg/github/__toolsnaps__/get_job_logs.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"annotations": {
"readOnlyHint": true,
"title": "Get job logs"
"title": "Get GitHub Actions workflow job logs"
},
"description": "Download logs for a specific workflow job or efficiently get all failed job logs for a workflow run",
"description": "Get logs for GitHub Actions workflow jobs.\nUse this tool to retrieve logs for a specific job or all failed jobs in a workflow run.\nFor single job logs, provide job_id. For all failed jobs in a run, provide run_id with failed_only=true.\n",
"inputSchema": {
"type": "object",
"required": [
Expand All @@ -13,11 +13,11 @@
"properties": {
"failed_only": {
"type": "boolean",
"description": "When true, gets logs for all failed jobs in run_id"
"description": "When true, gets logs for all failed jobs in the workflow run specified by run_id. Requires run_id to be provided."
},
"job_id": {
"type": "number",
"description": "The unique identifier of the workflow job (required for single job logs)"
"description": "The unique identifier of the workflow job. Required when getting logs for a single job."
},
"owner": {
"type": "string",
Expand All @@ -33,7 +33,7 @@
},
"run_id": {
"type": "number",
"description": "Workflow run ID (required when using failed_only)"
"description": "The unique identifier of the workflow run. Required when failed_only is true to get logs for all failed jobs in the run."
},
"tail_lines": {
"type": "number",
Expand Down
Loading