Skip to content

Commit 511121f

Browse files
mattdhollowaySamMorrowDrums
authored andcommitted
add ff saupport and consolidated actions toolsets
1 parent 9bf5076 commit 511121f

File tree

5 files changed

+1053
-19
lines changed

5 files changed

+1053
-19
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,40 @@ The following sets of tools are available:
490490

491491
<summary><picture><source media="(prefers-color-scheme: dark)" srcset="pkg/octicons/icons/workflow-dark.png"><source media="(prefers-color-scheme: light)" srcset="pkg/octicons/icons/workflow-light.png"><img src="pkg/octicons/icons/workflow-light.png" width="20" height="20" alt="workflow"></picture> Actions</summary>
492492

493+
- **actions_get** - Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
494+
- `method`: The method to execute (string, required)
495+
- `owner`: Repository owner (string, required)
496+
- `repo`: Repository name (string, required)
497+
- `resource_id`: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
498+
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.
499+
- Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.
500+
- Provide an artifact ID for 'download_workflow_run_artifact' method.
501+
- Provide a job ID for 'get_workflow_job' method.
502+
(string, required)
503+
504+
- **actions_list** - List GitHub Actions workflows in a repository
505+
- `method`: The action to perform (string, required)
506+
- `owner`: Repository owner (string, required)
507+
- `page`: Page number for pagination (default: 1) (number, optional)
508+
- `per_page`: Results per page for pagination (default: 30, max: 100) (number, optional)
509+
- `repo`: Repository name (string, required)
510+
- `resource_id`: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
511+
- Do not provide any resource ID for 'list_workflows' method.
512+
- Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'list_workflow_runs' method.
513+
- Provide a workflow run ID for 'list_workflow_jobs' and 'list_workflow_run_artifacts' methods.
514+
(string, optional)
515+
- `workflow_jobs_filter`: Filters for workflow jobs. **ONLY** used when method is 'list_workflow_jobs' (object, optional)
516+
- `workflow_runs_filter`: Filters for workflow runs. **ONLY** used when method is 'list_workflow_runs' (object, optional)
517+
518+
- **actions_run_trigger** - Trigger GitHub Actions workflow actions
519+
- `inputs`: Inputs the workflow accepts. Only used for 'run_workflow' method. (object, optional)
520+
- `method`: The method to execute (string, required)
521+
- `owner`: Repository owner (string, required)
522+
- `ref`: The git reference for the workflow. The reference can be a branch or tag name. Required for 'run_workflow' method. (string, optional)
523+
- `repo`: Repository name (string, required)
524+
- `run_id`: The ID of the workflow run. Required for all methods except 'run_workflow'. (number, optional)
525+
- `workflow_id`: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method. (string, optional)
526+
493527
- **cancel_workflow_run** - Cancel workflow run
494528
- `owner`: Repository owner (string, required)
495529
- `repo`: Repository name (string, required)
@@ -514,6 +548,15 @@ The following sets of tools are available:
514548
- `run_id`: Workflow run ID (required when using failed_only) (number, optional)
515549
- `tail_lines`: Number of lines to return from the end of the log (number, optional)
516550

551+
- **get_job_logs** - Get GitHub Actions workflow job logs
552+
- `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)
553+
- `job_id`: The unique identifier of the workflow job. Required when getting logs for a single job. (number, optional)
554+
- `owner`: Repository owner (string, required)
555+
- `repo`: Repository name (string, required)
556+
- `return_content`: Returns actual log content instead of URLs (boolean, optional)
557+
- `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)
558+
- `tail_lines`: Number of lines to return from the end of the log (number, optional)
559+
517560
- **get_workflow_run** - Get workflow run
518561
- `owner`: Repository owner (string, required)
519562
- `repo`: Repository name (string, required)

cmd/github-mcp-server/main.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ var (
5454

5555
// Parse tools (similar to toolsets)
5656
var enabledTools []string
57-
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
58-
return fmt.Errorf("failed to unmarshal tools: %w", err)
57+
if viper.IsSet("tools") {
58+
if err := viper.UnmarshalKey("tools", &enabledTools); err != nil {
59+
return fmt.Errorf("failed to unmarshal tools: %w", err)
60+
}
5961
}
6062

6163
// Parse enabled features (similar to toolsets)
6264
var enabledFeatures []string
63-
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
64-
return fmt.Errorf("failed to unmarshal features: %w", err)
65+
if viper.IsSet("features") {
66+
if err := viper.UnmarshalKey("features", &enabledFeatures); err != nil {
67+
return fmt.Errorf("failed to unmarshal features: %w", err)
68+
}
6569
}
6670

6771
ttl := viper.GetDuration("repo-access-cache-ttl")

0 commit comments

Comments
 (0)