Skip to content

Commit 7d4a4a6

Browse files
Document public repo access quirk for read-only tools
1 parent c428f72 commit 7d4a4a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/scope-filtering.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ This means if your token has `repo`, tools requiring `security_events` will also
6060

6161
Each tool in the [README](../README.md#tools) lists its required and accepted OAuth scopes.
6262

63+
## Public Repository Access
64+
65+
Read-only tools that only require `repo` or `public_repo` scopes are **always visible**, even if your token doesn't have these scopes. This is because these tools work on public repositories without authentication.
66+
67+
For example, `get_file_contents` is always available—you can read files from any public repository regardless of your token's scopes. However, write operations like `create_or_update_file` will be hidden if your token lacks `repo` scope.
68+
69+
> **Note:** The GitHub API doesn't return `public_repo` in the `X-OAuth-Scopes` header—it's implicit. The server handles this by not filtering read-only repository tools.
70+
6371
## Graceful Degradation
6472

6573
If the server cannot fetch your token's scopes (e.g., network issues, rate limiting), it logs a warning and continues **without filtering**. This ensures the server remains usable even when scope detection fails.

0 commit comments

Comments
 (0)