Skip to main content
Glama
fabkho
by fabkho

Find Used-But-Undefined Translation Keys

find_undefined_keys

Find translation keys referenced in source code but defined in no consumed locale file to prevent raw keys from shipping to production.

Instructions

The inverse of find_orphan_keys: find keys referenced in source code but defined in NO locale file of the using app's consumed layers — the direction that ships raw keys to production. Scope-aware: each scan unit (app) is checked against the layers it consumes (summary.searchedLayersByApp); a key defined only in a layer the using app does not consume is still undefined for that app. Known limitation: extraction is line-based and static — dynamically built keys (template literals, concatenation) cannot be verified and are reported as uncertainKeys, never as hard findings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localeNoReference locale to resolve key definitions in (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: every layer counts as resolvable from 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/undefined-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, the description takes on the full burden and discloses the key limitation that extraction is line-based and static, reporting dynamically built keys as uncertainKeys rather than hard findings. This is critical behavioral transparency. It also explains scope awareness, but does not explicitly state whether the operation is read-only or has any side effects beyond writing to an optional outputFile.

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 concise and well-structured: it states the purpose, explains the scope, and then highlights the known limitation, all in a few sentences. It front-loads the key differentiator (inverse of find_orphan_keys) and ends with a relevant limitation. Every sentence adds value without redundancy.

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?

The description covers the tool's purpose, scope, and a major limitation, which is substantial given no output schema. It does not explicitly describe the return format (e.g., list of keys, uncertainKeys vs hard findings), though the outputFile parameter mentions a compact summary. Given the complexity (5 params, no annotations), the description is fairly complete but could be improved by explicitly stating what the tool returns in terms of hard findings and uncertainKeys.

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 provides 100% coverage with clear descriptions for each parameter, so the baseline is 3. The tool description adds minimal extra semantics about parameters; it mentions scope-aware scanning and the scanDirs override, but this is already stated in the schema. It does not elaborate on the interaction between parameters beyond what the schema covers.

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 clearly states it finds keys referenced in source but not defined in any consumed locale file, positioning it as the inverse of find_orphan_keys. It uses specific verbs ('find', 'referenced', 'defined') and distinguishes from siblings by explicitly describing its scope-aware behavior and the 'raw keys to production' scenario.

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 provides strong contextual cues by labeling itself as the inverse of find_orphan_keys and explaining the production risk scenario, which implies when it should be used. However, it does not explicitly enumerate alternative tools or state clear 'when not to use' conditions beyond the static-analysis limitation.

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