@charlie.act7/gemini-notebook-mcp 2.1.2 → 2.3.0
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 +461 -434
- package/dist/auth/auth-manager.d.ts +2 -6
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +50 -58
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +18 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +69 -6
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +101 -48
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +7 -3
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +190 -35
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/library/types.d.ts +18 -0
- package/dist/library/types.d.ts.map +1 -1
- package/dist/notebooklm/artifact-store.d.ts +26 -0
- package/dist/notebooklm/artifact-store.d.ts.map +1 -0
- package/dist/notebooklm/artifact-store.js +102 -0
- package/dist/notebooklm/artifact-store.js.map +1 -0
- package/dist/notebooklm/audio.d.ts +3 -0
- package/dist/notebooklm/audio.d.ts.map +1 -1
- package/dist/notebooklm/audio.js +72 -39
- package/dist/notebooklm/audio.js.map +1 -1
- package/dist/notebooklm/chat.d.ts.map +1 -1
- package/dist/notebooklm/chat.js +22 -14
- package/dist/notebooklm/chat.js.map +1 -1
- package/dist/notebooklm/citations.d.ts +17 -22
- package/dist/notebooklm/citations.d.ts.map +1 -1
- package/dist/notebooklm/citations.js +148 -115
- package/dist/notebooklm/citations.js.map +1 -1
- package/dist/notebooklm/selectors.d.ts +54 -2
- package/dist/notebooklm/selectors.d.ts.map +1 -1
- package/dist/notebooklm/selectors.js +109 -2
- package/dist/notebooklm/selectors.js.map +1 -1
- package/dist/notebooklm/sources.d.ts +18 -3
- package/dist/notebooklm/sources.d.ts.map +1 -1
- package/dist/notebooklm/sources.js +128 -32
- package/dist/notebooklm/sources.js.map +1 -1
- package/dist/resources/resource-handlers.js +2 -2
- package/dist/resources/resource-handlers.js.map +1 -1
- package/dist/session/browser-session.d.ts +17 -10
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +165 -169
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +12 -7
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +120 -80
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +12 -10
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/tools/definitions/ask-question.d.ts +4 -3
- package/dist/tools/definitions/ask-question.d.ts.map +1 -1
- package/dist/tools/definitions/ask-question.js +9 -109
- package/dist/tools/definitions/ask-question.js.map +1 -1
- package/dist/tools/definitions/notebook-management.d.ts.map +1 -1
- package/dist/tools/definitions/notebook-management.js +47 -4
- package/dist/tools/definitions/notebook-management.js.map +1 -1
- package/dist/tools/definitions/session-management.d.ts.map +1 -1
- package/dist/tools/definitions/session-management.js +2 -0
- package/dist/tools/definitions/session-management.js.map +1 -1
- package/dist/tools/definitions/sources.d.ts +8 -0
- package/dist/tools/definitions/sources.d.ts.map +1 -1
- package/dist/tools/definitions/sources.js +152 -15
- package/dist/tools/definitions/sources.js.map +1 -1
- package/dist/tools/definitions/system.d.ts.map +1 -1
- package/dist/tools/definitions/system.js +23 -19
- package/dist/tools/definitions/system.js.map +1 -1
- package/dist/tools/definitions.d.ts +3 -3
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +5 -9
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers.d.ts +101 -14
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +280 -76
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/validation.d.ts +6 -0
- package/dist/tools/validation.d.ts.map +1 -0
- package/dist/tools/validation.js +267 -0
- package/dist/tools/validation.js.map +1 -0
- package/dist/transport/http.d.ts +2 -0
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +6 -1
- package/dist/transport/http.js.map +1 -1
- package/dist/types.d.ts +15 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cleanup-manager.d.ts +35 -115
- package/dist/utils/cleanup-manager.d.ts.map +1 -1
- package/dist/utils/cleanup-manager.js +179 -632
- package/dist/utils/cleanup-manager.js.map +1 -1
- package/dist/utils/disclaimer.d.ts +2 -1
- package/dist/utils/disclaimer.d.ts.map +1 -1
- package/dist/utils/disclaimer.js +3 -2
- package/dist/utils/disclaimer.js.map +1 -1
- package/dist/utils/logger.d.ts +26 -39
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +104 -50
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/operation.d.ts +8 -0
- package/dist/utils/operation.d.ts.map +1 -0
- package/dist/utils/operation.js +42 -0
- package/dist/utils/operation.js.map +1 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +3 -3
- package/dist/utils/page-utils.js.map +1 -1
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +17 -0
- package/dist/version.js.map +1 -0
- package/docs/configuration.md +205 -179
- package/docs/implementation-plan.md +135 -0
- package/docs/tools.md +473 -412
- package/docs/troubleshooting.md +161 -159
- package/docs/usage-guide.md +282 -282
- package/package.json +4 -3
package/docs/tools.md
CHANGED
|
@@ -1,423 +1,484 @@
|
|
|
1
|
-
# Tools
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
166
|
-
| `
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
|
205
|
-
|
|
206
|
-
| `
|
|
207
|
-
| `
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"name": "
|
|
216
|
-
"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
| `
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
1
|
+
# Tools
|
|
2
|
+
|
|
3
|
+
Browser-backed calls honor MCP request cancellation. Cancellation returns a
|
|
4
|
+
structured `CANCELLED` error; an unverified required selector returns
|
|
5
|
+
`UI_CHANGED` instead of an ambiguous empty result.
|
|
6
|
+
|
|
7
|
+
Every tool registered in the current 2.x release, with parameter schema, an example invocation (MCP `tools/call` arguments shape), and the expected return shape.
|
|
8
|
+
|
|
9
|
+
The server returns each tool result wrapped as `{ "success": true, "data": <object> }` (or `{ "success": false, "error": <string> }`). The shapes below describe the inner `data`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ask_question
|
|
14
|
+
|
|
15
|
+
Ask a question against a notebook. Reuses an existing browser session when `session_id` is supplied. Citation extraction reads the DOM citation panel after the answer settles.
|
|
16
|
+
|
|
17
|
+
**v2 additions**: `source_format`, `_provenance` envelope on the result, AI-generated answer prefix.
|
|
18
|
+
|
|
19
|
+
### Parameters
|
|
20
|
+
|
|
21
|
+
| Name | Type | Required | Notes |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `question` | string | yes | The question to ask. |
|
|
24
|
+
| `session_id` | string | no | Reuse an existing session for context. Omit to create a new one. |
|
|
25
|
+
| `notebook_id` | string | no | Library notebook ID. Falls back to active notebook. |
|
|
26
|
+
| `notebook_url` | string | no | Ad-hoc NotebookLM URL. Overrides `notebook_id`. |
|
|
27
|
+
| `source_format` | `none` \| `inline` \| `footnotes` \| `json` | no | Citation rendering. Default `none`. |
|
|
28
|
+
| `show_browser` | bool | no | Shorthand for `browser_options.show`. |
|
|
29
|
+
| `browser_options` | object | no | Per-call browser overrides — see [`docs/configuration.md`](./configuration.md#per-call-browser-options). |
|
|
30
|
+
|
|
31
|
+
### Example
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"name": "ask_question",
|
|
36
|
+
"arguments": {
|
|
37
|
+
"question": "How does the OAuth refresh token rotation work?",
|
|
38
|
+
"notebook_id": "auth-notebook",
|
|
39
|
+
"source_format": "footnotes"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Return shape
|
|
45
|
+
|
|
46
|
+
```jsonc
|
|
47
|
+
{
|
|
48
|
+
"status": "success",
|
|
49
|
+
"question": "How does the OAuth refresh token rotation work?",
|
|
50
|
+
"answer": "[AI-GENERATED ...] The refresh token is rotated each ...\n\nSources:\n[1] auth-spec.pdf — ...",
|
|
51
|
+
"session_id": "ses_…",
|
|
52
|
+
"notebook_url": "https://notebook.google.com/notebook/…",
|
|
53
|
+
"session_info": {
|
|
54
|
+
"age_seconds": 12,
|
|
55
|
+
"message_count": 3,
|
|
56
|
+
"last_activity": "2026-04-30T12:00:00.000Z"
|
|
57
|
+
},
|
|
58
|
+
"_provenance": {
|
|
59
|
+
"provider": "google-notebooklm",
|
|
60
|
+
"model": "google-managed",
|
|
61
|
+
"model_selection": "managed-by-notebooklm",
|
|
62
|
+
"via": "chrome-automation",
|
|
63
|
+
"grounding": "user-uploaded-documents",
|
|
64
|
+
"ai_generated": true
|
|
65
|
+
},
|
|
66
|
+
"source_format": "footnotes",
|
|
67
|
+
"sources": [
|
|
68
|
+
{
|
|
69
|
+
"marker": "[1]",
|
|
70
|
+
"number": 1,
|
|
71
|
+
"sourceName": "auth-spec.pdf",
|
|
72
|
+
"sourceText": "Refresh tokens MUST be rotated…",
|
|
73
|
+
"source_id": "source-42",
|
|
74
|
+
"source_name": "auth-spec.pdf",
|
|
75
|
+
"source_type": "pdf",
|
|
76
|
+
"source_url": null,
|
|
77
|
+
"location": { "page": 42 },
|
|
78
|
+
"excerpt": "Refresh tokens MUST be rotated…",
|
|
79
|
+
"extraction_status": "complete"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`sources` is omitted when `source_format=none` or when no citations were found. The camelCase fields remain for compatibility; v2.3 adds the structured snake_case fields. `extraction_status=partial` means the marker/name was detected but the excerpt panel could not be read within the shared eight-second budget.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## add_source — new in v2
|
|
90
|
+
|
|
91
|
+
Add a source to a notebook. v2.3 supports `type=url` (web crawl), `type=youtube` (public YouTube URL), and `type=text` (paste). File and Drive picker flows are not exposed yet.
|
|
92
|
+
|
|
93
|
+
### Parameters
|
|
94
|
+
|
|
95
|
+
| Name | Type | Required | Notes |
|
|
96
|
+
|---|---|---|---|
|
|
97
|
+
| `type` | `url` \| `youtube` \| `text` | yes | |
|
|
98
|
+
| `content` | string | yes | HTTPS URL for URL/YouTube, raw text for text. |
|
|
99
|
+
| `title` | string | no | Optional display title. NotebookLM picks a default. |
|
|
100
|
+
| `session_id` | string | no | Reuse an existing browser session. |
|
|
101
|
+
| `notebook_id` | string | no | Library notebook ID. |
|
|
102
|
+
| `notebook_url` | string | no | Ad-hoc URL. Overrides `notebook_id`. |
|
|
103
|
+
|
|
104
|
+
### Example
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"name": "add_source",
|
|
109
|
+
"arguments": {
|
|
110
|
+
"type": "url",
|
|
111
|
+
"content": "https://docs.n8n.io/code/builtin/json-jmespath/",
|
|
112
|
+
"title": "n8n JMESPath builtin"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Return shape
|
|
118
|
+
|
|
119
|
+
```jsonc
|
|
120
|
+
{
|
|
121
|
+
"result": {
|
|
122
|
+
"success": true,
|
|
123
|
+
"type": "url",
|
|
124
|
+
"sourceCountBefore": 12,
|
|
125
|
+
"sourceCountAfter": 13,
|
|
126
|
+
"source": {
|
|
127
|
+
"source_id": "src_…",
|
|
128
|
+
"name": "n8n JMESPath builtin",
|
|
129
|
+
"type": "web",
|
|
130
|
+
"status": "ready"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## list_sources / get_source / get_source_status — new in v2.3
|
|
139
|
+
|
|
140
|
+
`list_sources` inspects the live source sidebar and returns `{ sources, count }`. Each source contains `source_id`, `name`, inferred `type`, `status`, visible `url`, and `position`. `get_source` and its status-focused alias `get_source_status` accept either `source_id` or exact `name`, plus the normal notebook/session targeting fields. A missing source panel produces `UI_CHANGED`; it is not reported as an empty notebook.
|
|
141
|
+
|
|
142
|
+
## batch_add_sources — new in v2.3
|
|
143
|
+
|
|
144
|
+
Accepts `sources` (1–25 objects with the same `type`, `content`, and optional `title` fields as `add_source`) and optional `stop_on_error` (default `true`). Returns `{ results, added, failed }` and reuses one authenticated notebook session.
|
|
145
|
+
|
|
146
|
+
## generate_artifact / list_artifacts — new in v2.3
|
|
147
|
+
|
|
148
|
+
`generate_artifact` accepts `type: "audio_overview"`, optional `custom_prompt`, `wait_for_completion`, timeout, and notebook targeting. It returns a persistent job with `job_id`, `artifact_id`, `artifact_type`, `status`, and timestamps. `list_artifacts` reads those jobs without opening a browser and can filter by `notebook_id` or `notebook_url`.
|
|
149
|
+
|
|
150
|
+
## get_artifact_status / download_artifact — new in v2.3
|
|
151
|
+
|
|
152
|
+
Both accept the persistent `job_id`. Status refreshes the live Audio Overview state; download additionally requires `destination_dir` under `NOTEBOOKLM_OUTPUT_DIR` and stores `file_path` in the job. Jobs are stored in `artifact-jobs.json` under `NOTEBOOKLM_DATA_DIR` and survive MCP reconnects.
|
|
153
|
+
|
|
154
|
+
The legacy `generate_audio`, `get_audio_status`, and `download_audio` tools remain available for compatibility.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## generate_audio — new in v2
|
|
159
|
+
|
|
160
|
+
Generate a podcast-style Audio Overview for a notebook. It returns immediately by default; pass `wait_for_completion=true` for synchronous waiting.
|
|
161
|
+
|
|
162
|
+
### Parameters
|
|
163
|
+
|
|
164
|
+
| Name | Type | Required | Notes |
|
|
165
|
+
|---|---|---|---|
|
|
166
|
+
| `custom_prompt` | string | no | Optional focus prompt. |
|
|
167
|
+
| `timeout_ms` | number | no | Wait ceiling. Default `600000`. |
|
|
168
|
+
| `session_id` | string | no | |
|
|
169
|
+
| `notebook_id` | string | no | |
|
|
170
|
+
| `notebook_url` | string | no | |
|
|
171
|
+
|
|
172
|
+
### Example
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"name": "generate_audio",
|
|
177
|
+
"arguments": {
|
|
178
|
+
"custom_prompt": "Focus on the migration strategy",
|
|
179
|
+
"timeout_ms": 900000
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Return shape
|
|
185
|
+
|
|
186
|
+
```jsonc
|
|
187
|
+
{
|
|
188
|
+
"status": "success",
|
|
189
|
+
"ready": true,
|
|
190
|
+
"duration_ms": 412000
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Pair with `download_audio` to persist the file. Video / Infographic / Slides are not currently exposed.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## download_audio — new in v2
|
|
199
|
+
|
|
200
|
+
Download the most recent Audio Overview to disk.
|
|
201
|
+
|
|
202
|
+
### Parameters
|
|
203
|
+
|
|
204
|
+
| Name | Type | Required | Notes |
|
|
205
|
+
|---|---|---|---|
|
|
206
|
+
| `destination_dir` | string | yes | Directory under `NOTEBOOKLM_OUTPUT_DIR`; `.` selects the configured root. Created if missing. |
|
|
207
|
+
| `session_id` | string | no | |
|
|
208
|
+
| `notebook_id` | string | no | |
|
|
209
|
+
| `notebook_url` | string | no | |
|
|
210
|
+
|
|
211
|
+
### Example
|
|
212
|
+
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"name": "download_audio",
|
|
216
|
+
"arguments": {
|
|
217
|
+
"destination_dir": "."
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Return shape
|
|
223
|
+
|
|
224
|
+
```jsonc
|
|
225
|
+
{
|
|
226
|
+
"status": "success",
|
|
227
|
+
"file_path": "<NOTEBOOKLM_OUTPUT_DIR>/overview-2026-04-30.m4a",
|
|
228
|
+
"size_bytes": 9_412_000
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Run `generate_audio` first if no Audio Overview exists yet.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## add_notebook
|
|
237
|
+
|
|
238
|
+
Add a NotebookLM share-URL to the local library. The tool description enforces a confirmation workflow on the host agent — do not call without explicit user consent.
|
|
239
|
+
|
|
240
|
+
### Parameters
|
|
241
|
+
|
|
242
|
+
| Name | Type | Required | Notes |
|
|
243
|
+
|---|---|---|---|
|
|
244
|
+
| `url` | string | yes | NotebookLM share URL. |
|
|
245
|
+
| `name` | string | yes | Display name. |
|
|
246
|
+
| `description` | string | yes | Short description of the notebook content. |
|
|
247
|
+
| `topics` | string[] | yes | Topics covered. |
|
|
248
|
+
| `content_types` | string[] | no | e.g. `["documentation", "examples"]`. |
|
|
249
|
+
| `use_cases` | string[] | no | When to consult this notebook. |
|
|
250
|
+
| `tags` | string[] | no | Optional organizational tags. |
|
|
251
|
+
|
|
252
|
+
### Return shape
|
|
253
|
+
|
|
254
|
+
```jsonc
|
|
255
|
+
{
|
|
256
|
+
"status": "added",
|
|
257
|
+
"id": "nb_abcd",
|
|
258
|
+
"name": "n8n Documentation",
|
|
259
|
+
"active": true
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## list_notebooks
|
|
266
|
+
|
|
267
|
+
No parameters. Returns the full library.
|
|
268
|
+
|
|
269
|
+
### Return shape
|
|
270
|
+
|
|
271
|
+
```jsonc
|
|
272
|
+
{
|
|
273
|
+
"notebooks": [
|
|
274
|
+
{
|
|
275
|
+
"id": "1cf83fd8-91d2-43f2-b9dc-e3f159c2993d",
|
|
276
|
+
"slug": "n8n-documentation",
|
|
277
|
+
"google_notebook_id": "…",
|
|
278
|
+
"name": "n8n Documentation",
|
|
279
|
+
"url": "https://notebook.google.com/notebook/…",
|
|
280
|
+
"description": "n8n core + builtin nodes",
|
|
281
|
+
"topics": ["workflow automation", "n8n"],
|
|
282
|
+
"use_cases": ["building n8n workflows"],
|
|
283
|
+
"tags": ["docs"],
|
|
284
|
+
"use_count": 42,
|
|
285
|
+
"source_count": 18,
|
|
286
|
+
"sync_status": "available"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## list_account_notebooks
|
|
295
|
+
|
|
296
|
+
No parameters. Opens the live signed-in NotebookLM home grid and returns Google notebook IDs, names, URLs, visible modification text, and source counts.
|
|
297
|
+
|
|
298
|
+
## import_account_notebook — new in v2.3
|
|
299
|
+
|
|
300
|
+
Requires `google_notebook_id` from `list_account_notebooks`. Optional `description`, `topics`, `content_types`, `use_cases`, and `tags` seed local metadata. Import is idempotent and stores a new local UUID separately from the Google ID.
|
|
301
|
+
|
|
302
|
+
## sync_library — new in v2.3
|
|
303
|
+
|
|
304
|
+
Accepts optional `apply` (default `false`). Preview reports `added`, `updated`, `missing`, and `unchanged`. Applying adds account notebooks, tracks renames/source counts, and marks inaccessible notebooks as `missing`; it never deletes local entries.
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## get_notebook
|
|
309
|
+
|
|
310
|
+
| Name | Type | Required |
|
|
311
|
+
|---|---|---|
|
|
312
|
+
| `id` | string | yes |
|
|
313
|
+
|
|
314
|
+
Returns one entry from `list_notebooks`.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## select_notebook
|
|
319
|
+
|
|
320
|
+
Set a notebook as the active default.
|
|
321
|
+
|
|
322
|
+
| Name | Type | Required |
|
|
323
|
+
|---|---|---|
|
|
324
|
+
| `id` | string | yes |
|
|
325
|
+
|
|
326
|
+
### Return shape
|
|
327
|
+
|
|
328
|
+
```jsonc
|
|
329
|
+
{ "status": "active", "id": "nb_abcd", "name": "n8n Documentation" }
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## update_notebook
|
|
335
|
+
|
|
336
|
+
| Name | Type | Required |
|
|
337
|
+
|---|---|---|
|
|
338
|
+
| `id` | string | yes |
|
|
339
|
+
| `name` | string | no |
|
|
340
|
+
| `description` | string | no |
|
|
341
|
+
| `topics` | string[] | no |
|
|
342
|
+
| `content_types` | string[] | no |
|
|
343
|
+
| `use_cases` | string[] | no |
|
|
344
|
+
| `tags` | string[] | no |
|
|
345
|
+
| `url` | string | no |
|
|
346
|
+
|
|
347
|
+
Returns the updated entry.
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## remove_notebook
|
|
352
|
+
|
|
353
|
+
Removes the entry from the local library only — does not delete the notebook in NotebookLM.
|
|
354
|
+
|
|
355
|
+
| Name | Type | Required |
|
|
356
|
+
|---|---|---|
|
|
357
|
+
| `id` | string | yes |
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## search_notebooks
|
|
362
|
+
|
|
363
|
+
Searches name, description, topics, tags.
|
|
364
|
+
|
|
365
|
+
| Name | Type | Required |
|
|
366
|
+
|---|---|---|
|
|
367
|
+
| `query` | string | yes |
|
|
368
|
+
|
|
369
|
+
Returns an array of matching entries.
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## get_library_stats
|
|
374
|
+
|
|
375
|
+
No parameters. Returns total notebooks, total queries, top-used notebooks.
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## list_sessions
|
|
380
|
+
|
|
381
|
+
No parameters. Returns active sessions with age, message count, last-activity timestamp.
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## close_session
|
|
386
|
+
|
|
387
|
+
| Name | Type | Required |
|
|
388
|
+
|---|---|---|
|
|
389
|
+
| `session_id` | string | yes |
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## reset_session
|
|
394
|
+
|
|
395
|
+
Clears chat history while keeping the same `session_id`.
|
|
396
|
+
|
|
397
|
+
| Name | Type | Required |
|
|
398
|
+
|---|---|---|
|
|
399
|
+
| `session_id` | string | yes |
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## get_health
|
|
404
|
+
|
|
405
|
+
No parameters.
|
|
406
|
+
|
|
407
|
+
### Return shape
|
|
408
|
+
|
|
409
|
+
```jsonc
|
|
350
410
|
{
|
|
351
411
|
"status": "ok",
|
|
352
412
|
"auth_state_present": true,
|
|
353
413
|
"authenticated": null,
|
|
354
414
|
"authentication_check": "Authentication is verified when opening NotebookLM",
|
|
355
415
|
"active_sessions": 1,
|
|
356
|
-
"version": "2.0.0",
|
|
357
|
-
"config": {
|
|
358
|
-
"headless": true,
|
|
359
|
-
"stealth_enabled": true,
|
|
360
|
-
"max_sessions": 10,
|
|
361
|
-
"answer_timeout_ms": 600000
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
```
|
|
365
|
-
|
|
416
|
+
"version": "2.0.0",
|
|
417
|
+
"config": {
|
|
418
|
+
"headless": true,
|
|
419
|
+
"stealth_enabled": true,
|
|
420
|
+
"max_sessions": 10,
|
|
421
|
+
"answer_timeout_ms": 600000
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
366
426
|
`auth_state_present` means that `state.json` exists, is readable, and contains a
|
|
367
427
|
cookie array. It is not proof that Google currently accepts those cookies.
|
|
368
428
|
`authenticated` is therefore `null`; live authentication is checked when a
|
|
369
429
|
browser-driven NotebookLM tool opens the service. A missing backup may produce a
|
|
370
430
|
non-destructive tip, but never justifies `re_auth` or `cleanup_data` by itself.
|
|
371
|
-
|
|
372
|
-
---
|
|
373
|
-
|
|
374
|
-
## setup_auth
|
|
375
|
-
|
|
376
|
-
Opens a visible Chrome for first-time Google login.
|
|
377
|
-
|
|
378
|
-
| Name | Type | Required | Notes |
|
|
379
|
-
|---|---|---|---|
|
|
380
|
-
| `show_browser` | bool | no | Default `true` for setup. |
|
|
381
|
-
| `browser_options` | object | no | Same shape as `ask_question`. |
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
---
|
|
386
|
-
|
|
387
|
-
## re_auth
|
|
388
|
-
|
|
389
|
-
Closes all sessions, deletes saved cookies + Chrome profile, opens a fresh login window.
|
|
390
|
-
|
|
391
|
-
| Name | Type | Required | Notes |
|
|
392
|
-
|---|---|---|---|
|
|
393
|
-
| `show_browser` | bool | no | Default `true`. |
|
|
394
|
-
| `browser_options` | object | no | |
|
|
395
|
-
|
|
396
|
-
---
|
|
397
|
-
|
|
398
|
-
## cleanup_data
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
| Name | Type | Required | Notes |
|
|
403
|
-
|---|---|---|---|
|
|
404
|
-
| `confirm` | bool | yes | `false` = preview only. `true` =
|
|
405
|
-
| `preserve_library` | bool | no | Keep `library.json` while wiping everything else. Default `false`. |
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
| `notebooklm://library
|
|
421
|
-
| `notebooklm://
|
|
422
|
-
|
|
423
|
-
|
|
431
|
+
|
|
432
|
+
---
|
|
433
|
+
|
|
434
|
+
## setup_auth
|
|
435
|
+
|
|
436
|
+
Opens a visible Chrome for first-time Google login.
|
|
437
|
+
|
|
438
|
+
| Name | Type | Required | Notes |
|
|
439
|
+
|---|---|---|---|
|
|
440
|
+
| `show_browser` | bool | no | Default `true` for setup. |
|
|
441
|
+
| `browser_options` | object | no | Same shape as `ask_question`. |
|
|
442
|
+
|
|
443
|
+
The call waits for login completion for up to 10 minutes and reports progress. A subsequent NotebookLM operation performs the live authentication check; `get_health` only reports saved-state presence.
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## re_auth
|
|
448
|
+
|
|
449
|
+
Closes all sessions, deletes saved cookies + Chrome profile, opens a fresh login window.
|
|
450
|
+
|
|
451
|
+
| Name | Type | Required | Notes |
|
|
452
|
+
|---|---|---|---|
|
|
453
|
+
| `show_browser` | bool | no | Default `true`. |
|
|
454
|
+
| `browser_options` | object | no | |
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## cleanup_data
|
|
459
|
+
|
|
460
|
+
Preview + deletion restricted to the configured `NOTEBOOKLM_DATA_DIR`. The tool never scans or deletes npm caches, Claude/Cursor/VS Code data, system temporary files, or trash.
|
|
461
|
+
|
|
462
|
+
| Name | Type | Required | Notes |
|
|
463
|
+
|---|---|---|---|
|
|
464
|
+
| `confirm` | bool | yes | `false` = preview only. `true` = execute using the preview token. |
|
|
465
|
+
| `preserve_library` | bool | no | Keep `library.json` while wiping everything else. Default `false`. |
|
|
466
|
+
| `preview_token` | string | when confirming | Expiring one-time token returned by the preview. |
|
|
467
|
+
|
|
468
|
+
Workflow:
|
|
469
|
+
|
|
470
|
+
1. `cleanup_data({ confirm: false, preserve_library: true })` — review paths, digest, and expiry.
|
|
471
|
+
2. Close all browser sessions.
|
|
472
|
+
3. `cleanup_data({ confirm: true, preview_token: "..." })` — execute only if the manifest is unchanged.
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Resources (read-only)
|
|
477
|
+
|
|
478
|
+
| URI | Purpose |
|
|
479
|
+
|---|---|
|
|
480
|
+
| `notebooklm://library` | JSON view of the full library. |
|
|
481
|
+
| `notebooklm://library/{id}` | One notebook by ID. The `{id}` template autocompletes from the library. |
|
|
482
|
+
| `notebooklm://metadata` | Deprecated. Use `notebooklm://library` instead. |
|
|
483
|
+
|
|
484
|
+
The MCP server does not respond to `mcp://notebooklm` — that URI scheme never existed. Use `notebooklm://`.
|