MCP Tools

find_duplicate_keys

Find translation keys defined in BOTH a shared layer and an app layer that consumes it (e.g. the same key in a monorepo root layer and in app-shop). At runtime the app layer's value shadows the shared one — collisions with divergent values are the dangerous case, because the shared value silently never shows. Compares one reference locale and reports each collision with both values and a divergent flag. Fix by deleting one side, never by moving.

Parameters

ParameterTypeRequiredDescription
localestringnoLocale code to compare values in (e.g., "de", "en-US"). Defaults to the project default locale.
projectDirstringnoAbsolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".
byValuebooleannoWhen true, also groups different keys carrying the same value — e.g. common.actions.save and calendar.views.save both "Speichern". Each group says what to do about it: "reuse" (a shared layer already has it — delete the app copies and repoint call sites), "promote" (move one to a shared layer with move_translation_key), or "consolidate" (duplication inside one layer). Default: false.
minValueLengthintegernoShortest value worth grouping when byValue is set. Default: 4 — below it, values like "OK" repeat across unrelated namespaces legitimately.
outputFilestringnoAbsolute path to write full JSON output. Returns only a compact summary to the caller — use this for large outputs to avoid flooding the conversation context. Example: "/tmp/duplicate-keys.json"

Paired CLI Command

The same operation runs from a terminal as the-i18n-cli find-duplicates, whose page documents its flags. Both paths call the same @the-i18n-kit/cli functions, so the result is the same.

Every tool is advertised by the-i18n-mcp and listed on the MCP tools overview.

Copyright © 2026