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

Function githubBuiltinMode

pkg/parser/mcp.go:320–338  ·  view source on GitHub ↗
(toolValue any)

Source from the content-addressed store, hash-verified

318}
319
320func githubBuiltinMode(toolValue any) (bool, string, map[string]any) {
321 toolConfig, ok := toolValue.(map[string]any)
322 if !ok {
323 return false, "", nil
324 }
325 useRemote := false
326 customToken := ""
327 if modeField, hasMode := toolConfig["mode"]; hasMode {
328 if modeStr, ok := modeField.(string); ok && modeStr == "remote" {
329 useRemote = true
330 }
331 }
332 if token, hasToken := toolConfig["github-token"]; hasToken {
333 if tokenStr, ok := token.(string); ok {
334 customToken = tokenStr
335 }
336 }
337 return useRemote, customToken, toolConfig
338}
339
340func buildPlaywrightBuiltinConfig(toolValue any) RegistryMCPServerConfig {
341 config := RegistryMCPServerConfig{

Callers 1

buildGitHubBuiltinConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected