MCP Tools

find_orphan_keys

Find translation keys that exist in locale JSON files but are not referenced in any Vue/TS source code. Scans a specific layer or all layers. Reports keys that can potentially be removed. Also detects dynamic key patterns and uncertain matches. Scope-aware: each layer is checked only against code of the apps that consume it (summary.scanScope shows each layer's effective scope); keys referenced only from non-consuming apps are reported separately as misplacedUsages, not orphans.

Parameters

ParameterTypeRequiredDescription
layerstringnoLayer name to check for orphan keys (e.g., "root", "app-admin"). If omitted, checks all layers. Call discover to see available layers.
localestringnoLocale code to read translation keys from (e.g., "en", "en-US"). Defaults to the project default locale.
scanDirsstring[]noAbsolute paths to directories to scan for source code usage. Overrides scope-aware scanning: all layers are checked globally against these dirs. Example: "/home/user/my-app/apps/admin".
excludeDirsstring[]noDirectory names to skip when scanning source files. Example: "storybook", "tests", "node_modules".
projectDirstringnoAbsolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".
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/orphan-keys.json"

Paired CLI Command

The same operation runs from a terminal as the-i18n-cli remove-orphans, 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