MCP Tools

discover

Describe the project: detected config, locale directories per layer with file counts and top-level namespaces, the layer graph, and the hand-maintained locales. Call this first to understand the project before reading or writing translations. The result also names the active translation mode ("provider" when the server has an env-configured LLM provider, "agent" otherwise). layerGraph answers where a new key belongs: a key used by more than one app belongs in a layer those apps share, and layerGraph.shared names those layers.

Parameters

ParameterTypeRequiredDescription
includeTranslationGuidancebooleannoKeep the translation prose in projectConfig — glossary, translationPrompt, localeNotes, examples and context. Default: true at a terminal, false for a tool call, which omits those five fields and sets projectConfig.translationGuidanceOmitted instead. Every structural field (layerRules, protectedLocales, declaredNamespaces, orphanScan, translationMemory) is returned either way.
projectDirstringnoAbsolute path to the project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app".

Result

FieldTypeDescription
frameworkstringDetected framework, e.g. "nuxt", "laravel". Absent when nothing was detected.
rootDirstringAbsolute path to the project root.
defaultLocalestringDefault locale code — the source locale every translate call falls back to.
fallbackLocaleRecord<string, string[]>The framework's fallback chain. Empty when the framework declares none.
localesobject[]Every locale of the project.
localeDirsobject[]Every locale directory, one per layer, alias layers included.
layerRootDirsstring[]Absolute root directories of every layer, which is what source scanning walks.
projectConfigobjectThe declared config from i18n-kit.config.ts or .i18n-mcp.json, as written — or without its translation prose, flagged. Absent when the project has none.
localeFileFormat"json" | "php-array" | "yaml"Format of the locale files. Absent means the default, "json".
appsobject[]Apps and the layers each consumes — the consumer graph orphan scoping reads.
protectedLocalesstring[]Canonical codes of the locales the translate operations leave alone. Empty when none are protected.
layersobject[]One entry per locale directory, with file counts and key namespaces.
layerGraphobjectWhich layers are shared and which apps consume which layer — what answers where a new key belongs.
translationMode"provider" | "agent"Added by the server: whether it has an LLM provider configured ("provider") or hands back contexts to translate inline ("agent"). Check this before calling a translating tool.
translationProviderstringAdded by the server: the configured provider name. Absent in agent mode.
translationModelstringAdded by the server: the configured model name. Absent in agent mode.

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 discover, whose page documents its flags.

Copyright © 2026