(allowedTools []string, tools map[string]any, cacheMemoryConfig *CacheMemoryConfig)
| 238 | } |
| 239 | |
| 240 | func appendTopLevelClaudeTools(allowedTools []string, tools map[string]any, cacheMemoryConfig *CacheMemoryConfig) []string { |
| 241 | for toolName, toolValue := range tools { |
| 242 | if toolName == "claude" { |
| 243 | continue |
| 244 | } |
| 245 | switch toolName { |
| 246 | case "cache-memory": |
| 247 | allowedTools = appendCacheMemoryTools(allowedTools, cacheMemoryConfig) |
| 248 | case "agentic-workflows": |
| 249 | allowedTools = append(allowedTools, "mcp__"+string(constants.AgenticWorkflowsMCPServerID)) |
| 250 | default: |
| 251 | allowedTools = appendMCPToolPermissions(allowedTools, toolName, toolValue) |
| 252 | } |
| 253 | } |
| 254 | return allowedTools |
| 255 | } |
| 256 | |
| 257 | func appendCacheMemoryTools(allowedTools []string, cacheMemoryConfig *CacheMemoryConfig) []string { |
| 258 | if cacheMemoryConfig == nil { |
no test coverage detected