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

Function processBuiltinMCPTool

pkg/parser/mcp.go:259–274  ·  view source on GitHub ↗

processBuiltinMCPTool handles built-in MCP tools (github and playwright)

(toolName string, toolValue any, serverFilter string)

Source from the content-addressed store, hash-verified

257
258// processBuiltinMCPTool handles built-in MCP tools (github and playwright)
259func processBuiltinMCPTool(toolName string, toolValue any, serverFilter string) (*RegistryMCPServerConfig, error) {
260 if serverFilter != "" && !strings.Contains(strings.ToLower(toolName), strings.ToLower(serverFilter)) {
261 return nil, nil
262 }
263
264 if toolName == "github" {
265 config := buildGitHubBuiltinConfig(toolValue)
266 return &config, nil
267 }
268 if toolName == "playwright" {
269 config := buildPlaywrightBuiltinConfig(toolValue)
270 return &config, nil
271 }
272
273 return nil, nil
274}
275
276func buildGitHubBuiltinConfig(toolValue any) RegistryMCPServerConfig {
277 useRemote, customToken, toolConfig := githubBuiltinMode(toolValue)

Callers 1

extractBuiltinMCPToolsFunction · 0.85

Calls 3

buildGitHubBuiltinConfigFunction · 0.85
ToLowerMethod · 0.80

Tested by

no test coverage detected