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

Function stripMCPAppsMetadata

pkg/inventory/builder.go:397–407  ·  view source on GitHub ↗

stripMCPAppsMetadata removes MCP Apps UI metadata from tools when the remote_mcp_ui_apps feature flag is not enabled.

(tools []ServerTool)

Source from the content-addressed store, hash-verified

395// stripMCPAppsMetadata removes MCP Apps UI metadata from tools when the
396// remote_mcp_ui_apps feature flag is not enabled.
397func stripMCPAppsMetadata(tools []ServerTool) []ServerTool {
398 result := make([]ServerTool, 0, len(tools))
399 for _, tool := range tools {
400 if stripped := stripMetaKeys(tool, mcpAppsMetaKeys); stripped != nil {
401 result = append(result, *stripped)
402 } else {
403 result = append(result, tool)
404 }
405 }
406 return result
407}
408
409// stripMetaKeys removes the specified Meta keys from a single tool.
410// Returns a modified copy if changes were made, nil otherwise.

Callers 2

TestStripMCPAppsMetadataFunction · 0.85
ToolsForRegistrationMethod · 0.85

Calls 1

stripMetaKeysFunction · 0.85

Tested by 1

TestStripMCPAppsMetadataFunction · 0.68