Skip to main content
Glama

Remove Orphan Keys

remove_orphan_keys

Detect and delete orphan translation keys not used in source code, with an initial dry run to preview changes.

Instructions

Find orphan keys (not referenced in source code) and remove them from all locale files. Always does a dry run first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerNoLayer name to clean up (e.g., "root", "app-admin"). If omitted, cleans all layers. Call discover to discover available layers.
localeNoLocale code to read translation keys from for orphan detection (e.g., "en", "en-US"). Defaults to the project default locale.
scanDirsNoAbsolute paths to directories to scan for source code usage. Defaults to all layer root directories. Example: ["/home/user/my-app/apps/admin"].
excludeDirsNoDirectory names to skip when scanning source files. Example: ["storybook", "__tests__", "node_modules"].
dryRunNoWhen true (default), only reports what would be removed without deleting anything. Set to false to permanently delete orphan keys.
projectDirNoAbsolute path to the Nuxt project root. Defaults to server cwd. Example: "/home/user/my-app".
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/cleanup-unused.json"
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the dry-run behavior and that it removes from all locale files, but lacks details on reversibility, permissions, output format, or side effects of the actual removal.

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 exceptionally concise with just two sentences, no extraneous information, and immediately states the core purpose and key safety behavior.

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

Completeness2/5

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

Given 7 optional parameters and no output schema, the description is too sparse. It fails to explain the output format, how to use the outputFile parameter, or what happens after the dry run. A tool that modifies files requires more completeness.

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?

Schema description coverage is 100%, so the baseline is 3. The description does not add significant additional meaning beyond what the schema provides for each parameter; it only reinforces the dry-run concept.

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 the tool finds orphan keys (not referenced in source code) and removes them from all locale files, with a specific verb-resource combination. It distinguishes from the sibling 'find_orphan_keys' which only finds without removing.

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

Usage Guidelines3/5

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

The description mentions 'Always does a dry run first' which implies a two-step process (dry run then actual deletion), but it does not explicitly state when to use this tool versus alternatives like 'find_orphan_keys'. No exclusions or prerequisites are given.

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