Skip to main content
Glama
fabkho
by fabkho

Find Orphan Translation Keys

find_orphan_keys

Find translation keys in locale JSON files that are not referenced in Vue/TS source code. Scan a specific layer or all layers to identify unused keys that can be safely removed.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerNoLayer name to check for orphan keys (e.g., "root", "app-admin"). If omitted, checks all layers. Call discover to see available layers.
localeNoLocale code to read translation keys from (e.g., "en", "en-US"). Defaults to the project default locale.
scanDirsNoAbsolute 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"].
outputFileNoAbsolute 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"
projectDirNoAbsolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".
excludeDirsNoDirectory names to skip when scanning source files. Example: ["storybook", "__tests__", "node_modules"].
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden and does substantial work: it discloses dynamic key detection, uncertain matches, scope-aware per-layer checking, and the misplacedUsages distinction. It stops short of specifying the complete result format or explicitly confirming non-mutating behavior, but 'reports' and 'can potentially be removed' imply read-only intent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well organized: core definition first, then layer behavior, then edge-case handling. Every sentence earns its place, and the scope-related caveats justify the length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with no output schema and no annotations, the description covers the key outcomes: potential removals, dynamic/uncertain matches, scanScope summary, and misplacedUsages. It could more fully enumerate the returned data structure, but it provides enough context for correct selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents all 6 parameters with detailed descriptions, so the baseline is 3. The description adds useful context about layer scope and consuming apps, but it does not materially enhance per-parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Find translation keys that exist in locale JSON files but are not referenced in any Vue/TS source code.' It clearly defines the tool's scope and distinguishes it from sibling tools like find_undefined_keys and find_duplicate_keys.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly conveys when to use this tool—to identify potentially removable translation keys—and describes scope-aware scanning with misplacedUsages separated from orphans. It does not explicitly name alternative tools for related use cases, but the intended context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fabkho/the-i18n-kit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server