Babelize

v1.3.15
io.github.babelize/mcp Checked 20 hours ago Published 16 days ago

Make apps global-ready from your coding agent: analyze, translate, check and review i18n locally.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

babelize_analyze Analyze localization readiness

Start here to make a React, Next.js or Django app global-ready (Vue, React Native/Expo and static HTML are beta). Scans the local project with the Babelize engine in dry-run mode on a temp copy: nothing is written, no network, no API key. Reports: framework and support level; whether the i18n library (next-intl / react-i18next / vue-i18n) is installed and wired up; hardcoded user-facing strings (count + file:line); JSX sentences kept whole as one ICU message vs split into pieces; strings that cannot be wired automatically and why; hardcoded dates/currencies/plurals; existing locale files and t…

ParameterTypeDescription
excludearrayNever extract from or rewrite these paths, e.g. ["src/registry/**"] for a published component library. Replaces .babelize/config.json exclude.
fromstringSource locale (default: .babelize/config.json sourceLocale, else "en").
includearrayOnly extract from and rewrite these paths: globs relative to the project root, e.g. ["src/app/**"]. Replaces .babelize/config.json include.
limitintegerMax items per list (default 15).
localesarrayTarget locales you plan to ship, e.g. ["de","ja"]; coverage is reported for them.
pathstringProject directory, relative to the workspace root (default: the workspace root). Must stay inside the workspace.

babelize_translate Translate the project (local engine)

Make the app global-ready: extract hardcoded strings, wire them to the i18n library (adding config/provider and package.json deps when missing), and translate every key into the target locales, writing locale files and code into the working tree. Same engine and result as `npx babelize translate`. Run babelize_analyze first; afterwards review `git diff` and run babelize_check. Requires a git repo with a clean working tree (commit or stash first; force: true overrides; dryRun: true previews without writing and works on a dirty tree). Incremental: a lockfile (.babelize/local/babelize-lock.json)…

ParameterTypeDescription
to *arrayTarget locales, e.g. ["de","ja"].
brandVoicestringTone and style for the translator, e.g. "Friendly, concise, no jargon". Replaces .babelize/config.json brandVoice for this run.
dryRunbooleanCompute everything, write nothing; returns the diff summary and a preview. Still calls the translator (uses tokens).
excludearrayNever extract from or rewrite these paths, e.g. ["src/registry/**"] for a published component library. Replaces .babelize/config.json exclude.
forcebooleanRun on a dirty working tree (the result is then mixed with your uncommitted changes).
formalityobjectForm of address per target locale (or base language), e.g. {"de":"formal","it":"informal"}. Merged over .babelize/config.json formality; unlisted locales are auto (what is conventional for software).
fromstringSource locale (default: .babelize/config.json sourceLocale, else "en").
includearrayOnly extract from and rewrite these paths: globs relative to the project root, e.g. ["src/app/**"]. Replaces .babelize/config.json include.
limitintegerMax items per list (default 15).
modelstringModel override for your own LLM key (not for babelize).
pathstringProject directory, relative to the workspace root (default: the workspace root). Must stay inside the workspace.
providerstringDefault: the first BYOK key found in the environment, then BABELIZE_API_KEY.
replacebooleanTreat `to` as the full locale list: remove earlier locales not listed.

babelize_check Check locale files (QA)

QA of the existing locale files against the source locale, without translating: no network, no API key, read-only. Use after babelize_translate or after editing locale files, and before committing. Finds: missing and stale keys; empty values; values identical to the source (untranslated); placeholders/tags lost or invented ({name}, {{count}}, <0>, %s); invalid ICU messages and wrong plural categories for the locale (ICU and i18next _one/_other keys); glossary violations (glossary in .babelize/config.json). Looks for <locale>.json (or <locale>/<namespace>.json) under locales/, messages/, lang/,…

ParameterTypeDescription
fromstringSource locale (default: .babelize/config.json sourceLocale, else "en").
limitintegerMax issues to list (default 15).
localesarrayOnly check these target locales (default: every locale file found).
minSeveritystringLowest severity to list (default "warning"; counts always include everything).
pathstringProject directory, relative to the workspace root (default: the workspace root). Must stay inside the workspace.

babelize_review Review locale changes in a diff

Review the locale changes in the current git diff (working tree vs HEAD, including untracked files) or vs a base ref, e.g. before committing or in a PR. QAs only the changed entries with the same checks as babelize_check (missing keys, placeholders, ICU, plural forms, untranslated, glossary from .babelize/config.json), and flags source strings whose translations were not updated (stale) and new source keys a locale is missing. Read-only; no network, no API key.

ParameterTypeDescription
basestringBranch, tag or commit to compare with (default HEAD, i.e. uncommitted changes), e.g. "main" or "origin/main".
fromstringSource locale (default: .babelize/config.json sourceLocale, else "en").
limitintegerMax issues to list (default 15).
localesarrayOnly review these target locales.
minSeveritystringLowest severity to list (default "warning").
pathstringProject directory, relative to the workspace root (default: the workspace root). Must stay inside the workspace.

babelize_scan Scan Directory

Low-level: list the hardcoded strings in a local directory that babelize_translate would extract (same extractor). Honors .babelize/config.json include/exclude. No API key required. For a whole-project localization report use babelize_analyze.

ParameterTypeDescription
directory *string
excludearrayNever these paths. Replaces .babelize/config.json exclude.
extensionsarray
includearrayOnly these paths: globs relative to the project root. Replaces .babelize/config.json include.

babelize_scan_strings Scan Strings

Low-level: extract hardcoded translatable strings from a code snippet. No API key required.

ParameterTypeDescription
code *string
languagestringHint for parsing (default: auto-detect)

babelize_project_list List Projects

Cloud project management: List all translation projects. Requires BABELIZE_API_KEY.

ParameterTypeDescription
limitnumber
pagenumber

babelize_project_get Get Project

Cloud project management: Get details of a specific translation project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_project_create Create Project

Cloud project management: Create a new translation project from a GitHub repository (repo_url is required). ZIP projects cannot be created here: their archive must be uploaded first, via the dashboard (Upload ZIP) or `babelize init --source zip`. Requires BABELIZE_API_KEY.

ParameterTypeDescription
name *string
repo_url *stringGitHub repository URL, e.g. https://github.com/org/repo. Required.
branchstring
brand_voicestring
source_languagestring
target_languagesarray

babelize_babel_list List Translation Runs

Cloud project management: List translation runs (babels). Requires BABELIZE_API_KEY.

ParameterTypeDescription
limitnumber
pagenumber
project_idstring

babelize_babel_get Get Translation Run

Cloud project management: Get detailed info and logs for a translation run. Requires BABELIZE_API_KEY.

ParameterTypeDescription
babel_id *string

babelize_language_list List Languages

Cloud project management: List all supported languages. Requires BABELIZE_API_KEY.

babelize_language_codes Language Codes

Cloud project management: Look up language code mappings (ISO ↔ FLORES-200). Requires BABELIZE_API_KEY.

ParameterTypeDescription
actionstring
flores_codestring
iso_codestring

babelize_engine_analyze Analyze Code

Cloud project management: Analyze source code for framework detection and i18n readiness. Requires BABELIZE_API_KEY.

ParameterTypeDescription
code *string
filenamestring

babelize_tm_get Get Translation Memory

Cloud project management: List translation memory entries for a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
searchstring
target_langstring

babelize_tm_set Set Translation Memory

Cloud project management: Add a translation memory entry. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
source_text *string
target_lang *string
translated_text *string
source_langstring

babelize_tm_export Export Translation Memory

Cloud project management: Export translation memory as TMX. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_glossary_delete Delete Glossary Entry

Cloud project management: Delete a glossary entry. Requires BABELIZE_API_KEY.

ParameterTypeDescription
entry_id *string
project_id *string

babelize_glossary_import Import Glossary

Cloud project management: Bulk import glossary entries from a CSV string (term,type,<locale>,…). Existing terms (matched ignoring case) are updated unless skip_existing is set. Reports added/updated/skipped/rejected rows. Requires BABELIZE_API_KEY.

ParameterTypeDescription
csv *string
project_id *string
skip_existingbooleanOnly add new terms; leave existing ones unchanged

babelize_glossary_export Export Glossary

Cloud project management: Export glossary entries as CSV. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_project_language_add Add Language

Cloud project management: Add a language to a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
language_id *string
project_id *string

babelize_project_language_remove Remove Language

Cloud project management: Remove a language from a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
language_id *string
project_id *string

babelize_member_list List Members

Cloud project management: List members of a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_invitation_send Send Invitation

Cloud project management: Send a team invitation to a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
email *string
project_id *string
role *string

babelize_project_sync Sync Project

Cloud project management: Trigger a repository sync for a project. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_pr_raise Raise Pull Request

Cloud project management: Create a GitHub Pull Request with the latest run's translations. If the project's PR is still open (same target languages), the run is added to it instead. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
base_branchstringBranch to open the PR against; must exist (default: the project's branch)
force_newbooleanOpen a new PR even if one is still open (replaces the link to it)
titlestringPR title (default names the translated languages)

babelize_pr_update Update Pull Request

Cloud project management: Push the latest run's translations to the project's open GitHub Pull Request. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string

babelize_project_download Download Project

Cloud project management: Download translated project files as ZIP. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
output_pathstringDirectory to save the ZIP file (defaults to system temp dir)

babelize_me Get User Profile

Cloud project management: Get current user profile and credits. Requires BABELIZE_API_KEY.

babelize_provider_tokens_list List Provider Tokens

Cloud project management: List connected BYOK translation provider tokens. Requires BABELIZE_API_KEY.

babelize_run Run Translation

Cloud project management: Trigger a Babelize translation run for target languages. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
target_locales *array
frameworkstring
source_localestring

babelize_run_and_wait Run Translation and Wait

Cloud project management: Start a translation run and poll until it completes. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
target_locales *array
frameworkstring
max_pollsnumberMax number of polls before timeout (default: 120 = 10min)
poll_intervalnumberPoll interval in ms (default: 5000)
source_localestring

babelize_status Check Status

Cloud project management: Check status of a translation run. Requires BABELIZE_API_KEY.

ParameterTypeDescription
babel_id *string

babelize_glossary_get Get Glossary

Cloud project management: List glossary entries for a project, with each entry's id (for babelize_glossary_delete) and the total count. Paged: 100 entries per page by default. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
limitintegerEntries per page (default 100, max 200)
pageintegerPage number, 1-based (default 1)
searchstringOnly terms containing this text

babelize_glossary_set Set Glossary Entry

Cloud project management: Add or update a glossary entry. never_translate keeps the term as written in every language (no target needed). always_translate_as sets the required translation of the term for one locale; calling it again for another locale adds that locale to the same entry. An existing entry for the term (matched ignoring case) is updated, not duplicated. Requires BABELIZE_API_KEY.

ParameterTypeDescription
project_id *string
source *stringThe term in the source language
localestringTarget locale of the translation, e.g. "fr" or "pt-BR" (always_translate_as only)
targetstringRequired translation (always_translate_as only)
typestringDefault never_translate