notebooklm-mcp-ultimate 2.2.1
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/LICENSE +21 -0
- package/README.md +420 -0
- package/dist/api/batch-execute-client.d.ts +232 -0
- package/dist/api/batch-execute-client.d.ts.map +1 -0
- package/dist/api/batch-execute-client.js +672 -0
- package/dist/api/batch-execute-client.js.map +1 -0
- package/dist/api/content-types.d.ts +44 -0
- package/dist/api/content-types.d.ts.map +1 -0
- package/dist/api/content-types.js +89 -0
- package/dist/api/content-types.js.map +1 -0
- package/dist/api/csrf-manager.d.ts +94 -0
- package/dist/api/csrf-manager.d.ts.map +1 -0
- package/dist/api/csrf-manager.js +178 -0
- package/dist/api/csrf-manager.js.map +1 -0
- package/dist/api/index.d.ts +27 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +56 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/operation-poller.d.ts +67 -0
- package/dist/api/operation-poller.d.ts.map +1 -0
- package/dist/api/operation-poller.js +132 -0
- package/dist/api/operation-poller.js.map +1 -0
- package/dist/api/request-builder.d.ts +196 -0
- package/dist/api/request-builder.d.ts.map +1 -0
- package/dist/api/request-builder.js +371 -0
- package/dist/api/request-builder.js.map +1 -0
- package/dist/api/response-parser.d.ts +124 -0
- package/dist/api/response-parser.d.ts.map +1 -0
- package/dist/api/response-parser.js +595 -0
- package/dist/api/response-parser.js.map +1 -0
- package/dist/api/rpc-ids.d.ts +92 -0
- package/dist/api/rpc-ids.d.ts.map +1 -0
- package/dist/api/rpc-ids.js +138 -0
- package/dist/api/rpc-ids.js.map +1 -0
- package/dist/api/streaming-chat-client.d.ts +50 -0
- package/dist/api/streaming-chat-client.d.ts.map +1 -0
- package/dist/api/streaming-chat-client.js +198 -0
- package/dist/api/streaming-chat-client.js.map +1 -0
- package/dist/api/types.d.ts +318 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +22 -0
- package/dist/api/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +163 -0
- package/dist/auth/auth-manager.d.ts.map +1 -0
- package/dist/auth/auth-manager.js +1055 -0
- package/dist/auth/auth-manager.js.map +1 -0
- package/dist/auth/cookie-store.d.ts +121 -0
- package/dist/auth/cookie-store.d.ts.map +1 -0
- package/dist/auth/cookie-store.js +283 -0
- package/dist/auth/cookie-store.js.map +1 -0
- package/dist/config.d.ts +89 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +217 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +41 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +439 -0
- package/dist/index.js.map +1 -0
- package/dist/library/notebook-library.d.ts +79 -0
- package/dist/library/notebook-library.d.ts.map +1 -0
- package/dist/library/notebook-library.js +296 -0
- package/dist/library/notebook-library.js.map +1 -0
- package/dist/library/types.d.ts +67 -0
- package/dist/library/types.d.ts.map +1 -0
- package/dist/library/types.js +8 -0
- package/dist/library/types.js.map +1 -0
- package/dist/operations/content-operations.d.ts +78 -0
- package/dist/operations/content-operations.d.ts.map +1 -0
- package/dist/operations/content-operations.js +162 -0
- package/dist/operations/content-operations.js.map +1 -0
- package/dist/operations/hybrid-executor.d.ts +47 -0
- package/dist/operations/hybrid-executor.d.ts.map +1 -0
- package/dist/operations/hybrid-executor.js +114 -0
- package/dist/operations/hybrid-executor.js.map +1 -0
- package/dist/operations/notebook-crud-operations.d.ts +52 -0
- package/dist/operations/notebook-crud-operations.d.ts.map +1 -0
- package/dist/operations/notebook-crud-operations.js +248 -0
- package/dist/operations/notebook-crud-operations.js.map +1 -0
- package/dist/operations/research-operations.d.ts +42 -0
- package/dist/operations/research-operations.d.ts.map +1 -0
- package/dist/operations/research-operations.js +189 -0
- package/dist/operations/research-operations.js.map +1 -0
- package/dist/operations/source-operations.d.ts +59 -0
- package/dist/operations/source-operations.d.ts.map +1 -0
- package/dist/operations/source-operations.js +280 -0
- package/dist/operations/source-operations.js.map +1 -0
- package/dist/operations/studio-operations.d.ts +98 -0
- package/dist/operations/studio-operations.d.ts.map +1 -0
- package/dist/operations/studio-operations.js +309 -0
- package/dist/operations/studio-operations.js.map +1 -0
- package/dist/resources/resource-handlers.d.ts +22 -0
- package/dist/resources/resource-handlers.d.ts.map +1 -0
- package/dist/resources/resource-handlers.js +216 -0
- package/dist/resources/resource-handlers.js.map +1 -0
- package/dist/session/browser-session.d.ts +113 -0
- package/dist/session/browser-session.d.ts.map +1 -0
- package/dist/session/browser-session.js +670 -0
- package/dist/session/browser-session.js.map +1 -0
- package/dist/session/session-manager.d.ts +88 -0
- package/dist/session/session-manager.d.ts.map +1 -0
- package/dist/session/session-manager.js +314 -0
- package/dist/session/session-manager.js.map +1 -0
- package/dist/session/shared-context-manager.d.ts +107 -0
- package/dist/session/shared-context-manager.d.ts.map +1 -0
- package/dist/session/shared-context-manager.js +447 -0
- package/dist/session/shared-context-manager.js.map +1 -0
- package/dist/tools/definitions/ask-question.d.ts +8 -0
- package/dist/tools/definitions/ask-question.d.ts.map +1 -0
- package/dist/tools/definitions/ask-question.js +213 -0
- package/dist/tools/definitions/ask-question.js.map +1 -0
- package/dist/tools/definitions/content-generation.d.ts +52 -0
- package/dist/tools/definitions/content-generation.d.ts.map +1 -0
- package/dist/tools/definitions/content-generation.js +236 -0
- package/dist/tools/definitions/content-generation.js.map +1 -0
- package/dist/tools/definitions/notebook-crud.d.ts +9 -0
- package/dist/tools/definitions/notebook-crud.d.ts.map +1 -0
- package/dist/tools/definitions/notebook-crud.js +156 -0
- package/dist/tools/definitions/notebook-crud.js.map +1 -0
- package/dist/tools/definitions/notebook-management.d.ts +3 -0
- package/dist/tools/definitions/notebook-management.d.ts.map +1 -0
- package/dist/tools/definitions/notebook-management.js +243 -0
- package/dist/tools/definitions/notebook-management.js.map +1 -0
- package/dist/tools/definitions/research.d.ts +23 -0
- package/dist/tools/definitions/research.d.ts.map +1 -0
- package/dist/tools/definitions/research.js +108 -0
- package/dist/tools/definitions/research.js.map +1 -0
- package/dist/tools/definitions/session-management.d.ts +3 -0
- package/dist/tools/definitions/session-management.d.ts.map +1 -0
- package/dist/tools/definitions/session-management.js +41 -0
- package/dist/tools/definitions/session-management.js.map +1 -0
- package/dist/tools/definitions/source-management.d.ts +39 -0
- package/dist/tools/definitions/source-management.d.ts.map +1 -0
- package/dist/tools/definitions/source-management.js +224 -0
- package/dist/tools/definitions/source-management.js.map +1 -0
- package/dist/tools/definitions/studio.d.ts +36 -0
- package/dist/tools/definitions/studio.d.ts.map +1 -0
- package/dist/tools/definitions/studio.js +153 -0
- package/dist/tools/definitions/studio.js.map +1 -0
- package/dist/tools/definitions/system.d.ts +3 -0
- package/dist/tools/definitions/system.d.ts.map +1 -0
- package/dist/tools/definitions/system.js +143 -0
- package/dist/tools/definitions/system.js.map +1 -0
- package/dist/tools/definitions.d.ts +12 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +36 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers/content-handlers.d.ts +287 -0
- package/dist/tools/handlers/content-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/content-handlers.js +244 -0
- package/dist/tools/handlers/content-handlers.js.map +1 -0
- package/dist/tools/handlers/notebook-crud-handlers.d.ts +69 -0
- package/dist/tools/handlers/notebook-crud-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/notebook-crud-handlers.js +117 -0
- package/dist/tools/handlers/notebook-crud-handlers.js.map +1 -0
- package/dist/tools/handlers/research-handlers.d.ts +37 -0
- package/dist/tools/handlers/research-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/research-handlers.js +87 -0
- package/dist/tools/handlers/research-handlers.js.map +1 -0
- package/dist/tools/handlers/source-handlers.d.ts +52 -0
- package/dist/tools/handlers/source-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/source-handlers.js +177 -0
- package/dist/tools/handlers/source-handlers.js.map +1 -0
- package/dist/tools/handlers/studio-handlers.d.ts +125 -0
- package/dist/tools/handlers/studio-handlers.d.ts.map +1 -0
- package/dist/tools/handlers/studio-handlers.js +183 -0
- package/dist/tools/handlers/studio-handlers.js.map +1 -0
- package/dist/tools/handlers.d.ts +629 -0
- package/dist/tools/handlers.d.ts.map +1 -0
- package/dist/tools/handlers.js +833 -0
- package/dist/tools/handlers.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +8 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types.d.ts +82 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/cleanup-manager.d.ts +133 -0
- package/dist/utils/cleanup-manager.d.ts.map +1 -0
- package/dist/utils/cleanup-manager.js +673 -0
- package/dist/utils/cleanup-manager.js.map +1 -0
- package/dist/utils/cli-handler.d.ts +16 -0
- package/dist/utils/cli-handler.d.ts.map +1 -0
- package/dist/utils/cli-handler.js +102 -0
- package/dist/utils/cli-handler.js.map +1 -0
- package/dist/utils/logger.d.ts +61 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +92 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/page-utils.d.ts +54 -0
- package/dist/utils/page-utils.d.ts.map +1 -0
- package/dist/utils/page-utils.js +405 -0
- package/dist/utils/page-utils.js.map +1 -0
- package/dist/utils/settings-manager.d.ts +37 -0
- package/dist/utils/settings-manager.d.ts.map +1 -0
- package/dist/utils/settings-manager.js +120 -0
- package/dist/utils/settings-manager.js.map +1 -0
- package/dist/utils/stealth-utils.d.ts +135 -0
- package/dist/utils/stealth-utils.d.ts.map +1 -0
- package/dist/utils/stealth-utils.js +398 -0
- package/dist/utils/stealth-utils.js.map +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Please Prompto!
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# NotebookLM MCP Ultimate
|
|
4
|
+
|
|
5
|
+
**44 MCP tools for AI-powered research via Google NotebookLM and Gemini 2.5**
|
|
6
|
+
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
[](https://modelcontextprotocol.io/)
|
|
9
|
+
[](https://www.npmjs.com/package/notebooklm-mcp-ultimate)
|
|
10
|
+
[](https://github.com/PleasePrompto/notebooklm-mcp)
|
|
11
|
+
[](https://github.com/kabuto-png/notebooklm-mcp-ultimate/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/kabuto-png/notebooklm-mcp-ultimate)
|
|
13
|
+
|
|
14
|
+
[Installation](#installation) • [Quick Start](#quick-start) • [44 Tools](#tool-categories) • [Docs](./docs/) • [Original Project](https://github.com/PleasePrompto/notebooklm-mcp)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## The Problem
|
|
21
|
+
|
|
22
|
+
When you tell Claude Code or Cursor to "search through my local documentation", here's what happens:
|
|
23
|
+
- **Massive token consumption**: Searching through documentation means reading multiple files repeatedly
|
|
24
|
+
- **Inaccurate retrieval**: Searches for keywords, misses context and connections between docs
|
|
25
|
+
- **Hallucinations**: When it can't find something, it invents plausible-sounding APIs
|
|
26
|
+
- **Expensive & slow**: Each question requires re-reading multiple files
|
|
27
|
+
|
|
28
|
+
## The Solution
|
|
29
|
+
|
|
30
|
+
Let your local agents chat directly with [**NotebookLM**](https://notebooklm.google/) — Google's **zero-hallucination knowledge base** powered by Gemini 2.5 that provides intelligent, synthesized answers from your docs.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Your Task → Local Agent asks NotebookLM → Gemini synthesizes answer → Agent writes correct code
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**The real advantage**: No more manual copy-paste between NotebookLM and your editor. Your agent asks NotebookLM directly and gets answers straight back in the CLI. It builds deep understanding through automatic follow-ups — Claude asks multiple questions in sequence, each building on the last, getting specific implementation details, edge cases, and best practices. You can save NotebookLM links to your local library with tags and descriptions, and Claude automatically selects the relevant notebook based on your current task.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Why NotebookLM, Not Local RAG?
|
|
41
|
+
|
|
42
|
+
| Approach | Token Cost | Setup Time | Hallucinations | Answer Quality |
|
|
43
|
+
|----------|------------|------------|----------------|----------------|
|
|
44
|
+
| **Feed docs to Claude** | 🔴 Very high (multiple file reads) | Instant | Yes - fills gaps | Variable retrieval |
|
|
45
|
+
| **Web search** | 🟡 Medium | Instant | High - unreliable sources | Hit or miss |
|
|
46
|
+
| **Local RAG** | 🟡 Medium-High | Hours (embeddings, chunking) | Medium - retrieval gaps | Depends on setup |
|
|
47
|
+
| **NotebookLM MCP** | 🟢 Minimal | 5 minutes | **Zero** - refuses if unknown | Expert synthesis |
|
|
48
|
+
|
|
49
|
+
### What Makes NotebookLM Superior?
|
|
50
|
+
|
|
51
|
+
1. **Pre-processed by Gemini**: Upload docs once, get instant expert knowledge
|
|
52
|
+
2. **Natural language Q&A**: Not just retrieval — actual understanding and synthesis
|
|
53
|
+
3. **Multi-source correlation**: Connects information across 50+ documents
|
|
54
|
+
4. **Citation-backed**: Every answer includes source references
|
|
55
|
+
5. **No infrastructure**: No vector DBs, embeddings, or chunking strategies needed
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Prerequisites
|
|
60
|
+
|
|
61
|
+
- **Node.js** >= 18 ([download](https://nodejs.org/))
|
|
62
|
+
- A **Google account** with access to [NotebookLM](https://notebooklm.google.com/)
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
### Claude Code
|
|
67
|
+
```bash
|
|
68
|
+
claude mcp add notebooklm npx notebooklm-mcp-ultimate@latest
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Codex
|
|
72
|
+
```bash
|
|
73
|
+
codex mcp add notebooklm -- npx notebooklm-mcp-ultimate@latest
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary>Gemini</summary>
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
gemini mcp add notebooklm npx notebooklm-mcp-ultimate@latest
|
|
81
|
+
```
|
|
82
|
+
</details>
|
|
83
|
+
|
|
84
|
+
<details>
|
|
85
|
+
<summary>Cursor</summary>
|
|
86
|
+
|
|
87
|
+
Add to `~/.cursor/mcp.json`:
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"notebooklm": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "notebooklm-mcp-ultimate@latest"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary>amp</summary>
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
amp mcp add notebooklm -- npx notebooklm-mcp-ultimate@latest
|
|
105
|
+
```
|
|
106
|
+
</details>
|
|
107
|
+
|
|
108
|
+
<details>
|
|
109
|
+
<summary>VS Code</summary>
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
code --add-mcp '{"name":"notebooklm","command":"npx","args":["notebooklm-mcp-ultimate@latest"]}'
|
|
113
|
+
```
|
|
114
|
+
</details>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary>Other MCP clients</summary>
|
|
118
|
+
|
|
119
|
+
**Generic MCP config:**
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"notebooklm": {
|
|
124
|
+
"command": "npx",
|
|
125
|
+
"args": ["notebooklm-mcp-ultimate@latest"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
</details>
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Quick Start
|
|
135
|
+
|
|
136
|
+
### 1. Install the MCP server (see [Installation](#installation) above)
|
|
137
|
+
|
|
138
|
+
### 2. Authenticate (one-time)
|
|
139
|
+
|
|
140
|
+
Say in your chat (Claude/Codex):
|
|
141
|
+
```
|
|
142
|
+
"Log me in to NotebookLM"
|
|
143
|
+
```
|
|
144
|
+
*A Chrome window opens → log in with Google*
|
|
145
|
+
|
|
146
|
+
### 3. Create your knowledge base
|
|
147
|
+
Go to [notebooklm.google.com](https://notebooklm.google.com) → Create notebook → Upload your docs:
|
|
148
|
+
- 📄 PDFs, Google Docs, markdown files
|
|
149
|
+
- 🔗 Websites, GitHub repos
|
|
150
|
+
- 🎥 YouTube videos
|
|
151
|
+
- 📚 Multiple sources per notebook
|
|
152
|
+
|
|
153
|
+
Share: **⚙️ Share → Anyone with link → Copy**
|
|
154
|
+
|
|
155
|
+
### 4. Let Claude use it
|
|
156
|
+
```
|
|
157
|
+
"I'm building with [library]. Here's my NotebookLM: [link]"
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**That's it.** Claude now asks NotebookLM whatever it needs, building expertise before writing code.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Real-World Example
|
|
165
|
+
|
|
166
|
+
### Building an n8n Workflow Without Hallucinations
|
|
167
|
+
|
|
168
|
+
**Challenge**: n8n's API is new — Claude hallucinates node names and functions.
|
|
169
|
+
|
|
170
|
+
**Solution**:
|
|
171
|
+
1. Downloaded complete n8n documentation → merged into manageable chunks
|
|
172
|
+
2. Uploaded to NotebookLM
|
|
173
|
+
3. Told Claude: *"Build me a Gmail spam filter workflow. Use this NotebookLM: [link]"*
|
|
174
|
+
|
|
175
|
+
**Watch the AI-to-AI conversation:**
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Claude → "How does Gmail integration work in n8n?"
|
|
179
|
+
NotebookLM → "Use Gmail Trigger with polling, or Gmail node with Get Many..."
|
|
180
|
+
|
|
181
|
+
Claude → "How to decode base64 email body?"
|
|
182
|
+
NotebookLM → "Body is base64url encoded in payload.parts, use Function node..."
|
|
183
|
+
|
|
184
|
+
Claude → "How to parse OpenAI response as JSON?"
|
|
185
|
+
NotebookLM → "Set responseFormat to json, use {{ $json.spam }} in IF node..."
|
|
186
|
+
|
|
187
|
+
Claude → "What about error handling if the API fails?"
|
|
188
|
+
NotebookLM → "Use Error Trigger node with Continue On Fail enabled..."
|
|
189
|
+
|
|
190
|
+
Claude → ✅ "Here's your complete workflow JSON..."
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Result**: Perfect workflow on first try. No debugging hallucinated APIs.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Core Features
|
|
198
|
+
|
|
199
|
+
### **Zero Hallucinations**
|
|
200
|
+
NotebookLM refuses to answer if information isn't in your docs. No invented APIs.
|
|
201
|
+
|
|
202
|
+
### **Autonomous Research**
|
|
203
|
+
Claude asks follow-up questions automatically, building complete understanding before coding.
|
|
204
|
+
|
|
205
|
+
### **Smart Library Management**
|
|
206
|
+
Save NotebookLM links with tags and descriptions. Claude auto-selects the right notebook for your task.
|
|
207
|
+
```
|
|
208
|
+
"Add [link] to library tagged 'frontend, react, components'"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### **Deep, Iterative Research**
|
|
212
|
+
- Claude automatically asks follow-up questions to build complete understanding
|
|
213
|
+
- Each answer triggers deeper questions until Claude has all the details
|
|
214
|
+
- Example: For n8n workflow, Claude asked multiple sequential questions about Gmail integration, error handling, and data transformation
|
|
215
|
+
|
|
216
|
+
### **Cross-Tool Sharing**
|
|
217
|
+
Set up once, use everywhere. Claude Code, Codex, Cursor — all share the same library.
|
|
218
|
+
|
|
219
|
+
### **Deep Cleanup Tool**
|
|
220
|
+
Fresh start anytime. Scans entire system for NotebookLM data with categorized preview.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Tool Categories
|
|
225
|
+
|
|
226
|
+
44 tools across 9 categories:
|
|
227
|
+
|
|
228
|
+
| Category | Count | Tools |
|
|
229
|
+
|----------|-------|-------|
|
|
230
|
+
| System Management | 4 | get_health, setup_auth, re_auth, cleanup_data |
|
|
231
|
+
| Session Management | 3 | list_sessions, close_session, reset_session |
|
|
232
|
+
| Notebook Management | 8 | add_notebook, list_notebooks, get_notebook, select_notebook, update_notebook, remove_notebook, search_notebooks, get_library_stats |
|
|
233
|
+
| Notebook CRUD | 4 | create_notebook_remote, rename_notebook_remote, delete_notebook_remote, add_file_source |
|
|
234
|
+
| Q&A | 1 | ask_question |
|
|
235
|
+
| Content Generation | 9 | generate_faq, generate_briefing, generate_timeline, generate_outline, generate_study_guide, generate_flashcards, generate_quiz, generate_mindmap, suggest_questions |
|
|
236
|
+
| Audio Studio | 5 | get_audio_status, create_audio, update_audio, delete_audio, download_audio |
|
|
237
|
+
| Source Management | 7 | list_sources, add_url_source, add_text_source, add_youtube_source, add_drive_source, delete_source, summarize_source |
|
|
238
|
+
| Research | 3 | discover_sources, import_source, research_topic |
|
|
239
|
+
|
|
240
|
+
See [docs/tools.md](./docs/tools.md) for full parameter reference.
|
|
241
|
+
|
|
242
|
+
## Tool Profiles
|
|
243
|
+
|
|
244
|
+
Reduce token usage by loading only the tools you need:
|
|
245
|
+
|
|
246
|
+
| Profile | Tools | Use Case |
|
|
247
|
+
|---------|-------|----------|
|
|
248
|
+
| **minimal** | 5 | Query-only |
|
|
249
|
+
| **standard** | 10 | + Library management |
|
|
250
|
+
| **full** | 44 | All tools |
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
npx notebooklm-mcp config set profile minimal # or standard / full
|
|
254
|
+
npx notebooklm-mcp config set disabled-tools "cleanup_data,re_auth"
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
See [docs/configuration.md](./docs/configuration.md) for all options.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Architecture
|
|
262
|
+
|
|
263
|
+
```mermaid
|
|
264
|
+
graph LR
|
|
265
|
+
A[Your Task] --> B[Claude/Codex]
|
|
266
|
+
B --> C[MCP Server]
|
|
267
|
+
C --> D[Chrome Automation]
|
|
268
|
+
D --> E[NotebookLM]
|
|
269
|
+
E --> F[Gemini 2.5]
|
|
270
|
+
F --> G[Your Docs]
|
|
271
|
+
G --> F
|
|
272
|
+
F --> E
|
|
273
|
+
E --> D
|
|
274
|
+
D --> C
|
|
275
|
+
C --> B
|
|
276
|
+
B --> H[Accurate Code]
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Common Commands
|
|
282
|
+
|
|
283
|
+
| Intent | Say | Result |
|
|
284
|
+
|--------|-----|--------|
|
|
285
|
+
| Authenticate | *"Open NotebookLM auth setup"* or *"Log me in to NotebookLM"* | Chrome opens for login |
|
|
286
|
+
| Add notebook | *"Add [link] to library"* | Saves notebook with metadata |
|
|
287
|
+
| List notebooks | *"Show our notebooks"* | Lists all saved notebooks |
|
|
288
|
+
| Research first | *"Research this in NotebookLM before coding"* | Multi-question session |
|
|
289
|
+
| Select notebook | *"Use the React notebook"* | Sets active notebook |
|
|
290
|
+
| Update notebook | *"Update notebook tags"* | Modify metadata |
|
|
291
|
+
| Remove notebook | *"Remove [notebook] from library"* | Deletes from library |
|
|
292
|
+
| View browser | *"Show me the browser"* | Watch live NotebookLM chat |
|
|
293
|
+
| Fix auth | *"Repair NotebookLM authentication"* | Clears and re-authenticates |
|
|
294
|
+
| Switch account | *"Re-authenticate with different Google account"* | Changes account |
|
|
295
|
+
| Clean restart | *"Run NotebookLM cleanup"* | Removes all data for fresh start |
|
|
296
|
+
| Keep library | *"Cleanup but keep my library"* | Preserves notebooks |
|
|
297
|
+
| Delete all data | *"Delete all NotebookLM data"* | Complete removal |
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## Comparison to Alternatives
|
|
302
|
+
|
|
303
|
+
### vs. Downloading docs locally
|
|
304
|
+
- **You**: Download docs → Claude: "search through these files"
|
|
305
|
+
- **Problem**: Claude reads thousands of files → massive token usage, often misses connections
|
|
306
|
+
- **NotebookLM**: Pre-indexed by Gemini, semantic understanding across all docs
|
|
307
|
+
|
|
308
|
+
### vs. Web search
|
|
309
|
+
- **You**: "Research X online"
|
|
310
|
+
- **Problem**: Outdated info, hallucinated examples, unreliable sources
|
|
311
|
+
- **NotebookLM**: Only your trusted docs, always current, with citations
|
|
312
|
+
|
|
313
|
+
### vs. Local RAG setup
|
|
314
|
+
- **You**: Set up embeddings, vector DB, chunking strategy, retrieval pipeline
|
|
315
|
+
- **Problem**: Hours of setup, tuning retrieval, still gets "creative" with gaps
|
|
316
|
+
- **NotebookLM**: Upload docs → done. Google handles everything.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## FAQ
|
|
321
|
+
|
|
322
|
+
**Is it really zero hallucinations?**
|
|
323
|
+
Yes. NotebookLM is specifically designed to only answer from uploaded sources. If it doesn't know, it says so.
|
|
324
|
+
|
|
325
|
+
**What about rate limits?**
|
|
326
|
+
Free tier has daily query limits per Google account. Quick account switching supported for continued research.
|
|
327
|
+
|
|
328
|
+
**How secure is this?**
|
|
329
|
+
Chrome runs locally. Your credentials never leave your machine. Use a dedicated Google account if concerned.
|
|
330
|
+
|
|
331
|
+
**Can I see what's happening?**
|
|
332
|
+
Yes! Say *"Show me the browser"* to watch the live NotebookLM conversation.
|
|
333
|
+
|
|
334
|
+
**What makes this better than Claude's built-in knowledge?**
|
|
335
|
+
Your docs are always current. No training cutoff. No hallucinations. Perfect for new libraries, internal APIs, or fast-moving projects.
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Documentation
|
|
340
|
+
|
|
341
|
+
- [Usage Guide](./docs/usage-guide.md) — Patterns, workflows, tips
|
|
342
|
+
- [Tool Reference](./docs/tools.md) — Complete 44-tool API reference
|
|
343
|
+
- [Configuration](./docs/configuration.md) — Environment variables and profiles
|
|
344
|
+
- [Troubleshooting](./docs/troubleshooting.md) — Common issues and recovery
|
|
345
|
+
- [System Architecture](./docs/system-architecture.md) — Technical design
|
|
346
|
+
- [Codebase Summary](./docs/codebase-summary.md) — Code structure (~18K LOC)
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## The Bottom Line
|
|
351
|
+
|
|
352
|
+
**Without NotebookLM MCP**: Write code → Find it's wrong → Debug hallucinated APIs → Repeat
|
|
353
|
+
|
|
354
|
+
**With NotebookLM MCP**: Claude researches first → Writes correct code → Ship faster
|
|
355
|
+
|
|
356
|
+
Stop debugging hallucinations. Start shipping accurate code.
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
# Get started in 30 seconds
|
|
360
|
+
claude mcp add notebooklm npx notebooklm-mcp-ultimate@latest
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Disclaimer
|
|
366
|
+
|
|
367
|
+
This tool automates browser interactions with NotebookLM to make your workflow more efficient. However, a few friendly reminders:
|
|
368
|
+
|
|
369
|
+
**About browser automation:**
|
|
370
|
+
While I've built in humanization features (realistic typing speeds, natural delays, mouse movements) to make the automation behave more naturally, I can't guarantee Google won't detect or flag automated usage. I recommend using a dedicated Google account for automation rather than your primary account—think of it like web scraping: probably fine, but better safe than sorry!
|
|
371
|
+
|
|
372
|
+
**About CLI tools and AI agents:**
|
|
373
|
+
CLI tools like Claude Code, Codex, and similar AI-powered assistants are incredibly powerful, but they can make mistakes. Please use them with care and awareness:
|
|
374
|
+
- Always review changes before committing or deploying
|
|
375
|
+
- Test in safe environments first
|
|
376
|
+
- Keep backups of important work
|
|
377
|
+
- Remember: AI agents are assistants, not infallible oracles
|
|
378
|
+
|
|
379
|
+
I built this tool for myself because I was tired of the copy-paste dance between NotebookLM and my editor. I'm sharing it in the hope it helps others too, but I can't take responsibility for any issues, data loss, or account problems that might occur. Use at your own discretion and judgment.
|
|
380
|
+
|
|
381
|
+
That said, if you run into problems or have questions, feel free to open an issue on GitHub. I'm happy to help troubleshoot!
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Contributing
|
|
386
|
+
|
|
387
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
388
|
+
|
|
389
|
+
Found a bug? Have a feature idea? [Open an issue](https://github.com/kabuto-png/notebooklm-mcp-ultimate/issues).
|
|
390
|
+
|
|
391
|
+
## Security
|
|
392
|
+
|
|
393
|
+
To report a vulnerability, please use [GitHub Security Advisories](https://github.com/kabuto-png/notebooklm-mcp-ultimate/security/advisories/new). See [SECURITY.md](SECURITY.md) for details.
|
|
394
|
+
|
|
395
|
+
## Code of Conduct
|
|
396
|
+
|
|
397
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). Please be respectful in all interactions.
|
|
398
|
+
|
|
399
|
+
## Acknowledgements
|
|
400
|
+
|
|
401
|
+
This project builds on the work of others:
|
|
402
|
+
|
|
403
|
+
- **[notebooklm-mcp](https://github.com/PleasePrompto/notebooklm-mcp)** by Gérôme Dexheimer — the original MCP server this project was forked from
|
|
404
|
+
- **[Patchright](https://github.com/AXiMiLLiST/patchright)** — undetected Playwright fork for browser automation
|
|
405
|
+
- **[Model Context Protocol](https://github.com/modelcontextprotocol)** — the open protocol powering tool integration
|
|
406
|
+
- **[Google NotebookLM](https://notebooklm.google.com/)** — the AI knowledge base this server connects to
|
|
407
|
+
|
|
408
|
+
## License
|
|
409
|
+
|
|
410
|
+
MIT — Use freely in your projects.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
<div align="center">
|
|
415
|
+
|
|
416
|
+
Built with frustration about hallucinated APIs, powered by Google's NotebookLM
|
|
417
|
+
|
|
418
|
+
⭐ [Star on GitHub](https://github.com/kabuto-png/notebooklm-mcp-ultimate) if this saves you debugging time!
|
|
419
|
+
|
|
420
|
+
</div>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BatchExecute Client for NotebookLM Internal API
|
|
3
|
+
*
|
|
4
|
+
* Main client for making API calls to the NotebookLM batchexecute endpoint.
|
|
5
|
+
* This is the primary interface for API operations.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Cookie-based authentication
|
|
9
|
+
* - CSRF token handling
|
|
10
|
+
* - Automatic retries with exponential backoff
|
|
11
|
+
* - Request/response logging
|
|
12
|
+
* - Error classification
|
|
13
|
+
*/
|
|
14
|
+
import type { RPCRequest, Cookie, BatchExecuteResponse } from './types.js';
|
|
15
|
+
/**
|
|
16
|
+
* Configuration options for the API client
|
|
17
|
+
*/
|
|
18
|
+
export interface BatchExecuteClientConfig {
|
|
19
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
20
|
+
timeout?: number;
|
|
21
|
+
/** Maximum retry attempts (default: 3) */
|
|
22
|
+
maxRetries?: number;
|
|
23
|
+
/** Base delay for exponential backoff in ms (default: 1000) */
|
|
24
|
+
retryBaseDelay?: number;
|
|
25
|
+
/** Enable debug logging (default: false) */
|
|
26
|
+
debug?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* BatchExecute API Client
|
|
30
|
+
*
|
|
31
|
+
* Provides high-level methods for interacting with the NotebookLM API.
|
|
32
|
+
*/
|
|
33
|
+
export declare class BatchExecuteClient {
|
|
34
|
+
private config;
|
|
35
|
+
private cookies;
|
|
36
|
+
private lastRequestTime;
|
|
37
|
+
/** Minimum delay between requests to avoid rate limiting (ms) */
|
|
38
|
+
private readonly MIN_REQUEST_INTERVAL;
|
|
39
|
+
/** In-flight CSRF fetch promise — deduplicates concurrent requests */
|
|
40
|
+
private csrfFetchPromise;
|
|
41
|
+
constructor(config?: BatchExecuteClientConfig);
|
|
42
|
+
/**
|
|
43
|
+
* Set cookies for authentication
|
|
44
|
+
*
|
|
45
|
+
* @param cookies - Browser cookies from AuthManager
|
|
46
|
+
*/
|
|
47
|
+
setCookies(cookies: Cookie[]): void;
|
|
48
|
+
/**
|
|
49
|
+
* Get current cookies
|
|
50
|
+
*/
|
|
51
|
+
getCookies(): Cookie[];
|
|
52
|
+
/**
|
|
53
|
+
* Check if client has valid authentication
|
|
54
|
+
*/
|
|
55
|
+
hasValidAuth(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Execute a single RPC request
|
|
58
|
+
*
|
|
59
|
+
* @param request - The RPC request to execute
|
|
60
|
+
* @returns Batch response containing the result
|
|
61
|
+
*/
|
|
62
|
+
execute(request: RPCRequest): Promise<BatchExecuteResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Execute multiple RPC requests in a single batch
|
|
65
|
+
*
|
|
66
|
+
* @param requests - Array of RPC requests
|
|
67
|
+
* @returns Batch response containing all results
|
|
68
|
+
*/
|
|
69
|
+
executeBatch(requests: RPCRequest[]): Promise<BatchExecuteResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Internal execution method (no retries)
|
|
72
|
+
*/
|
|
73
|
+
private executeInternal;
|
|
74
|
+
/**
|
|
75
|
+
* Fetch CSRF token from the NotebookLM page.
|
|
76
|
+
*
|
|
77
|
+
* Deduplicates concurrent callers — if a fetch is already in flight, all
|
|
78
|
+
* concurrent callers await the same promise instead of triggering extra requests.
|
|
79
|
+
*/
|
|
80
|
+
private fetchCSRFToken;
|
|
81
|
+
/**
|
|
82
|
+
* Internal CSRF fetch implementation (no concurrency guard)
|
|
83
|
+
*/
|
|
84
|
+
private _fetchCSRFTokenInternal;
|
|
85
|
+
/**
|
|
86
|
+
* Refresh CSRF token (clear cache and fetch new)
|
|
87
|
+
*/
|
|
88
|
+
refreshCSRFToken(): Promise<string | null>;
|
|
89
|
+
/**
|
|
90
|
+
* Clear cached CSRF token
|
|
91
|
+
*/
|
|
92
|
+
clearCSRFToken(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Sleep for a specified duration
|
|
95
|
+
*/
|
|
96
|
+
private sleep;
|
|
97
|
+
}
|
|
98
|
+
import type { APINotebook, APISource, APIAudioOverview } from './types.js';
|
|
99
|
+
import { ContentTypeCode } from './content-types.js';
|
|
100
|
+
import { type GenerateAndWaitResult } from './operation-poller.js';
|
|
101
|
+
/**
|
|
102
|
+
* Extended BatchExecute Client with high-level API methods
|
|
103
|
+
*/
|
|
104
|
+
export declare class NotebookLMAPIClient extends BatchExecuteClient {
|
|
105
|
+
/**
|
|
106
|
+
* List all notebooks for the authenticated user
|
|
107
|
+
*/
|
|
108
|
+
listNotebooks(): Promise<APINotebook[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Get a specific notebook by ID
|
|
111
|
+
*/
|
|
112
|
+
getNotebook(notebookId: string): Promise<APINotebook | null>;
|
|
113
|
+
/**
|
|
114
|
+
* Create a new notebook
|
|
115
|
+
*/
|
|
116
|
+
createNotebook(title?: string): Promise<string | null>;
|
|
117
|
+
/**
|
|
118
|
+
* Delete a notebook
|
|
119
|
+
*/
|
|
120
|
+
deleteNotebook(notebookId: string): Promise<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Rename a notebook
|
|
123
|
+
*/
|
|
124
|
+
renameNotebook(notebookId: string, newTitle: string): Promise<boolean>;
|
|
125
|
+
/**
|
|
126
|
+
* List all sources in a notebook
|
|
127
|
+
*/
|
|
128
|
+
listSources(notebookId: string): Promise<APISource[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Add a URL source to a notebook
|
|
131
|
+
*/
|
|
132
|
+
addURLSource(notebookId: string, url: string): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Add a text source to a notebook
|
|
135
|
+
*/
|
|
136
|
+
addTextSource(notebookId: string, title: string, content: string): Promise<boolean>;
|
|
137
|
+
/**
|
|
138
|
+
* Add a YouTube source to a notebook
|
|
139
|
+
*/
|
|
140
|
+
addYouTubeSource(notebookId: string, youtubeUrl: string): Promise<boolean>;
|
|
141
|
+
/**
|
|
142
|
+
* Add a Google Drive source to a notebook
|
|
143
|
+
*/
|
|
144
|
+
addDriveSource(notebookId: string, fileId: string): Promise<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Delete a source from a notebook
|
|
147
|
+
*/
|
|
148
|
+
deleteSource(notebookId: string, sourceId: string): Promise<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Get audio overview status for a notebook
|
|
151
|
+
*/
|
|
152
|
+
getAudioStatus(notebookId: string): Promise<APIAudioOverview>;
|
|
153
|
+
/**
|
|
154
|
+
* Create/generate audio overview for a notebook
|
|
155
|
+
*/
|
|
156
|
+
createAudio(notebookId: string, customInstructions?: string): Promise<boolean>;
|
|
157
|
+
/**
|
|
158
|
+
* Delete audio overview for a notebook
|
|
159
|
+
*/
|
|
160
|
+
deleteAudio(notebookId: string): Promise<boolean>;
|
|
161
|
+
/**
|
|
162
|
+
* Get audio download URL for a notebook
|
|
163
|
+
*/
|
|
164
|
+
getAudioURL(notebookId: string): Promise<string | null>;
|
|
165
|
+
/**
|
|
166
|
+
* Generate FAQ from notebook sources
|
|
167
|
+
*/
|
|
168
|
+
generateFAQ(notebookId: string, sourceIds?: string[]): Promise<string | null>;
|
|
169
|
+
/**
|
|
170
|
+
* Generate briefing document from notebook sources
|
|
171
|
+
*/
|
|
172
|
+
generateBriefing(notebookId: string, sourceIds?: string[]): Promise<string | null>;
|
|
173
|
+
/**
|
|
174
|
+
* Generate timeline from notebook sources
|
|
175
|
+
*/
|
|
176
|
+
generateTimeline(notebookId: string, sourceIds?: string[]): Promise<string | null>;
|
|
177
|
+
/**
|
|
178
|
+
* Generate study guide from notebook sources
|
|
179
|
+
*/
|
|
180
|
+
generateStudyGuide(notebookId: string, sourceIds?: string[]): Promise<string | null>;
|
|
181
|
+
/**
|
|
182
|
+
* Get suggested questions for a notebook
|
|
183
|
+
*/
|
|
184
|
+
getSuggestedQuestions(notebookId: string): Promise<string[]>;
|
|
185
|
+
/**
|
|
186
|
+
* Create a notebook and immediately add a text source in a single batch call.
|
|
187
|
+
*
|
|
188
|
+
* @param title - Notebook title
|
|
189
|
+
* @param sourceTitle - Title for the text source
|
|
190
|
+
* @param sourceContent - Content of the text source
|
|
191
|
+
* @returns Created notebook ID or null on failure
|
|
192
|
+
*/
|
|
193
|
+
createNotebookWithSource(title: string, sourceTitle: string, sourceContent: string): Promise<{
|
|
194
|
+
notebookId: string | null;
|
|
195
|
+
sourceAdded: boolean;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* List notebooks and sources for a specific notebook in a single batch call.
|
|
199
|
+
*
|
|
200
|
+
* @param notebookId - Notebook whose sources to fetch
|
|
201
|
+
* @returns Object containing notebooks list and sources list
|
|
202
|
+
*/
|
|
203
|
+
batchListNotebooksAndSources(notebookId: string): Promise<{
|
|
204
|
+
notebooks: APINotebook[];
|
|
205
|
+
sources: APISource[];
|
|
206
|
+
}>;
|
|
207
|
+
/**
|
|
208
|
+
* Generate content and wait for it to be ready.
|
|
209
|
+
*
|
|
210
|
+
* Triggers generation via R7cb6c then polls gArtLc until the artifact
|
|
211
|
+
* status reaches COMPLETED (status 3) or the timeout is exceeded.
|
|
212
|
+
*
|
|
213
|
+
* @param notebookId - Target notebook ID
|
|
214
|
+
* @param contentType - Content type code from ContentTypeCode
|
|
215
|
+
* @param sourceIds - Optional source ID filter
|
|
216
|
+
* @param maxWaitMs - Maximum polling duration in ms (default: 120_000)
|
|
217
|
+
* @returns GenerateAndWaitResult with content when successful
|
|
218
|
+
*/
|
|
219
|
+
generateAndWait(notebookId: string, contentType: ContentTypeCode, sourceIds?: string[], maxWaitMs?: number): Promise<GenerateAndWaitResult>;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get or create the API client instance.
|
|
223
|
+
*
|
|
224
|
+
* Note: This is a singleton. If an instance already exists and a new config
|
|
225
|
+
* is passed, the config is ignored. Call resetAPIClient() first to apply new config.
|
|
226
|
+
*/
|
|
227
|
+
export declare function getAPIClient(config?: BatchExecuteClientConfig): NotebookLMAPIClient;
|
|
228
|
+
/**
|
|
229
|
+
* Reset the API client (for testing or re-auth)
|
|
230
|
+
*/
|
|
231
|
+
export declare function resetAPIClient(): void;
|
|
232
|
+
//# sourceMappingURL=batch-execute-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch-execute-client.d.ts","sourceRoot":"","sources":["../../src/api/batch-execute-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAgB3E;;G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