MCPcopy
hub / github.com/github/github-mcp-server / initGlobalToolScopeMap

Function initGlobalToolScopeMap

pkg/http/server.go:242–256  ·  view source on GitHub ↗
(t translations.TranslationHelperFunc)

Source from the content-addressed store, hash-verified

240}
241
242func initGlobalToolScopeMap(t translations.TranslationHelperFunc) error {
243 // Build inventory with all tools to extract scope information
244 inv, err := inventory.NewBuilder().
245 SetTools(github.AllTools(t)).
246 Build()
247
248 if err != nil {
249 return fmt.Errorf("failed to build inventory for tool scope map: %w", err)
250 }
251
252 // Initialize the global scope map
253 scopes.SetToolScopeMapFromInventory(inv)
254
255 return nil
256}
257
258// createHTTPFeatureChecker creates a feature checker that resolves static CLI
259// features plus per-request header features and insiders mode.

Callers 1

RunHTTPServerFunction · 0.85

Calls 5

NewBuilderFunction · 0.92
AllToolsFunction · 0.92
BuildMethod · 0.80
SetToolsMethod · 0.80

Tested by

no test coverage detected