Skip to main content
Glama

Dedup-check, build, and write a Blocks upload in one call

sync_keys

Adds new translation keys for a module, dedup-checks them against existing keys, and writes the portal-ready upload JSON.

Instructions

The one-call path for adding new translation keys: resolves the module by name (cached to disk), dedup-checks every key against the target module + any BLOCKS_DEDUP_MODULES, skips any key whose exact KeyName already exists in the target module (would overwrite/duplicate), builds portal-ready upload entries for the rest, and — if outputPath is given — writes them straight to disk. Keys with the same English text under a DIFFERENT existing key are NOT auto-skipped (reusing them means changing the calling code, not this tool's call) — they come back in duplicateWarnings for you to decide on. Returns a compact summary, not the full entry JSON, to keep the response small — read the written file if you need the entries themselves. The upload JSON is written to outputPath, or — when you omit outputPath (recommended) — to the path from BLOCKS_OUTPUT_PATH_PATTERN with {module} substituted, resolved against the project root. Parent directories are created automatically. Do NOT invent an output path: omit outputPath and let the configured location be used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entriesYes
tenantIdNoDefaults to BLOCKS_TENANT_ID from .env if omitted.
moduleNameYese.g. "app-survey" (not a ModuleId).
outputPathNoWhere to write the upload JSON. Omit to use BLOCKS_OUTPUT_PATH_PATTERN (recommended). A relative path is resolved against the project root; parent dirs are created.
extraModuleNamesNoAdditional module names to dedup-check beyond the target module and BLOCKS_DEDUP_MODULES.
Behavior5/5

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

With no annotations provided, the description carries the full burden and exceeds expectations: it discloses dedup rules, exact-key skip behavior, duplicateWarnings, compact-summary response, path resolution via BLOCKS_OUTPUT_PATH_PATTERN, automatic parent directory creation, and the warning not to invent an output path. This is unusually transparent.

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 every clause contributes a distinct behavioral fact. It is front-loaded with the core purpose and remains readable, though it could benefit from light bullet-point formatting for even faster scanning.

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

Completeness5/5

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

Given the tool's complexity, lack of output schema, and absence of annotations, the description covers all necessary context: return shape (compact summary, not full JSON), where to find the actual entries, output path rules, parent dir creation, dedup edge cases, and tenant default. It is self-sufficient.

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

Parameters5/5

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

Although schema coverage is high (80%), the description adds significant parameter-level meaning: how outputPath behaves when omitted, how modules are resolved and dedup-checked against BLOCKS_DEDUP_MODULES, and how entries are processed (exact key skip vs duplicate-text warning). This goes well beyond the schema's bare field labels.

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 is built around a specific verb-resource combination ('one-call path for adding new translation keys') followed by a clear step-by-step summary: resolve module, dedup-check, build entries, and write to disk. It distinguishes itself from siblings like build_upload_entries by emphasizing the write side and dedup logic, leaving no doubt about what this tool uniquely accomplishes.

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

Usage Guidelines4/5

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

It explicitly frames itself as the single-call path for adding new keys and gives actionable advice (omit outputPath, do not invent an output path, call list_cultures first). It provides clear context for when to use it, though it does not name explicit alternatives or exclusions for sibling tools.

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