MCP Tools
scaffold_locale
Create empty locale files for new languages, copying the key structure of the default locale with every value set to an empty string. Supports both JSON (Nuxt) and PHP (Laravel) formats. Does NOT modify the framework configuration — add the locale there first, then call this.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
locales | string[] | no | Locale codes to scaffold empty files for (e.g., "sv", "ja", "pt-BR"). If omitted, auto-detects the locales the config declares but has no files for. |
layer | string | no | Layer to scaffold in (e.g., "root", "app-admin"). If omitted, scaffolds across every layer. |
dryRun | boolean | no | Report the files that would be created without writing them. Default: false. |
projectDir | string | no | Absolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app". |
Result
| Field | Type | Description |
|---|---|---|
created | object[] | Files that were created, or would be under dryRun. |
skipped | object[] | Files that already existed and were left alone. |
dryRun | boolean | True when nothing was written because a preview was asked for. |
Behavior Hints
A host reads these to decide whether a call needs your confirmation first.
| Hint | Value |
|---|---|
readOnlyHint | false |
destructiveHint | false |
idempotentHint | true |
openWorldHint | false |
Paired CLI Command
The same operation runs from a terminal as the-i18n-cli scaffold, whose page documents its flags.