MCPcopy Index your code
hub / github.com/github/github-mcp-server / shouldStripMCPAppsMetadata

Function shouldStripMCPAppsMetadata

pkg/inventory/registry.go:195–204  ·  view source on GitHub ↗

shouldStripMCPAppsMetadata centralises the strip decision so the same logic is exercised by tests and by RegisterTools.

(ctx context.Context, featureFlagEnabled bool)

Source from the content-addressed store, hash-verified

193// shouldStripMCPAppsMetadata centralises the strip decision so the same logic
194// is exercised by tests and by RegisterTools.
195func shouldStripMCPAppsMetadata(ctx context.Context, featureFlagEnabled bool) bool {
196 if !featureFlagEnabled {
197 return true
198 }
199 // Feature flag is on. Respect the client capability if it is known.
200 if supported, ok := ghcontext.HasUISupport(ctx); ok && !supported {
201 return true
202 }
203 return false
204}
205
206// RegisterTools registers all available tools with the server using the provided dependencies.
207// The context is used for feature flag evaluation and client capability checks.

Callers 2

ToolsForRegistrationMethod · 0.85

Calls

no outgoing calls

Tested by 1