getGitHubToolsets extracts the toolsets configuration from GitHub tool Expands "default" to individual toolsets for action-friendly compatibility
(githubTool map[string]any)
| 192 | // getGitHubToolsets extracts the toolsets configuration from GitHub tool |
| 193 | // Expands "default" to individual toolsets for action-friendly compatibility |
| 194 | func getGitHubToolsets(githubTool map[string]any) string { |
| 195 | if toolsetsSetting, exists := githubTool["toolsets"]; exists { |
| 196 | // Handle array format only |
| 197 | if toolsets := parseStringSliceAny(toolsetsSetting, githubConfigLog); toolsets != nil { |
| 198 | toolsetsStr := strings.Join(toolsets, ",") |
| 199 | // Expand "default" to individual toolsets for action-friendly compatibility |
| 200 | resolved := expandDefaultToolset(toolsetsStr) |
| 201 | githubConfigLog.Printf("GitHub MCP toolsets resolved: %s", resolved) |
| 202 | return resolved |
| 203 | } |
| 204 | } |
| 205 | // default to action-friendly toolsets (excludes "users" which GitHub Actions tokens don't support) |
| 206 | githubConfigLog.Print("GitHub MCP toolsets: using default action-friendly toolsets") |
| 207 | return strings.Join(ActionFriendlyGitHubToolsets, ",") |
| 208 | } |
| 209 | |
| 210 | // expandDefaultToolset expands "default" and "action-friendly" keywords to individual toolsets. |
| 211 | // This ensures that "default" and "action-friendly" in the source expand to action-friendly toolsets |