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

Function appendSafeOutputsTools

pkg/workflow/claude_tools.go:393–405  ·  view source on GitHub ↗
(allowedTools []string, safeOutputs *SafeOutputsConfig)

Source from the content-addressed store, hash-verified

391}
392
393func appendSafeOutputsTools(allowedTools []string, safeOutputs *SafeOutputsConfig) []string {
394 if safeOutputs == nil {
395 return allowedTools
396 }
397 allowedTools = append(allowedTools, "mcp__"+string(constants.SafeOutputsMCPServerID))
398 if !slices.Contains(allowedTools, "Write") {
399 // Ideally we would grant Write only for the exact safe outputs file, but Claude
400 // doesn't currently honor that scoped grant reliably.
401 // See: https://github.com/github/gh-aw/issues/244#issuecomment-3240319103
402 allowedTools = append(allowedTools, "Write")
403 }
404 return allowedTools
405}
406
407func appendMCPScriptsTools(allowedTools []string, mcpScripts *MCPScriptsConfig) []string {
408 if HasMCPScripts(mcpScripts) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected