@roomi-fields/notebooklm-mcp 1.7.5 → 1.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **Automate Google NotebookLM at scale. 33-endpoint HTTP REST API for n8n / Zapier / Make / curl, plus an MCP server for Claude Code / Cursor / Codex. Citation-backed Q&A, full Studio generation (audio · video · infographic · report · presentation · data table), multi-account rotation with auto-reauth.**
6
6
 
7
- > v1.7.5 — production-grade, batch-tested on overnight runs of 1 000+ questions. New: `batch_to_vault` is now a first-class MCP tool (no HTTP server required) on top of the existing `POST /batch-to-vault` endpoint. See [RTFM integration](./deployment/docs/14-RTFM-INTEGRATION.md) for the full pattern. [Compare with `PleasePrompto/notebooklm-mcp` v2.0.0](https://roomi-fields.github.io/notebooklm-mcp/compare) to see when this project is the right pick (REST API, full Studio, auto-reauth) and when the MCP-only upstream is.
7
+ > v1.7.7 — production-grade, batch-tested on overnight runs of 1 000+ questions. New: `batch_to_vault` is now a first-class MCP tool (no HTTP server required) on top of the existing `POST /batch-to-vault` endpoint. See [RTFM integration](./deployment/docs/14-RTFM-INTEGRATION.md) for the full pattern. [Compare with `PleasePrompto/notebooklm-mcp` v2.0.0](https://roomi-fields.github.io/notebooklm-mcp/compare) to see when this project is the right pick (REST API, full Studio, auto-reauth) and when the MCP-only upstream is.
8
8
 
9
9
  <!-- Badges -->
10
10
 
@@ -81,7 +81,7 @@ The fastest way to get NotebookLM into Claude Code. Distributed via the [`roomi-
81
81
  /plugin install notebooklm@roomi-fields
82
82
  ```
83
83
 
84
- That registers the MCP server, runs `npx -y @roomi-fields/notebooklm-mcp` automatically on first use (Node ≥ 18 required), and keeps you in sync with releases via `/plugin update`. Then run `npm run setup-auth` once to log into Google. To install RTFM at the same time: `/plugin install rtfm@roomi-fields`.
84
+ That registers the MCP server, runs `npx -y @roomi-fields/notebooklm-mcp@<pinned-version>` automatically (Node ≥ 18 required), and lets you upgrade with two commands when a new release ships: `/plugin marketplace update roomi-fields` then `/reload-plugins`. Then run `npm run setup-auth` once to log into Google. To install RTFM at the same time: `/plugin install rtfm@roomi-fields`.
85
85
 
86
86
  ### Option 1 — HTTP REST API (n8n, Zapier, Make, curl, any HTTP client)
87
87
 
@@ -174,7 +174,9 @@ See [ROADMAP.md](./ROADMAP.md) for planned features and version history.
174
174
 
175
175
  **Latest releases:**
176
176
 
177
- - **v1.7.5** — Three end-user bugs fixed: (1) `/plugin update` now actually upgrades the running MCP (npx pin in `plugin.json`); (2) `list_notebooks_from_nblm` no longer hardcodes `"Notebook"` as title id-based scrape returns real names; (3) `get_health.current_account` no longer returns a stale email after `re_auth`
177
+ - **v1.7.7** — `add_source` defensive patch: broaden selectors to cover the empty/fresh-notebook "Upload sources" CTA (EN+FR), and replace the bare `Could not find "Add source" button` error with a structured DOM dump (URL, title, top 25 buttons + their aria-label/text/class) so the next iteration can be precise. Not validated runtime the enriched diagnostic is the deliverable
178
+ - **v1.7.6** — Fixes two tools shipped in 1.7.4 without live-runtime validation: (1) `create_notebook` now waits for the final UUID-based URL (no more `notebook/creating/c`) and verifies the rename actually applied (returns `name_applied`/`actual_name`); (2) `delete_notebooks_from_nblm` now uses the same id-based DOM strategy as `list_notebooks_from_nblm` (the old `button[aria-labelledby*="project-"]` selector was broken on the current NotebookLM DOM)
179
+ - **v1.7.5** — Three end-user bugs fixed: (1) `/plugin marketplace update roomi-fields` + `/reload-plugins` now actually upgrades the running MCP (npx pin in `plugin.json`); (2) `list_notebooks_from_nblm` no longer hardcodes `"Notebook"` as title — id-based scrape returns real names; (3) `get_health.current_account` no longer returns a stale email after `re_auth`
178
180
  - **v1.7.4** — Expose `create_notebook` and `delete_notebooks_from_nblm` as MCP tools (handlers existed but lacked a tool definition + dispatch case); 30/30 alignment audit passes
179
181
  - **v1.7.3** — Fix: `list_notebooks_from_nblm` MCP tool was declared but unreachable (missing dispatch case) — now resolves correctly
180
182
  - **v1.7.2** — Claude Code plugin manifest (`.claude-plugin/plugin.json`) + cross-file version sync script enforced in CI; README "Install via Claude Code marketplace" one-liner
@@ -1 +1 @@
1
- {"version":3,"file":"content-manager.d.ts","sourceRoot":"","sources":["../../src/content/content-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,YAAY,CAAC;AAmC/D,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAMpB,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAO;gBAEP,IAAI,EAAE,IAAI;IAQtB;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkDtE;;OAEG;YACW,cAAc;IA8E5B;;OAEG;YACW,kBAAkB;IAyEhC;;OAEG;YACW,gBAAgB;IAyB9B;;OAEG;YACW,mBAAmB;IAsBjC;;OAEG;YACW,UAAU;IAsFxB;;OAEG;YACW,SAAS;IAiPvB;;OAEG;YACW,UAAU;IA+NxB;;OAEG;YACW,iBAAiB;IAmB/B;;OAEG;YACW,aAAa;IAoI3B;;OAEG;YACW,iBAAiB;IA0D/B;;;;;OAKG;YACW,uBAAuB;IA6VrC;;;;OAIG;YACW,eAAe;IA4D7B;;;OAGG;YACW,uBAAuB;IAoCrC;;OAEG;YACW,kBAAkB;IAiChC;;;;;;;;;;;;;;OAcG;IACG,eAAe,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAgCtF;;;;;;;;;;;;OAYG;YACW,sBAAsB;IA2BpC;;;;;;O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AgB,EAAE,CAAC;IA0BzD;;;;;;;;;;;;;;OAcG;IACG,eAAe,CACnB,WAAW,EAAE,WAAW,EACxB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,CAAC;IAmEjC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA4E7B;;OAEG;YACW,sBAAsB;IAiCpC;;OAEG;YACW,kBAAkB;IA6BhC;;OAEG;YACW,iBAAiB;IAgB/B;;;OAGG;IACG,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA2KxE;;;OAGG;YACW,gCAAgC;IA0F9C;;;OAGG;YACW,6BAA6B;IA4F3C;;;;;;;;OAQG;IACG,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IA+RvD;;OAEG;YACW,mBAAmB;IA8BjC;;;;;;;;OAQG;IACG,cAAc,CAAC,KAAK,GAAE,mBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4BpF;;OAEG;YACW,qBAAqB;IAyDnC;;;;OAIG;YACW,mBAAmB;IA6KjC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAmCxB;;;;;;;;;;;OAWG;IACG,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkFhF;;OAEG;YACW,eAAe;IA2F7B;;OAEG;YACW,+BAA+B;IA6E7C;;OAEG;YACW,YAAY;IAgF1B;;OAEG;YACW,kBAAkB;CAoFjC"}
1
+ {"version":3,"file":"content-manager.d.ts","sourceRoot":"","sources":["../../src/content/content-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,YAAY,CAAC;AAmC/D,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,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E;;;OAGG;YACW,gCAAgC;IA0F9C;;;OAGG;YACW,6BAA6B;IA4F3C;;;;;;;;OAQG;IACG,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IA+RvD;;OAEG;YACW,mBAAmB;IA8BjC;;;;;;;;OAQG;IACG,cAAc,CAAC,KAAK,GAAE,mBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA4BpF;;OAEG;YACW,qBAAqB;IAyDnC;;;;OAIG;YACW,mBAAmB;IA6KjC;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;IAmCxB;;;;;;;;;;;OAWG;IACG,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkFhF;;OAEG;YACW,eAAe;IA2F7B;;OAEG;YACW,+BAA+B;IA6E7C;;OAEG;YACW,YAAY;IAgF1B;;OAEG;YACW,kBAAkB;CAoFjC"}
@@ -114,11 +114,23 @@ export class ContentManager {
114
114
  'button[aria-label*="Add source"]',
115
115
  'button[aria-label*="Ajouter une source"]',
116
116
  'button[aria-label*="add source" i]',
117
+ // Empty / freshly-created notebook layouts: NotebookLM shows a centered
118
+ // "Upload sources" / "Choose files" CTA instead of the per-panel "+"
119
+ // button. Cover the variants that have been observed in the wild.
120
+ 'button[aria-label*="Upload" i]',
121
+ 'button[aria-label*="Téléverser" i]',
122
+ 'button[aria-label*="Importer" i]',
123
+ 'button[aria-label*="Choose" i]',
117
124
  // Icon button with "add" icon specifically
118
125
  'button:has(mat-icon:has-text("add"))',
119
126
  'button:has(mat-icon:has-text("add_circle"))',
120
127
  // Text-based patterns (bilingual via i18n)
121
128
  ...i18nSelectors('button:has-text("{text}")', 'buttons', 'addSource'),
129
+ // Empty-notebook CTA text patterns
130
+ 'button:has-text("Upload sources")',
131
+ 'button:has-text("Choose files")',
132
+ 'button:has-text("Téléverser")',
133
+ 'button:has-text("Importer")',
122
134
  // FAB buttons (floating action button for adding)
123
135
  'button.mat-fab',
124
136
  'button.mat-mini-fab',
@@ -145,7 +157,7 @@ export class ContentManager {
145
157
  const addButtons = await this.page.locator('button[aria-label]').all();
146
158
  for (const btn of addButtons) {
147
159
  const ariaLabel = await btn.getAttribute('aria-label');
148
- if (ariaLabel && /add|ajouter|upload|source/i.test(ariaLabel)) {
160
+ if (ariaLabel && /add|ajouter|upload|source|téléverser|importer/i.test(ariaLabel)) {
149
161
  if (await btn.isVisible()) {
150
162
  log.info(` ✅ Found add button via fallback: aria-label="${ariaLabel}"`);
151
163
  await btn.click();
@@ -158,9 +170,35 @@ export class ContentManager {
158
170
  catch {
159
171
  // Continue to debug
160
172
  }
161
- // Debug: log page content to help identify the correct selector
173
+ // All strategies failed. Capture an actionable dump of what we see on
174
+ // the page, embed it directly in the thrown error, AND save the screenshot
175
+ // — so the caller (an MCP agent) doesn't need separate filesystem access
176
+ // to diagnose. This replaces the old behaviour where the only signal
177
+ // bubbling up to the caller was the bare string `Could not find "Add source" button`.
162
178
  await this.debugPageContent();
163
- throw new Error('Could not find "Add source" button');
179
+ const observed = await this.page
180
+ .evaluate(`
181
+ (() => {
182
+ const buttons = Array.from(document.querySelectorAll('button')).slice(0, 25);
183
+ return {
184
+ url: location.href,
185
+ title: document.title,
186
+ buttonCount: document.querySelectorAll('button').length,
187
+ buttons: buttons.map(b => ({
188
+ ariaLabel: b.getAttribute('aria-label') || null,
189
+ text: (b.textContent || '').trim().slice(0, 80),
190
+ hasMatIcon: !!b.querySelector('mat-icon'),
191
+ classList: (b.getAttribute('class') || '').split(' ').slice(0, 4).join(' '),
192
+ visible: !!(b.offsetParent !== null),
193
+ })),
194
+ };
195
+ })()
196
+ `)
197
+ .catch((e) => ({ error: String(e) }));
198
+ throw new Error(`Could not find "Add source" button. None of ${addSourceSelectors.length} selectors matched on the current page. ` +
199
+ `Likely cause: NotebookLM DOM has shifted (e.g. freshly-created notebook shows a different "Upload" CTA). ` +
200
+ `Observed page state: ${JSON.stringify(observed, null, 2)}. ` +
201
+ `Debug screenshot also saved to ${path.join(CONFIG.dataDir, 'debug-add-source.png')}.`);
164
202
  }
165
203
  /**
166
204
  * Ensure we're on the Sources panel