Skip to content

content_generate / generate_mind_map return French output — uiLocale defaults to 'fr' and overrides the language parameter #34

Description

@Javiergomezdev

Summary

content_generate and generate_mind_map produce output in French, ignoring the language parameter, because the UI locale is hardcoded to fr by default and leaks into the generation request.

The notebook, the sources and the Google account are all Spanish. Chat answers (notebook_ask) come back in Spanish correctly — only the generated artifacts are affected.

What gave it away

A transient failure surfaced the URL the server actually navigates to:

page.goto: net::ERR_CONNECTION_CLOSED at
https://notebooklm.google.com/notebook/<id>?hl=fr

?hl=fr is appended regardless of the language argument passed to the tool.

Root cause

src/config.ts:156 sets the default:

uiLocale: 'fr',

and parseLocale (src/config.ts:211-220) only accepts four values:

if (lower === 'fr' || lower === 'en' || lower === 'de' || lower === 'ja') {
  return lower;
}
return defaultValue;   // silently falls back to 'fr'

I understand why hl= is forced — the comment in src/session/browser-session.ts:81 and the test in src/__tests__/notebook-domain.test.ts:38 explain that text selectors are written against one UI language, and letting Google pick the account language would silently break them. That reasoning is sound. The problem is the side effect on generated content.

Steps to reproduce

  1. Notebook with Spanish sources, Google account in Spanish.
  2. content_generate({ content_type: "audio_overview", language: "Spanish", custom_instructions: "<in Spanish>" })
  3. The audio is generated, but titled Vendre l'automatisation sans parler technique — French.

Same with generate_mind_map: every node comes back in French (Détection d'Opportunités, Règles d'Or, …) even though the sources contain no French at all.

generate_mind_map has no language parameter, so there is no way to steer it from the call site.

Impact

The tool succeeds and reports status: "ready", so nothing signals that the artifact is unusable. In my case the deliverable was sales onboarding material for a Spanish-speaking team — silently getting French back is worse than a hard failure, because it only surfaces when someone opens the file.

Workaround

Setting NOTEBOOKLM_UI_LOCALE=en in the MCP server env avoids French. Spanish is not selectable, since parseLocale rejects anything outside the four supported locales and falls back to fr.

Suggested fixes

Roughly in order of effort:

  1. Do not let uiLocale reach the content-generation request. The selector-stability argument applies to driving the UI; it should not dictate the language of the artifact. If the generation flow can take a separate locale, pass the caller's language there.
  2. Warn on silent fallback. parseLocale currently discards an unsupported value without a word. Logging NOTEBOOKLM_UI_LOCALE=es not supported, falling back to fr would have saved a long debugging session.
  3. Give generate_mind_map a language parameter, matching content_generate.
  4. Document the fr default and its effect on generated content in the README — it is surprising, and nothing in the tool descriptions hints at it.

Happy to test a patch. Thanks for the project — the dual RPC + Playwright fallback is what made me pick it over the alternatives.


Environment: @roomi-fields/notebooklm-mcp via npx -y, macOS, Claude Code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions