Skip to content
Merged
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
18 changes: 17 additions & 1 deletion .github/aw/github-mcp-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Source**: [github/github-mcp-server](https://github.com/github/github-mcp-server/tree/main/pkg/github)
**Mapping File**: [pkg/workflow/data/github_toolsets_permissions.json](https://github.com/github/gh-aw/blob/main/pkg/workflow/data/github_toolsets_permissions.json)
**Last Updated**: 2026-08-02
**Last Updated**: 2026-08-16

## Overview

Expand Down Expand Up @@ -69,6 +69,7 @@ When the GitHub tool is configured, gh-aw injects a separate `<github-context>`
| `code_quality` | Code quality finding lookups |
| `code_security` | Code scanning alert management |
| `copilot` | Copilot assignment, PR creation, and review requests |
| `copilot_issue_intents` | Intent-aware Copilot issue assignment |
| `copilot_spaces` | GitHub Copilot Spaces (remote mode only) |
| `dependabot` | Dependency vulnerability management |
| `discussions` | Community discussion workflows |
Expand Down Expand Up @@ -117,6 +118,15 @@ When the GitHub tool is configured, gh-aw injects a separate `<github-context>`

---

### copilot_issue_intents
**Description**: Opt-in Copilot issue assignment tools with intent metadata

| Tool | Purpose | Key Parameters |
|------|---------|----------------|
| `assign_copilot_to_issue_with_intent` | Assign Copilot to an issue with intent metadata | `owner`, `repo`, `issue_number`, `rationale`, `confidence`, `is_suggestion` |

---

### copilot_spaces
**Description**: GitHub Copilot Spaces (remote-only)

Expand All @@ -140,6 +150,7 @@ When the GitHub tool is configured, gh-aw injects a separate `<github-context>`
| `delete_file` | Delete a file from a repository | `owner`, `repo`, `path`, `message`, `sha`, `branch` |
| `fork_repository` | Fork a repository | `owner`, `repo`, `organization` |
| `get_commit` | Get details of a specific commit | `owner`, `repo`, `sha` |
| `get_file_blame` | Get line-by-line blame information for a file | `owner`, `repo`, `path`, `ref` |
| `get_file_contents` | Read file or directory contents | `owner`, `repo`, `path`, `ref` |
| `get_latest_release` | Get the latest release for a repository | `owner`, `repo` |
| `get_release_by_tag` | Get a release by its tag name | `owner`, `repo`, `tag` |
Expand Down Expand Up @@ -184,13 +195,18 @@ When the GitHub tool is configured, gh-aw injects a separate `<github-context>`
### issues
**Description**: Issue management

> **Note**: `find_duplicate`, `issue_dependency_read`, and `issue_dependency_write` require their upstream feature flags to be enabled, independently of toolset selection.

| Tool | Purpose | Key Parameters |
|------|---------|----------------|
| `add_issue_comment` | Add a comment to an issue | `owner`, `repo`, `issue_number`, `body` |
| `find_duplicate` | Find likely duplicate issues for an existing issue | `owner`, `repo`, `issue_number`, `confidence_threshold` |
| `get_label` | Get details of a specific label | `owner`, `repo`, `name` |
| `issue_dependency_read` | Read an issue's dependency relationships | `owner`, `repo`, `issue_number` |
| `issue_dependency_write` | Add or remove issue dependencies | `owner`, `repo`, `issue_number` |
| `issue_read` | Read issue details and comments | `owner`, `repo`, `issue_number` |
| `issue_write` | Create or update an issue | `owner`, `repo`, `title`, `body`, `labels`, `assignees` |
| `list_issue_fields` | List available issue fields for a repository | `owner`, `repo` |
| `list_issue_types` | List available issue types for a repository | `owner`, `repo` |
| `list_issues` | List issues in a repository | `owner`, `repo`, `state`, `labels`, `page` |
| `search_issues` | Search issues across GitHub | `query`, `page`, `per_page` |
Expand Down
2 changes: 2 additions & 0 deletions pkg/workflow/data/github_tool_to_toolset.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

"issue_dependency_read": "issues",
"issue_dependency_write": "issues",
"find_duplicate": "issues",
"issue_read": "issues",
"list_issues": "issues",
"create_issue": "issues",
Expand Down Expand Up @@ -56,6 +57,7 @@
"assign_copilot_to_issue": "copilot",
"create_pull_request_with_copilot": "copilot",
"request_copilot_review": "copilot",
"assign_copilot_to_issue_with_intent": "copilot_issue_intents",

"list_dependabot_alerts": "dependabot",
"get_dependabot_alert": "dependabot",
Expand Down
11 changes: 9 additions & 2 deletions pkg/workflow/data/github_toolsets_permissions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "2.4",
"description": "GitHub MCP server toolsets and their required permissions (synced to github/github-mcp-server main: restored semantic search, advisory, and secret scanning tools; search tools remain redistributed to repos/orgs/users/issues; experiments toolset removed; list_org_repository_security_advisories moved orgs->security_advisories; get_label dual-registered in issues; create_pull_request_with_copilot added)",
"version": "2.5",
"description": "GitHub MCP server toolsets and their required permissions (synced to github/github-mcp-server main: restored semantic search, advisory, and secret scanning tools; search tools remain redistributed to repos/orgs/users/issues; experiments toolset removed; list_org_repository_security_advisories moved orgs->security_advisories; get_label dual-registered in issues; create_pull_request_with_copilot added; find_duplicate added to issues; copilot_issue_intents added)",
"toolsets": {
"actions": {
"description": "GitHub Actions workflows",
Expand Down Expand Up @@ -32,6 +32,12 @@
"write_permissions": ["issues", "pull-requests"],
"tools": ["assign_copilot_to_issue", "create_pull_request_with_copilot", "request_copilot_review"]
},
"copilot_issue_intents": {
"description": "Opt-in Copilot issue assignment tools with intent metadata",
"read_permissions": [],
"write_permissions": ["issues"],
"tools": ["assign_copilot_to_issue_with_intent"]
},
"copilot_spaces": {
"description": "GitHub Copilot Spaces (remote-only)",
"read_permissions": [],
Expand Down Expand Up @@ -74,6 +80,7 @@
"write_permissions": ["issues"],
"tools": [
"add_issue_comment",
"find_duplicate",
"get_label",
"issue_dependency_read",
"issue_dependency_write",
Expand Down
22 changes: 21 additions & 1 deletion pkg/workflow/github_tool_to_toolset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ func TestValidateGitHubToolsAgainstToolsets(t *testing.T) {
enabledToolsets: []string{"actions"},
expectError: false,
},
{
name: "assign_copilot_to_issue_with_intent belongs to copilot_issue_intents toolset",
allowedTools: []string{"assign_copilot_to_issue_with_intent"},
enabledToolsets: []string{"copilot_issue_intents"},
expectError: false,
},
{
name: "Actions toolset missing",
allowedTools: []string{"actions_list", "actions_get"},
Expand Down Expand Up @@ -291,7 +297,7 @@ func TestGitHubToolToToolsetMap_Completeness(t *testing.T) {
// Verify that the map contains entries for all expected tool categories
expectedToolsets := []string{
"context", "repos", "issues", "pull_requests", "actions",
"code_quality", "code_security", "copilot", "discussions", "gists", "labels",
"code_quality", "code_security", "copilot", "copilot_issue_intents", "discussions", "gists", "labels",
"notifications", "orgs", "users", "secret_protection", "security_advisories",
}

Expand Down Expand Up @@ -364,6 +370,20 @@ func TestGitHubToolToToolsetMap_ConsistencyWithDocumentation(t *testing.T) {
}
}

func TestGitHubToolToToolsetMap_NewGitHubMCPTools(t *testing.T) {
expectedMappings := map[string]string{
"assign_copilot_to_issue_with_intent": "copilot_issue_intents",
"find_duplicate": "issues",
}

toolToToolsetMap := loadGitHubToolToToolsetMap(t)
for tool, expectedToolset := range expectedMappings {
if actualToolset := toolToToolsetMap[tool]; actualToolset != expectedToolset {
t.Errorf("Tool %q: expected toolset %q, got %q", tool, expectedToolset, actualToolset)
}
}
}

func loadGitHubToolToToolsetMap(t *testing.T) map[string]string {
t.Helper()

Expand Down
6 changes: 5 additions & 1 deletion pkg/workflow/permissions_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ func TestToolsetPermissionsMapping_RestoredGitHubMCPTools(t *testing.T) {
}{
{
toolset: "issues",
tools: []string{"semantic_issue_similarity_search", "semantic_issues_search"},
tools: []string{"find_duplicate", "semantic_issue_similarity_search", "semantic_issues_search"},
},
{
toolset: "copilot_issue_intents",
tools: []string{"assign_copilot_to_issue_with_intent"},
},
{
toolset: "secret_protection",
Expand Down
Loading