Skip to main content
Glama

One-call prep: diff -> keys -> per-module cultures + exact dedupe

prepare_sync

Scans project diff, groups new translation keys by module, fetches tenant cultures, and exact-dedupes against existing keys to prepare a translation sync.

Instructions

The FIRST and usually ONLY prep call for a translation sync. Scans the project diff (working-tree + staged + untracked), groups the found keys BY THEIR OWN module (from each key's prefix), fetches the tenant cultures, and exact-dedupes each module's keys against that module + any modules in BLOCKS_DEDUP_MODULES (none by default) — all in code, no LLM work. Handles a diff spanning several modules in ONE call. Returns { cultures, modules: [{ module, newKeys, existingSkip }] }. Do NOT call find_keys / list_modules / list_cultures / search_keys separately — this replaces them. Then, for each module with non-empty newKeys, infer English from the key names, translate into cultures, and call sync_keys for THAT module (omit outputPath) — one sync_keys call per module produces one JSON file per module.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refreshNoRe-fetch tenant cultures from the API, bypassing the cache.
diffBaseNoGit ref to diff against. Omit for uncommitted changes.
frameworkNo
moduleNameNoScope to a single Blocks module slug, e.g. "app-user-management". Omit to process every module present in the diff.
extraModuleNamesNoExtra modules to exact-dedupe against.
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It thoroughly explains the pipeline (scans working-tree + staged + untracked, groups by module prefix, fetches tenant cultures, exact-dedupes against module plus BLOCKS_DEDUP_MODULES) and the in-code nature (no LLM work). It also reveals the return structure. It doesn't mention side effects or auth requirements, but this is a read-only prep tool, so adequate.

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?

The description is long but front-loaded with the key message ('FIRST and usually ONLY prep call'). Every sentence contributes: scope, process, output, exclusions, and follow-up actions. It is dense but justified for a tool with this complexity.

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?

Without an output schema, the description explicitly defines the return value ({ cultures, modules: [{ module, newKeys, existingSkip }] }) and explains the full usage flow including subsequent sync_keys calls. It lacks edge-case details but is remarkably complete for a prep tool.

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 coverage is 80% with parameter descriptions for most fields. The description adds workflow-level context (e.g., 'Handles a diff spanning several modules in ONE call') and references dedupe modules, but most parameter details are already in the schema. It doesn't significantly elevate understanding beyond the schema, hence baseline 3.

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 FIRST and usually ONLY prep call for a translation sync' and details its function: scanning the diff, grouping keys by module, fetching cultures, and exact-deduping. It explicitly distinguishes itself from siblings: 'Do NOT call find_keys / list_modules / list_cultures / search_keys separately — this replaces them.'

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

Usage Guidelines5/5

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

Provides explicit when-to-use context ('FIRST and usually ONLY prep call') and when-not-to-use with named alternatives. It also prescribes the next steps: infer English, translate, then call sync_keys per module, omitting outputPath.

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/mahmudul006/blocks-translation-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server