MCPcopy
hub / github.com/codeaashu/claude-code / sanitizeToolNameForAnalytics

Function sanitizeToolNameForAnalytics

src/services/analytics/metadata.ts:70–77  ·  view source on GitHub ↗
(
  toolName: string,
)

Source from the content-addressed store, hash-verified

68 * @returns The original name for built-in tools, or 'mcp_tool' for MCP tools
69 */
70export function sanitizeToolNameForAnalytics(
71 toolName: string,
72): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS {
73 if (toolName.startsWith('mcp__')) {
74 return 'mcp_tool' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
75 }
76 return toolName as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
77}
78
79/**
80 * Check if detailed tool name logging is enabled for OTLP events.

Callers 15

handleInputModeToggleFunction · 0.85
SkillPermissionRequestFunction · 0.85
onSelectFunction · 0.85
handleAcceptOnceFunction · 0.85
handleRejectFunction · 0.85
useFilePermissionDialogFunction · 0.85
onSelectFunction · 0.85
normalizeContentFromAPIFunction · 0.85
hasPermissionsToUseToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected