@charlie.act7/gemini-notebook-mcp 2.1.3 → 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 +446 -434
- package/dist/auth/auth-manager.d.ts +2 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +27 -26
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/errors.d.ts +10 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +19 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.js +53 -17
- 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 +162 -14
- 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.map +1 -1
- package/dist/notebooklm/audio.js +13 -37
- 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 +16 -1
- package/dist/notebooklm/sources.d.ts.map +1 -1
- package/dist/notebooklm/sources.js +123 -27
- package/dist/notebooklm/sources.js.map +1 -1
- package/dist/session/browser-session.d.ts +15 -9
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +123 -154
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +1 -1
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +47 -36
- package/dist/session/session-manager.js.map +1 -1
- package/dist/tools/definitions/notebook-management.d.ts.map +1 -1
- package/dist/tools/definitions/notebook-management.js +43 -0
- package/dist/tools/definitions/notebook-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 +144 -8
- package/dist/tools/definitions/sources.js.map +1 -1
- package/dist/tools/handlers.d.ts +94 -13
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +222 -19
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/validation.d.ts.map +1 -1
- package/dist/tools/validation.js +108 -1
- package/dist/tools/validation.js.map +1 -1
- package/dist/transport/http.d.ts +2 -0
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +4 -0
- package/dist/transport/http.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.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/docs/configuration.md +184 -182
- package/docs/implementation-plan.md +26 -2
- package/docs/tools.md +469 -410
- package/docs/troubleshooting.md +176 -176
- package/docs/usage-guide.md +285 -285
- package/package.json +71 -69
package/docs/tools.md
CHANGED
|
@@ -1,425 +1,484 @@
|
|
|
1
|
-
# Tools
|
|
2
|
-
|
|
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
|
+
|
|
3
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.
|
|
4
|
-
|
|
5
|
-
The server returns each tool result wrapped as `{ "success": true, "data": <object> }` (or `{ "success": false, "error": <string> }`). The shapes below describe the inner `data`.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## ask_question
|
|
10
|
-
|
|
11
|
-
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.
|
|
12
|
-
|
|
13
|
-
**v2 additions**: `source_format`, `_provenance` envelope on the result, AI-generated answer prefix.
|
|
14
|
-
|
|
15
|
-
### Parameters
|
|
16
|
-
|
|
17
|
-
| Name | Type | Required | Notes |
|
|
18
|
-
|---|---|---|---|
|
|
19
|
-
| `question` | string | yes | The question to ask. |
|
|
20
|
-
| `session_id` | string | no | Reuse an existing session for context. Omit to create a new one. |
|
|
21
|
-
| `notebook_id` | string | no | Library notebook ID. Falls back to active notebook. |
|
|
22
|
-
| `notebook_url` | string | no | Ad-hoc NotebookLM URL. Overrides `notebook_id`. |
|
|
23
|
-
| `source_format` | `none` \| `inline` \| `footnotes` \| `json` | no | Citation rendering. Default `none`. |
|
|
24
|
-
| `show_browser` | bool | no | Shorthand for `browser_options.show`. |
|
|
25
|
-
| `browser_options` | object | no | Per-call browser overrides — see [`docs/configuration.md`](./configuration.md#per-call-browser-options). |
|
|
26
|
-
|
|
27
|
-
### Example
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"name": "ask_question",
|
|
32
|
-
"arguments": {
|
|
33
|
-
"question": "How does the OAuth refresh token rotation work?",
|
|
34
|
-
"notebook_id": "auth-notebook",
|
|
35
|
-
"source_format": "footnotes"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Return shape
|
|
41
|
-
|
|
42
|
-
```jsonc
|
|
43
|
-
{
|
|
44
|
-
"status": "success",
|
|
45
|
-
"question": "How does the OAuth refresh token rotation work?",
|
|
46
|
-
"answer": "[AI-GENERATED ...] The refresh token is rotated each ...\n\nSources:\n[1] auth-spec.pdf — ...",
|
|
47
|
-
"session_id": "ses_…",
|
|
48
|
-
"notebook_url": "https://notebook.google.com/notebook/…",
|
|
49
|
-
"session_info": {
|
|
50
|
-
"age_seconds": 12,
|
|
51
|
-
"message_count": 3,
|
|
52
|
-
"last_activity": "2026-04-30T12:00:00.000Z"
|
|
53
|
-
},
|
|
54
|
-
"_provenance": {
|
|
55
|
-
"provider": "google-notebooklm",
|
|
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",
|
|
56
60
|
"model": "google-managed",
|
|
57
61
|
"model_selection": "managed-by-notebooklm",
|
|
58
|
-
"via": "chrome-automation",
|
|
59
|
-
"grounding": "user-uploaded-documents",
|
|
60
|
-
"ai_generated": true
|
|
61
|
-
},
|
|
62
|
-
"source_format": "footnotes",
|
|
63
|
-
"sources": [
|
|
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
|
-
|
|
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
|
+
|
|
152
194
|
Pair with `download_audio` to persist the file. Video / Infographic / Slides are not currently exposed.
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## download_audio — new in v2
|
|
157
|
-
|
|
158
|
-
Download the most recent Audio Overview to disk.
|
|
159
|
-
|
|
160
|
-
### Parameters
|
|
161
|
-
|
|
162
|
-
| Name | Type | Required | Notes |
|
|
163
|
-
|---|---|---|---|
|
|
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
|
+
|---|---|---|---|
|
|
164
206
|
| `destination_dir` | string | yes | Directory under `NOTEBOOKLM_OUTPUT_DIR`; `.` selects the configured root. Created if missing. |
|
|
165
|
-
| `session_id` | string | no | |
|
|
166
|
-
| `notebook_id` | string | no | |
|
|
167
|
-
| `notebook_url` | string | no | |
|
|
168
|
-
|
|
169
|
-
### Example
|
|
170
|
-
|
|
171
|
-
```json
|
|
172
|
-
{
|
|
173
|
-
"name": "download_audio",
|
|
174
|
-
"arguments": {
|
|
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": {
|
|
175
217
|
"destination_dir": "."
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Return shape
|
|
181
|
-
|
|
182
|
-
```jsonc
|
|
183
|
-
{
|
|
184
|
-
"status": "success",
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Return shape
|
|
223
|
+
|
|
224
|
+
```jsonc
|
|
225
|
+
{
|
|
226
|
+
"status": "success",
|
|
185
227
|
"file_path": "<NOTEBOOKLM_OUTPUT_DIR>/overview-2026-04-30.m4a",
|
|
186
|
-
"size_bytes": 9_412_000
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
Run `generate_audio` first if no Audio Overview exists yet.
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## add_notebook
|
|
195
|
-
|
|
196
|
-
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.
|
|
197
|
-
|
|
198
|
-
### Parameters
|
|
199
|
-
|
|
200
|
-
| Name | Type | Required | Notes |
|
|
201
|
-
|---|---|---|---|
|
|
202
|
-
| `url` | string | yes | NotebookLM share URL. |
|
|
203
|
-
| `name` | string | yes | Display name. |
|
|
204
|
-
| `description` | string | yes | Short description of the notebook content. |
|
|
205
|
-
| `topics` | string[] | yes | Topics covered. |
|
|
206
|
-
| `content_types` | string[] | no | e.g. `["documentation", "examples"]`. |
|
|
207
|
-
| `use_cases` | string[] | no | When to consult this notebook. |
|
|
208
|
-
| `tags` | string[] | no | Optional organizational tags. |
|
|
209
|
-
|
|
210
|
-
### Return shape
|
|
211
|
-
|
|
212
|
-
```jsonc
|
|
213
|
-
{
|
|
214
|
-
"status": "added",
|
|
215
|
-
"id": "nb_abcd",
|
|
216
|
-
"name": "n8n Documentation",
|
|
217
|
-
"active": true
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
## list_notebooks
|
|
224
|
-
|
|
225
|
-
No parameters. Returns the full library.
|
|
226
|
-
|
|
227
|
-
### Return shape
|
|
228
|
-
|
|
229
|
-
```jsonc
|
|
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
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
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
|
|
410
|
+
{
|
|
411
|
+
"status": "ok",
|
|
412
|
+
"auth_state_present": true,
|
|
413
|
+
"authenticated": null,
|
|
414
|
+
"authentication_check": "Authentication is verified when opening NotebookLM",
|
|
415
|
+
"active_sessions": 1,
|
|
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
|
+
|
|
426
|
+
`auth_state_present` means that `state.json` exists, is readable, and contains a
|
|
427
|
+
cookie array. It is not proof that Google currently accepts those cookies.
|
|
428
|
+
`authenticated` is therefore `null`; live authentication is checked when a
|
|
429
|
+
browser-driven NotebookLM tool opens the service. A missing backup may produce a
|
|
430
|
+
non-destructive tip, but never justifies `re_auth` or `cleanup_data` by itself.
|
|
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
|
+
|
|
384
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.
|
|
385
|
-
|
|
386
|
-
---
|
|
387
|
-
|
|
388
|
-
## re_auth
|
|
389
|
-
|
|
390
|
-
Closes all sessions, deletes saved cookies + Chrome profile, opens a fresh login window.
|
|
391
|
-
|
|
392
|
-
| Name | Type | Required | Notes |
|
|
393
|
-
|---|---|---|---|
|
|
394
|
-
| `show_browser` | bool | no | Default `true`. |
|
|
395
|
-
| `browser_options` | object | no | |
|
|
396
|
-
|
|
397
|
-
---
|
|
398
|
-
|
|
399
|
-
## cleanup_data
|
|
400
|
-
|
|
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
|
+
|
|
401
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.
|
|
402
|
-
|
|
403
|
-
| Name | Type | Required | Notes |
|
|
404
|
-
|---|---|---|---|
|
|
461
|
+
|
|
462
|
+
| Name | Type | Required | Notes |
|
|
463
|
+
|---|---|---|---|
|
|
405
464
|
| `confirm` | bool | yes | `false` = preview only. `true` = execute using the preview token. |
|
|
406
465
|
| `preserve_library` | bool | no | Keep `library.json` while wiping everything else. Default `false`. |
|
|
407
466
|
| `preview_token` | string | when confirming | Expiring one-time token returned by the preview. |
|
|
408
|
-
|
|
409
|
-
Workflow:
|
|
410
|
-
|
|
467
|
+
|
|
468
|
+
Workflow:
|
|
469
|
+
|
|
411
470
|
1. `cleanup_data({ confirm: false, preserve_library: true })` — review paths, digest, and expiry.
|
|
412
471
|
2. Close all browser sessions.
|
|
413
472
|
3. `cleanup_data({ confirm: true, preview_token: "..." })` — execute only if the manifest is unchanged.
|
|
414
|
-
|
|
415
|
-
---
|
|
416
|
-
|
|
417
|
-
## Resources (read-only)
|
|
418
|
-
|
|
419
|
-
| URI | Purpose |
|
|
420
|
-
|---|---|
|
|
421
|
-
| `notebooklm://library` | JSON view of the full library. |
|
|
422
|
-
| `notebooklm://library/{id}` | One notebook by ID. The `{id}` template autocompletes from the library. |
|
|
423
|
-
| `notebooklm://metadata` | Deprecated. Use `notebooklm://library` instead. |
|
|
424
|
-
|
|
425
|
-
The MCP server does not respond to `mcp://notebooklm` — that URI scheme never existed. Use `notebooklm://`.
|
|
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://`.
|