MCPcopy Create free account
hub / github.com/Noumena-Network/code / normalizeNameForMCP

Function normalizeNameForMCP

src/services/mcp/normalization.ts:46–56  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

44 * during the transition.
45 */
46export function normalizeNameForMCP(name: string): string {
47 const compatibilityNames = getManagedConnectorCompatibilityNames(name)
48 const normalizationInput =
49 compatibilityNames.length > 1 ? compatibilityNames[1] : name
50
51 let normalized = normalizationInput.replace(/[^a-zA-Z0-9_-]/g, '_')
52 if (compatibilityNames.length > 1) {
53 normalized = normalized.replace(/_+/g, '_').replace(/^_|_$/g, '')
54 }
55 return normalized
56}

Callers 15

isComputerUseMCPServerFunction · 0.85
findMcpServerConnectionFunction · 0.85
client.tsFile · 0.85
persistBlobToTextBlockFunction · 0.85
processMCPResultFunction · 0.85
filterToolsByServerFunction · 0.85
commandBelongsToServerFunction · 0.85
excludeToolsByServerFunction · 0.85
getMcpPrefixFunction · 0.85

Tested by

no test coverage detected