When code maps or normalizes external identifiers (tool names, locale tags, etc.), it must preserve the identifier’s real semantics and use canonical names.
Standards
mcp__<server>__<tool>), and only transform for display when needed.Example pattern (display-only normalization)
// Canonical external identifier (real MCP name)
type McpToolName = 'mcp__filesystem__write_file'
function displayTitle(toolName: McpToolName): string {
// Safe display-only transformation; semantics preserved
if (toolName === 'mcp__filesystem__write_file') return 'write_file'
return toolName
}
Example anti-pattern (semantic-unsafe aliasing)
// ❌ Incorrect: Belarusian/Ukrainian/Kazakh tags mapped to Russian UI
const LOCALE_ALIASES: Record<string, 'ru'> = {
be: 'ru',
uk: 'ru',
kk: 'ru'
}
// Fix by removing/correcting those mappings.
Enter the URL of a public GitHub repository