MCP Tools

search_translations

Search translation files by key path or value, one compact row per matching key rather than one per key and locale. Useful for finding an existing translation before adding a duplicate of it. A key that seven layers and thirty locales define comes back as a single row: layers names every layer that defines it, which is what tells reuse from duplication, and value is the one the reference locale holds. Pass includeLocales for the detail rows — one per key and locale — when what each locale holds is the question. Matching is a case-insensitive substring unless matchMode says otherwise.

Parameters

ParameterTypeRequiredDescription
querystringyesText to search for, matched against keys and/or values. Compared as a case-insensitive substring unless matchMode says otherwise. Example: "save" matches the key "common.actions.save" and the value "Save changes".
searchIn"keys" | "values" | "both"noWhether to search translation keys, values, or both. Default: "both".
matchMode"contains" | "exact" | "fuzzy"noHow query is compared. "contains" is a case-insensitive substring, over every locale searched. "exact" is the whole string, and "fuzzy" also accepts near-misses in wording, both ignoring case, accents, punctuation and whitespace and both comparing against one locale only — locale when given, otherwise the project default. Default: "contains".
layerstringnoLayer name to search in (e.g., "root", "app-admin"), or "*" for all layers. If omitted, searches every layer.
localestringnoLocale code to search in (e.g., "en", "de"). If omitted, searches every locale.
includeLocalesbooleannoReturn one row per key and locale — layer, locale, key, value — instead of one row per key. Several times the output for the same findings, so ask for it when the per-locale values are what you are after. Default: false.
limitintegernoMaximum number of matching rows 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.
offsetintegernoNumber of matching rows to skip before returning any. Default: 0. Pass the nextOffset of a truncated result to continue where it stopped.
outputFilestringnoAbsolute path to write the full JSON output to. Only a compact summary is returned to the caller, which is what you want for a result too large to read in one piece. Example: ".i18n-reports/search-results.json"
projectDirstringnoAbsolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".

Result

FieldTypeDescription
matchesobject[]One row per key by default; one row per key and locale when includeLocales was passed.
totalMatchesintegerNumber of rows the search found, whichever shape they are in — before limit, so it exceeds the rows in matches when truncated.
truncatedbooleanTrue when limit cut the result short. The totals still count everything.
nextOffsetintegerThe offset to pass to continue where this result stopped. Present only when truncated.
messagestringThe step to take next — how to continue a capped read. Present when there is one.
reportFilestringAbsolute path the full JSON result was written to. Read the file for the findings; the summary below is all that came back.
summaryobjectThe counts from the full result, so a caller can act on them without reading the file.

Behavior Hints

A host reads these to decide whether a call needs your confirmation first.

HintValue
readOnlyHinttrue
openWorldHintfalse

Paired CLI Command

The same operation runs from a terminal as the-i18n-cli search, whose page documents its flags.

Copyright © 2026