@@ -12,6 +12,7 @@ import (
1212 "github.com/github/github-mcp-server/pkg/github"
1313 "github.com/github/github-mcp-server/pkg/lockdown"
1414 "github.com/github/github-mcp-server/pkg/raw"
15+ "github.com/github/github-mcp-server/pkg/scopes"
1516 "github.com/github/github-mcp-server/pkg/toolsets"
1617 "github.com/github/github-mcp-server/pkg/translations"
1718 gogithub "github.com/google/go-github/v79/github"
@@ -224,7 +225,22 @@ func generateToolDoc(tool mcp.Tool) string {
224225 var lines []string
225226
226227 // Tool name only (using annotation name instead of verbose description)
227- lines = append (lines , fmt .Sprintf ("- **%s** - %s" , tool .Name , tool .Annotations .Title ))
228+ toolLine := fmt .Sprintf ("- **%s** - %s" , tool .Name , tool .Annotations .Title )
229+
230+ // Add required scopes if present (skip NoScope which is empty string)
231+ if tool .Meta != nil {
232+ toolScopes := scopes .GetScopesFromMeta (tool .Meta )
233+ var scopeStrs []string
234+ for _ , s := range toolScopes {
235+ if s != scopes .NoScope {
236+ scopeStrs = append (scopeStrs , fmt .Sprintf ("`%s`" , s .String ()))
237+ }
238+ }
239+ if len (scopeStrs ) > 0 {
240+ toolLine += fmt .Sprintf (" (scopes: %s)" , strings .Join (scopeStrs , ", " ))
241+ }
242+ }
243+ lines = append (lines , toolLine )
228244
229245 // Parameters
230246 if tool .InputSchema == nil {
0 commit comments