Skip to main content
Glama

Scan localizable strings

l10n_scan
Destructive

Scan a Bannerlord module's XML, GUI prefabs, and C# code for localization id problems: missing, empty, reused, or colliding ids plus per-language coverage; optionally assign unique fixes.

Instructions

Scans a module's XML data, GUI prefabs and C# code (Source/ or code_dir) for {=id}Text strings. Reports texts without ids, empty ids, ids reused with different texts, ids colliding with other modules, and translation coverage per language. fix_missing_ids / fix_conflicts rewrite the module's XML with fresh unique ids.

Input Schema

NameRequiredDescriptionDefault
moduleYesModule id.
code_dirNoFolder with the mod's C# sources if outside the module folder.
include_codeNoAlso scan .cs files (default: when a Source folder or code_dir exists).
fix_conflictsNoGive new ids to strings whose id is reused with a different text, here or in another module (default false).
fix_missing_idsNoAdd {=newId} to player-facing XML texts that have none (or {=}) (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=true, and the description corroborates by disclosing that the fix flags rewrite the module's XML with fresh unique ids — concrete detail beyond the annotation about what is mutated. It stops short of stating reversibility or whether a scan alone (no fix flags) is purely read-only.

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

Conciseness4/5

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

Three sentences, all informative and front-loaded with the scan scope before the reporting categories and the mutation behavior. The second sentence is a dense list but every item earns its place.

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?

With no output schema, the description usefully summarizes the report contents (missing/empty/reused/colliding ids plus per-language coverage) and the mutation side effects, which is enough for an agent to call it correctly. Permission or rate-limit prerequisites are absent but are marginal here.

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 coverage is 100%, so the structured fields already document all five parameters; the description still adds value by tying code_dir to the Source/ fallback and by characterizing the fix flags as XML rewrites with fresh unique ids rather than just boolean toggles.

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 and resource (scans a module's XML, GUI prefabs and C# code for {=id}Text strings) and enumerates exactly what problems it reports, so an agent knows the scope well. It does not explicitly distinguish itself from the nearby l10n_status / l10n_set siblings, which keeps it short of a 5.

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 closing sentence explains what fix_missing_ids / fix_conflicts do, implying when those flags apply, but there is no explicit when-to-use guidance or comparison to l10n_status / l10n_set, so the agent must infer the routing.

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