Add a locale to a project. The primary code must be a 2–3 char ISO 639 code (e.g. 'nb', 'da', 'uk', 'en'). Use aliases to register BCP 47 variants served by this locale (e.g. aliases=['nb-NO', 'no'] for code='nb'). Set initTranslate=true to auto-translate all existing namespace keys for this loca...
AI agents use create_locale to create or update resources in Localization — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Localization environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Primary ISO 639 locale code (e.g. 'nb', 'da', 'sv', 'uk'). Must be 2–3 lowercase chars. |
aliases | array | — | BCP 47 variant codes that serve the same translations as this locale. Example: ['nb-NO', 'no'] for code='nb' — requests for 'nb-NO' or 'no' will resolve to 'nb' |
isDefault | boolean | — | Whether this is the default locale for the project |
localeSkill | string | — | Language-specific translation guide for AI — style, tone, grammar rules, anti-patterns, common mistakes, wording preferences (up to ~500 words). If omitted, ser |
projectSlug | string | Yes | Project slug |
initTranslate | boolean | — | When true, triggers one-time auto-translation of all existing keys for this locale via AI immediately after creation. Useful when adding a locale to an establis |
Parameters from the server's own tool schema.
This tool creates new locale entries in the localization system and can trigger automatic translation of content. It modifies the project's localization configuration by adding new locales and potentially generating translated content. While reversible (locales can presumably be deleted), it is a write operation that creates new data structures and content.
From the tool's definition Tool description states: 'Add a locale to a project' and 'auto-translate all existing namespace keys for this locale via AI immediately after creation.' These are create and modify operations on localization configuration and translation data.
Risk signalsAccepts freeform code/query input (code)
Attacks that exploit this kind of access
Add a locale to a project. The primary code must be a 2–3 char ISO 639 code (e.g. 'nb', 'da', 'uk', 'en'). Use aliases to register BCP 47 variants served by this locale (e.g. aliases=['nb-NO', 'no'] for code='nb'). Set initTranslate=true to auto-translate all existing namespace keys for this locale via AI immediately after creation. After adding a locale, use get_namespace_coverage to see fill gaps, then bulk_set_locale or bulk_translate_and_save to fill them. Locale skill (translation style rules) can be set via the localeSkill param — if omitted, known locales get auto-filled defaults. It is categorised as a Write tool in the Localization MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
create_locale accepts 6 parameters: code, aliases, isDefault, localeSkill, projectSlug, initTranslate. Required: code, projectSlug. The full parameter table on this page comes from the server's own tool schema.
Register the Localization MCP server in PolicyLayer and add a rule for create_locale: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Localization. Nothing to install.
create_locale is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the create_locale rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for create_locale. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
create_locale is provided by the Localization MCP server (localization-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →