Skip to main content
Glama

audit_plurals

Validate JSON and Flutter ARB translation catalogs against Unicode CLDR plural and gender rules to detect missing categories, fallback branches, and variable mismatches, with optional scaffold fixes.

Instructions

Audits translation catalogs (JSON and Flutter ARB) against official Unicode CLDR plural and gender rules, detecting missing mandatory categories (e.g., Arabic zero/two/few/many, Russian few/many), missing 'other' fallback branches, and variable mismatches, with automated scaffold fixing.

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": "audit_plurals"
  }
}

Input Schema

NameRequiredDescriptionDefault
fixNoIf true, automatically scaffolds missing required CLDR plural forms and 'other' fallback branches.
dryRunNoIf true (default when fix is true), previews changes via unified diff without modifying files.
localesNoOptional target locales to audit (e.g. ['ar', 'ru', 'pl', 'fr']). Defaults to all detected locales.
namespacesNoOptional list of namespaces to limit plural auditing to.
projectPathNoOptional project root directory. Defaults to current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a fair job: it discloses that the tool can mutate files ('automated scaffold fixing') and that dry-run previews via unified diff, which is the key safety-relevant trait. It stops short of saying what happens to existing translated forms that get scaffolded, whether fixes are additive only, and what the audit report contains when no fix is requested.

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?

One front-loaded sentence that leads with the verb and resource before piling on the rule details and the fixing capability. It is dense and slightly run-on at the tail ('...with automated scaffold fixing'), but no clause is filler.

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 five-parameter, all-optional tool with no output schema, the description covers the substantive behavior (what is detected, that fixes can be scaffolded, that dry-run previews). The remaining gap is the return shape — an agent cannot tell whether a clean audit returns a summary, per-locale findings, or nothing — but that is the only notable omission.

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 all five parameters (fix, dryRun, locales, namespaces, projectPath) are already documented in the schema. The description adds only indirect signal: the fixing clause maps loosely to 'fix', and the CLDR/plural framing hints at what 'locales' and 'namespaces' scope. Baseline 3 applies since the schema does the heavy lifting.

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?

Names a specific verb and resource ('Audits translation catalogs (JSON and Flutter ARB)') plus the exact rule set (Unicode CLDR plural and gender rules). The enumerated defect classes (missing mandatory categories, missing 'other' fallback, variable mismatches) make it clearly distinguishable from sibling audits like audit_formatting and audit_rtl without opening any schema.

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 domain is clear enough that an agent can infer this is the plural/gender-correctness pass, but there is no explicit when-to-use framing, no mention of when to prefer validate_i18n or the other audit_* tools, and no stated prerequisite like running it after catalogs are imported. Usage is implied by subject matter rather than stated.

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