Skip to main content
Glama

format_catalogs

Cleans, sorts, and aligns JSON or ARB translation catalogs alphabetically or by source-locale key order to prevent merge conflicts and inconsistent formatting. Preview changes as diffs with a dry run before writing files.

Instructions

Cleans, sorts, and formats translation catalogs (JSON and ARB) alphabetically or aligned with source locale key ordering, eliminating merge conflicts and inconsistent formatting.

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

Input Schema

NameRequiredDescriptionDefault
dryRunNoIf true, previews changes via unified diffs without modifying files. If false, writes formatted files to disk.
indentNoIndentation space count (default 2).
localesNoOptional list of locales to format. Defaults to all project locales.
sortOrderNoSort order: 'alphabetical' (natural A-Z sort across all levels) or 'align-with-source' (orders target locale keys to match the source locale).alphabetical
namespacesNoOptional list of namespaces to format.
projectPathNoOptional project root directory. Defaults to current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does signal a write operation via 'formats' and the merge-conflict outcome. It omits key behavioral facts an agent would want before running it: that files on disk are rewritten by default, that a dry-run preview exists to avoid that (only visible in the schema), whether changes are reversible, and what 'cleans' actually removes.

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 well-formed sentence with the resource and action front-loaded and the benefit trailing. Nothing is redundant or padded, and it is sized appropriately for the tool.

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?

For a six-parameter, zero-required formatter with no annotations and no output schema, the description covers the what and the why but leaves open what 'cleans' entails (comments, duplicate keys, whitespace), that all project locales are the default scope, and that a dry-run mode exists. Adequate but with clear gaps for a tool that mutates files in place.

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; every parameter including sortOrder's two enum values and the dryRun semantics is already fully documented in the schema. The description restates the two sort modes and adds the rationale of avoiding merge conflicts, but contributes no syntax, default, or scoping detail beyond what the schema provides.

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?

The description uses a specific verb set (cleans, sorts, formats) against a named resource (translation catalogs, JSON and ARB) and names the two ordering modes. An agent can tell this is a formatter rather than an audit or a translator, though it never explicitly distinguishes itself from the sibling audit_formatting tool.

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 through the stated benefit ('eliminating merge conflicts and inconsistent formatting'), which suggests when a caller would reach for it. There is no explicit when-to-use/when-not-to-use guidance and no mention of the sibling audit_formatting tool, so the agent must infer that this one rewrites files while the audit only reports.

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