@@ -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,20 @@ 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
231+ if tool .Meta != nil {
232+ toolScopes := scopes .GetScopesFromMeta (tool .Meta )
233+ if len (toolScopes ) > 0 {
234+ scopeStrs := make ([]string , len (toolScopes ))
235+ for i , s := range toolScopes {
236+ scopeStrs [i ] = fmt .Sprintf ("`%s`" , s .String ())
237+ }
238+ toolLine += fmt .Sprintf (" (scopes: %s)" , strings .Join (scopeStrs , ", " ))
239+ }
240+ }
241+ lines = append (lines , toolLine )
228242
229243 // Parameters
230244 if tool .InputSchema == nil {
0 commit comments