Skip to content

Commit fc51918

Browse files
docs: expand FGP per-tool annotations and consolidate docs
Expand RequiredPermissions annotations across the remaining clearly-mappable tools (discussions, git, issues, labels, pull requests, repositories/stargazers, and the granular issue/PR write tools) so the generated fine-grained-permission table in docs/permissions-filtering.md is comprehensive. Stop rendering the per-tool "Required Permissions (fine-grained)" line in the large generated tool listings (README, feature-flags.md, insiders-features.md): it cluttered those listings. The consolidated requirement table now lives solely in docs/permissions-filtering.md, and the README Tools section links to it. Permission catalog and tool behaviour are unchanged; only annotations and generated docs are affected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4ec3576 commit fc51918

13 files changed

Lines changed: 81 additions & 79 deletions

README.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,16 @@ The following sets of tools are available:
588588

589589
## Tools
590590

591+
> [!NOTE]
592+
> The fine-grained permission (and OAuth scope) each tool requires is documented separately to keep this listing readable. See [Fine-Grained Permission Filtering](./docs/permissions-filtering.md) for the full per-tool requirement table (useful when authenticating with a fine-grained PAT or GitHub App), and [PAT Scope Filtering](./docs/scope-filtering.md) for classic-PAT OAuth scopes.
593+
591594
<!-- START AUTOMATED TOOLS -->
592595
<details>
593596

594597
<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>
595598

596599
- **actions_get** - Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
597600
- **Required OAuth Scopes**: `repo`
598-
- **Required Permissions (fine-grained)**: `actions:read`
599601
- `method`: The method to execute (string, required)
600602
- `owner`: Repository owner (string, required)
601603
- `repo`: Repository name (string, required)
@@ -608,7 +610,6 @@ The following sets of tools are available:
608610

609611
- **actions_list** - List GitHub Actions workflows in a repository
610612
- **Required OAuth Scopes**: `repo`
611-
- **Required Permissions (fine-grained)**: `actions:read`
612613
- `method`: The action to perform (string, required)
613614
- `owner`: Repository owner (string, required)
614615
- `page`: Page number for pagination (default: 1) (number, optional)
@@ -624,7 +625,6 @@ The following sets of tools are available:
624625

625626
- **actions_run_trigger** - Trigger GitHub Actions workflow actions
626627
- **Required OAuth Scopes**: `repo`
627-
- **Required Permissions (fine-grained)**: `actions:write`
628628
- `inputs`: Inputs the workflow accepts. Only used for 'run_workflow' method. (object, optional)
629629
- `method`: The method to execute (string, required)
630630
- `owner`: Repository owner (string, required)
@@ -635,7 +635,6 @@ The following sets of tools are available:
635635

636636
- **get_job_logs** - Get GitHub Actions workflow job logs
637637
- **Required OAuth Scopes**: `repo`
638-
- **Required Permissions (fine-grained)**: `actions:read`
639638
- `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)
640639
- `job_id`: The unique identifier of the workflow job. Required when getting logs for a single job. (number, optional)
641640
- `owner`: Repository owner (string, required)
@@ -653,15 +652,13 @@ The following sets of tools are available:
653652
- **get_code_scanning_alert** - Get code scanning alert
654653
- **Required OAuth Scopes**: `security_events`
655654
- **Accepted OAuth Scopes**: `repo`, `security_events`
656-
- **Required Permissions (fine-grained)**: `security_events:read`
657655
- `alertNumber`: The number of the alert. (number, required)
658656
- `owner`: The owner of the repository. (string, required)
659657
- `repo`: The name of the repository. (string, required)
660658

661659
- **list_code_scanning_alerts** - List code scanning alerts
662660
- **Required OAuth Scopes**: `security_events`
663661
- **Accepted OAuth Scopes**: `repo`, `security_events`
664-
- **Required Permissions (fine-grained)**: `security_events:read`
665662
- `owner`: The owner of the repository. (string, required)
666663
- `page`: Page number for pagination (min 1) (number, optional)
667664
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
@@ -720,15 +717,13 @@ The following sets of tools are available:
720717
- **get_dependabot_alert** - Get dependabot alert
721718
- **Required OAuth Scopes**: `security_events`
722719
- **Accepted OAuth Scopes**: `repo`, `security_events`
723-
- **Required Permissions (fine-grained)**: `vulnerability_alerts:read`
724720
- `alertNumber`: The number of the alert. (number, required)
725721
- `owner`: The owner of the repository. (string, required)
726722
- `repo`: The name of the repository. (string, required)
727723

728724
- **list_dependabot_alerts** - List dependabot alerts
729725
- **Required OAuth Scopes**: `security_events`
730726
- **Accepted OAuth Scopes**: `repo`, `security_events`
731-
- **Required Permissions (fine-grained)**: `vulnerability_alerts:read`
732727
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
733728
- `owner`: The owner of the repository. (string, required)
734729
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
@@ -853,7 +848,6 @@ The following sets of tools are available:
853848

854849
- **issue_read** - Get issue details
855850
- **Required OAuth Scopes**: `repo`
856-
- **Required Permissions (fine-grained)**: `issues:read`
857851
- `issue_number`: The number of the issue (number, required)
858852
- `method`: The read operation to perform on a single issue.
859853
Options are:
@@ -869,7 +863,6 @@ The following sets of tools are available:
869863

870864
- **issue_write** - Create or update issue/pull request
871865
- **Required OAuth Scopes**: `repo`
872-
- **Required Permissions (fine-grained)**: `issues:write`
873866
- `assignees`: Usernames to assign to this issue (string[], optional)
874867
- `body`: Issue body content (string, optional)
875868
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
@@ -895,7 +888,6 @@ The following sets of tools are available:
895888

896889
- **list_issues** - List issues
897890
- **Required OAuth Scopes**: `repo`
898-
- **Required Permissions (fine-grained)**: `issues:read`
899891
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
900892
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
901893
- `labels`: Filter by labels (string[], optional)
@@ -1098,7 +1090,6 @@ The following sets of tools are available:
10981090

10991091
- **create_pull_request** - Open new pull request
11001092
- **Required OAuth Scopes**: `repo`
1101-
- **Required Permissions (fine-grained)**: `pull_requests:write`
11021093
- `base`: Branch to merge into (string, required)
11031094
- `body`: PR description (string, optional)
11041095
- `draft`: Create as draft PR (boolean, optional)
@@ -1110,7 +1101,6 @@ The following sets of tools are available:
11101101

11111102
- **list_pull_requests** - List pull requests
11121103
- **Required OAuth Scopes**: `repo`
1113-
- **Required Permissions (fine-grained)**: `pull_requests:read`
11141104
- `base`: Filter by base branch (string, optional)
11151105
- `direction`: Sort direction (string, optional)
11161106
- `head`: Filter by head user/org and branch (string, optional)
@@ -1132,7 +1122,6 @@ The following sets of tools are available:
11321122

11331123
- **pull_request_read** - Get details for a single pull request
11341124
- **Required OAuth Scopes**: `repo`
1135-
- **Required Permissions (fine-grained)**: `pull_requests:read`
11361125
- `after`: Cursor for pagination, used only by the get_review_comments method. Pass the endCursor from the previous page's PageInfo to fetch the next page. (string, optional)
11371126
- `method`: Action to specify what pull request data needs to be retrieved from GitHub.
11381127
Possible options:
@@ -1201,15 +1190,13 @@ The following sets of tools are available:
12011190

12021191
- **create_branch** - Create branch
12031192
- **Required OAuth Scopes**: `repo`
1204-
- **Required Permissions (fine-grained)**: `contents:write`
12051193
- `branch`: Name for new branch (string, required)
12061194
- `from_branch`: Source branch (defaults to repo default) (string, optional)
12071195
- `owner`: Repository owner (string, required)
12081196
- `repo`: Repository name (string, required)
12091197

12101198
- **create_or_update_file** - Create or update file
12111199
- **Required OAuth Scopes**: `repo`
1212-
- **Required Permissions (fine-grained)**: `contents:write`
12131200
- `branch`: Branch to create/update the file in (string, required)
12141201
- `content`: Content of the file (string, required)
12151202
- `message`: Commit message (string, required)
@@ -1251,7 +1238,6 @@ The following sets of tools are available:
12511238

12521239
- **get_file_contents** - Get file or directory contents
12531240
- **Required OAuth Scopes**: `repo`
1254-
- **Required Permissions (fine-grained)**: `contents:read`
12551241
- `owner`: Repository owner (username or organization) (string, required)
12561242
- `path`: Path to file/directory (string, optional)
12571243
- `ref`: Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` (string, optional)
@@ -1277,15 +1263,13 @@ The following sets of tools are available:
12771263

12781264
- **list_branches** - List branches
12791265
- **Required OAuth Scopes**: `repo`
1280-
- **Required Permissions (fine-grained)**: `contents:read`
12811266
- `owner`: Repository owner (string, required)
12821267
- `page`: Page number for pagination (min 1) (number, optional)
12831268
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
12841269
- `repo`: Repository name (string, required)
12851270

12861271
- **list_commits** - List commits
12871272
- **Required OAuth Scopes**: `repo`
1288-
- **Required Permissions (fine-grained)**: `contents:read`
12891273
- `author`: Author username or email address to filter commits by (string, optional)
12901274
- `owner`: Repository owner (string, required)
12911275
- `page`: Page number for pagination (min 1) (number, optional)
@@ -1313,15 +1297,13 @@ The following sets of tools are available:
13131297

13141298
- **list_tags** - List tags
13151299
- **Required OAuth Scopes**: `repo`
1316-
- **Required Permissions (fine-grained)**: `contents:read`
13171300
- `owner`: Repository owner (string, required)
13181301
- `page`: Page number for pagination (min 1) (number, optional)
13191302
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
13201303
- `repo`: Repository name (string, required)
13211304

13221305
- **push_files** - Push files to repository
13231306
- **Required OAuth Scopes**: `repo`
1324-
- **Required Permissions (fine-grained)**: `contents:write`
13251307
- `branch`: Branch to push to (string, required)
13261308
- `files`: Array of file objects to push, each object with path (string) and content (string) (object[], required)
13271309
- `message`: Commit message (string, required)
@@ -1362,15 +1344,13 @@ The following sets of tools are available:
13621344
- **get_secret_scanning_alert** - Get secret scanning alert
13631345
- **Required OAuth Scopes**: `security_events`
13641346
- **Accepted OAuth Scopes**: `repo`, `security_events`
1365-
- **Required Permissions (fine-grained)**: `secret_scanning_alerts:read`
13661347
- `alertNumber`: The number of the alert. (number, required)
13671348
- `owner`: The owner of the repository. (string, required)
13681349
- `repo`: The name of the repository. (string, required)
13691350

13701351
- **list_secret_scanning_alerts** - List secret scanning alerts
13711352
- **Required OAuth Scopes**: `security_events`
13721353
- **Accepted OAuth Scopes**: `repo`, `security_events`
1373-
- **Required Permissions (fine-grained)**: `secret_scanning_alerts:read`
13741354
- `owner`: The owner of the repository. (string, required)
13751355
- `page`: Page number for pagination (min 1) (number, optional)
13761356
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)

cmd/github-mcp-server/generate_docs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ func writeToolDoc(buf *strings.Builder, tool inventory.ServerTool) {
230230
}
231231
}
232232

233-
// Fine-grained permission requirement if present
234-
if !tool.RequiredPermissions.IsZero() {
235-
fmt.Fprintf(buf, " - **Required Permissions (fine-grained)**: `%s`\n", tool.RequiredPermissions.String())
236-
}
233+
// Fine-grained permission requirements are intentionally NOT rendered per
234+
// tool here: they would clutter the large tool listings. The consolidated
235+
// requirement table lives in docs/permissions-filtering.md (generated by
236+
// generatePermissionsTable), which the README links to.
237237

238238
// MCP App UI metadata (only rendered when the remote_mcp_ui_apps flag
239239
// applied to the inventory; for the no-flags README this section is

docs/feature-flags.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ runtime behavior (such as output formatting) won't appear here.
3636

3737
- **create_pull_request** - Open new pull request
3838
- **Required OAuth Scopes**: `repo`
39-
- **Required Permissions (fine-grained)**: `pull_requests:write`
4039
- **MCP App UI**: `ui://github-mcp-server/pr-write`
4140
- `base`: Branch to merge into (string, required)
4241
- `body`: PR description (string, optional)
@@ -53,7 +52,6 @@ runtime behavior (such as output formatting) won't appear here.
5352

5453
- **issue_write** - Create or update issue/pull request
5554
- **Required OAuth Scopes**: `repo`
56-
- **Required Permissions (fine-grained)**: `issues:write`
5755
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5856
- `assignees`: Usernames to assign to this issue (string[], optional)
5957
- `body`: Issue body content (string, optional)
@@ -77,7 +75,6 @@ runtime behavior (such as output formatting) won't appear here.
7775

7876
- **issue_write** - Create or update issue/pull request
7977
- **Required OAuth Scopes**: `repo`
80-
- **Required Permissions (fine-grained)**: `issues:write`
8178
- `assignees`: Usernames to assign to this issue (string[], optional)
8279
- `body`: Issue body content (string, optional)
8380
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
@@ -105,7 +102,6 @@ runtime behavior (such as output formatting) won't appear here.
105102

106103
- **list_issues** - List issues
107104
- **Required OAuth Scopes**: `repo`
108-
- **Required Permissions (fine-grained)**: `issues:read`
109105
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
110106
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
111107
- `field_filters`: Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date). (object[], optional)
@@ -129,7 +125,6 @@ runtime behavior (such as output formatting) won't appear here.
129125

130126
- **create_issue** - Create Issue
131127
- **Required OAuth Scopes**: `repo`
132-
- **Required Permissions (fine-grained)**: `issues:write`
133128
- `body`: Issue body content (optional) (string, optional)
134129
- `owner`: Repository owner (username or organization) (string, required)
135130
- `repo`: Repository name (string, required)

docs/insiders-features.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
3030

3131
- **create_pull_request** - Open new pull request
3232
- **Required OAuth Scopes**: `repo`
33-
- **Required Permissions (fine-grained)**: `pull_requests:write`
3433
- **MCP App UI**: `ui://github-mcp-server/pr-write`
3534
- `base`: Branch to merge into (string, required)
3635
- `body`: PR description (string, optional)
@@ -47,7 +46,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
4746

4847
- **issue_write** - Create or update issue/pull request
4948
- **Required OAuth Scopes**: `repo`
50-
- **Required Permissions (fine-grained)**: `issues:write`
5149
- **MCP App UI**: `ui://github-mcp-server/issue-write`
5250
- `assignees`: Usernames to assign to this issue (string[], optional)
5351
- `body`: Issue body content (string, optional)
@@ -71,7 +69,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
7169

7270
- **issue_write** - Create or update issue/pull request
7371
- **Required OAuth Scopes**: `repo`
74-
- **Required Permissions (fine-grained)**: `issues:write`
7572
- `assignees`: Usernames to assign to this issue (string[], optional)
7673
- `body`: Issue body content (string, optional)
7774
- `duplicate_of`: Issue number that this issue is a duplicate of. Only used when state_reason is 'duplicate'. (number, optional)
@@ -99,7 +96,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
9996

10097
- **list_issues** - List issues
10198
- **Required OAuth Scopes**: `repo`
102-
- **Required Permissions (fine-grained)**: `issues:read`
10399
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
104100
- `direction`: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
105101
- `field_filters`: Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date). (object[], optional)

docs/permissions-filtering.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,48 @@ The generated table below is produced by `script/generate-docs` and lists every
5959
| `code_security` | `list_code_scanning_alerts` | `security_events:read` |
6060
| `dependabot` | `get_dependabot_alert` | `vulnerability_alerts:read` |
6161
| `dependabot` | `list_dependabot_alerts` | `vulnerability_alerts:read` |
62+
| `discussions` | `discussion_comment_write` | `discussions:write` |
63+
| `discussions` | `get_discussion_comments` | `discussions:read` |
64+
| `discussions` | `get_discussion` | `discussions:read` |
65+
| `discussions` | `list_discussion_categories` | `discussions:read` |
66+
| `discussions` | `list_discussions` | `discussions:read` |
67+
| `git` | `get_repository_tree` | `contents:read` |
68+
| `issues` | `add_issue_comment` | `issues:write` |
69+
| `issues` | `get_label` | `issues:read` |
6270
| `issues` | `issue_read` | `issues:read` |
6371
| `issues` | `issue_write` | `issues:write` |
6472
| `issues` | `list_issues` | `issues:read` |
73+
| `issues` | `sub_issue_write` | `issues:write` |
74+
| `labels` | `get_label` | `issues:read` |
75+
| `labels` | `label_write` | `issues:write` |
76+
| `labels` | `list_label` | `issues:read` |
77+
| `pull_requests` | `add_comment_to_pending_review` | `pull_requests:write` |
78+
| `pull_requests` | `add_reply_to_pull_request_comment` | `pull_requests:write` |
6579
| `pull_requests` | `create_pull_request` | `pull_requests:write` |
6680
| `pull_requests` | `list_pull_requests` | `pull_requests:read` |
81+
| `pull_requests` | `merge_pull_request` | `contents:write AND pull_requests:write` |
6782
| `pull_requests` | `pull_request_read` | `pull_requests:read` |
83+
| `pull_requests` | `pull_request_review_write` | `pull_requests:write` |
84+
| `pull_requests` | `update_pull_request_branch` | `contents:write AND pull_requests:write` |
85+
| `pull_requests` | `update_pull_request` | `pull_requests:write` |
6886
| `repos` | `create_branch` | `contents:write` |
6987
| `repos` | `create_or_update_file` | `contents:write` |
88+
| `repos` | `delete_file` | `contents:write` |
89+
| `repos` | `get_commit` | `contents:read` |
7090
| `repos` | `get_file_contents` | `contents:read` |
91+
| `repos` | `get_latest_release` | `contents:read` |
92+
| `repos` | `get_release_by_tag` | `contents:read` |
93+
| `repos` | `get_tag` | `contents:read` |
7194
| `repos` | `list_branches` | `contents:read` |
7295
| `repos` | `list_commits` | `contents:read` |
96+
| `repos` | `list_releases` | `contents:read` |
7397
| `repos` | `list_tags` | `contents:read` |
7498
| `repos` | `push_files` | `contents:write` |
7599
| `secret_protection` | `get_secret_scanning_alert` | `secret_scanning_alerts:read` |
76100
| `secret_protection` | `list_secret_scanning_alerts` | `secret_scanning_alerts:read` |
101+
| `stargazers` | `list_starred_repositories` | `starring:read` |
102+
| `stargazers` | `star_repository` | `starring:write` |
103+
| `stargazers` | `unstar_repository` | `starring:write` |
77104
<!-- END AUTOMATED PERMISSIONS -->
78105

79106
## Related Documentation

0 commit comments

Comments
 (0)