(toolValue any)
| 338 | } |
| 339 | |
| 340 | func buildPlaywrightBuiltinConfig(toolValue any) RegistryMCPServerConfig { |
| 341 | config := RegistryMCPServerConfig{ |
| 342 | BaseMCPServerConfig: types.BaseMCPServerConfig{ |
| 343 | Type: "docker", |
| 344 | Command: "docker", |
| 345 | Args: []string{ |
| 346 | "run", "-i", "--rm", "--shm-size=2gb", "--cap-add=SYS_ADMIN", |
| 347 | "-v", constants.TmpMcpLogsMount, |
| 348 | "mcr.microsoft.com/playwright:" + string(constants.DefaultPlaywrightBrowserVersion), |
| 349 | }, |
| 350 | Env: make(map[string]string), |
| 351 | }, |
| 352 | Name: "playwright", |
| 353 | } |
| 354 | toolConfig, ok := toolValue.(map[string]any) |
| 355 | if !ok { |
| 356 | return config |
| 357 | } |
| 358 | if version, exists := toolConfig["version"]; exists { |
| 359 | if versionStr := stringutil.ParseVersionValue(version); versionStr != "" { |
| 360 | replaceBuiltinImage(&config, "mcr.microsoft.com/playwright:", "mcr.microsoft.com/playwright:"+versionStr) |
| 361 | } |
| 362 | } |
| 363 | appendBuiltinArgs(&config, toolConfig["args"]) |
| 364 | return config |
| 365 | } |
| 366 | |
| 367 | func appendBuiltinAllowedTools(config *RegistryMCPServerConfig, toolConfig map[string]any) { |
| 368 | if toolConfig == nil { |
no test coverage detected