MCPcopy Create free account
hub / github.com/github/gh-aw / getGitHubAllowedTools

Function getGitHubAllowedTools

pkg/workflow/mcp_github_config.go:255–261  ·  view source on GitHub ↗

getGitHubAllowedTools extracts the allowed tools list from GitHub tool configuration Returns the list of allowed tools, or nil if no allowed list is specified (which means all tools are allowed)

(githubTool map[string]any)

Source from the content-addressed store, hash-verified

253// getGitHubAllowedTools extracts the allowed tools list from GitHub tool configuration
254// Returns the list of allowed tools, or nil if no allowed list is specified (which means all tools are allowed)
255func getGitHubAllowedTools(githubTool map[string]any) []string {
256 if allowedSetting, exists := githubTool["allowed"]; exists {
257 allowedTools, _ := parseGitHubAllowedToolsAndLimits(allowedSetting)
258 return allowedTools
259 }
260 return nil
261}
262
263// parseGitHubAllowedToolsAndLimits parses tools.github.allowed entries.
264// Supports string entries and object entries:

Callers 2

RenderGitHubMCPMethod · 0.85

Calls 1

Tested by 1