List Namespaces
list_namespacesLists translation keys grouped by namespace prefix with counts per node. Use it to explore available keys, filter by layer or locale, and page large results without guessing path prefixes.
Instructions
List the translation key tree grouped by namespace prefix, with a count per namespace node. Use this to explore the available keys without guessing path prefixes. limit counts top-level namespace nodes across the scanned layers, each of which brings its whole subtree; totalNamespaces counts them all, whatever the limit let through.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | No | Layer name to filter by (e.g., "root", "app-admin"). If omitted or "*", scans all layers. Call discover to list the layers. | |
| limit | No | Maximum number of top-level namespaces to return. Default: 100 for a tool call, unlimited at a terminal. When the cap applies the result carries truncated: true and nextOffset — call again with offset set to that value for the next page, or narrow the request instead. | |
| locale | No | Locale code to read from (e.g., "en", "en-US"). Defaults to the project default locale. Keys are the same across locales, so one is enough. | |
| offset | No | Number of top-level namespaces to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped. | |
| projectDir | No | Absolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layers | Yes | One entry per scanned layer. Alias layers are skipped. | |
| message | No | The step to take next — how to continue a capped read. Present when there is one. | |
| truncated | Yes | True when limit cut the result short. The totals still count everything. | |
| nextOffset | No | The offset to pass to continue where this result stopped. Present only when truncated. | |
| totalNamespaces | Yes | Top-level namespaces across every scanned layer, before limit. A namespace brings its whole subtree, so this is what limit counts. |