Skip to main content
Glama

deduplicate_i18n

Detects exact and fuzzy duplicate translation keys plus cross-namespace redundancy, then optionally consolidates redundant keys and updates source code call sites.

Instructions

Detects exact duplicate translation keys, fuzzy near-duplicates, and cross-namespace redundancy across project catalogs using normalized Levenshtein similarity, with optional automated key consolidation and source code call-site updates.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "deduplicate_i18n"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNoOptional list of files or folders to limit code reference updating to.
dryRunNoIf true (default when consolidate is true), previews consolidation diff without modifying files.
exactOnlyNoOnly report exact duplicate strings across keys or namespaces.
consolidateNoIf true, automatically consolidates redundant keys into canonical shared keys across all catalogs and source code references.
projectPathNoOptional project root directory. Defaults to current working directory.
sourceLocaleNoSource language code (e.g. 'en'). Defaults to detected source locale.
targetNamespaceNoTarget namespace to consolidate shared strings into. Defaults to 'common'.common
crossNamespaceOnlyNoOnly report strings duplicated across multiple feature namespaces.
similarityThresholdNoFuzzy similarity threshold between 0.5 and 1.0 (defaults to 0.85).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the significant behavioral fact that consolidation rewrites catalogs and source-code call sites, which is essential for an agent deciding whether to enable 'consolidate'. However, it omits the dry-run-by-default safety net, the reversibility of edits, and any permissions or backup expectations, which a 9-parameter mutation-capable tool should surface.

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?

A single dense sentence with the detection capabilities front-loaded and the optional write behavior trailing behind 'with optional'. No filler, no restatement of the tool name.

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

Completeness3/5

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

Nine optional parameters, no annotations, and no output schema mean the description must carry more weight. It covers the analysis dimension well but says nothing about the shape of the report (counts, matched pairs, suggested canonical keys) or how results relate to apply_i18n_plan, leaving the agent guessing at the return value.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3. The description adds real meaning beyond the schema by naming normalized Levenshtein similarity, which explains what similarityThreshold measures and why fuzzy mode behaves as it does.

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

Purpose4/5

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

States a specific verb ('detects') and specific objects (exact duplicate keys, fuzzy near-duplicates, cross-namespace redundancy) plus the mechanism (normalized Levenshtein) and an optional write path. An agent can tell this is the duplicate-detection tool rather than a validator or translator, though no sibling is named explicitly.

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?

Usage is implied by the purpose: run this when hunting redundant translation keys. Nothing states when to prefer it over validate_i18n or analyze_project, and there is no exclusion guidance (e.g., 'use generate_i18n_plan instead if you want a reviewable edit plan').

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