| name | notebooklm |
| description | comprehensive Agent interface for Google NotebookLM. Create notebooks, add sources (PDF/Web/Drive), perform Deep Research, and generate Studios (Podcasts/Quizzes). |
| homepage | https://github.com/jacob-bd/notebooklm-mcp-cli |
| metadata | {"openclaw":{"emoji":"📓","requires":{"bins":["notebooklm-mcp"]},"install":[{"id":"uv","kind":"uv","package":"notebooklm-mcp-cli","bins":["notebooklm-mcp"],"label":"Install NotebookLM MCP (uv)"}]}} |
NotebookLM Agent Skill
This skill empowers the Agent to use Google NotebookLM as a research, synthesis, and content generation engine.
🧠 Core Capabilities
The Agent can perform the following high-level tasks:
- Deep Research: Autonomously research a topic on the web and summarize findings.
- RAG (Retrieval-Augmented Generation): Answer questions based strictly on provided documents (PDF, Drive, URL).
- Content Studio: Generate "Deep Dive" Audio Overviews (Podcasts), Briefing Docs, FAQs, and Study Quizzes.
- Knowledge Management: Create/Edit notes and organize sources within notebooks.
🛠️ Tool Reference & Usage Patterns
1. Notebook Operations
Manage the workspace. Always list notebooks first to get valid UUIDs.
mcporter call notebooklm.notebook_list --args "{}"
mcporter call notebooklm.notebook_create --args '{"title": "Project Alpha"}'
mcporter call notebooklm.notebook_delete --args '{"notebook_id": "UUID", "confirm": true}'
2. Source Management (CRITICAL: Smart Polling)
Adding sources takes time to index. The Agent MUST verify source readiness before querying.
Workflow:
- Call
source_add with wait: true.
- Check the return value. It must say
"ready": true.
- If
"ready": false (timeout), retry adding or wait blindly (status check is not possible).
- Proceed to query.
mcporter call notebooklm.source_add --args '{"notebook_id": "UUID", "source_type": "url", "url": "https://example.com", "wait": true, "wait_timeout": 120}'
mcporter call notebooklm.source_add --args '{"notebook_id": "UUID", "source_type": "text", "text": "Analysis...", "title": "Note", "wait": true}'
Supported Source Types: url (Web/YouTube), text (Pasted), file (Local PDF/MP3/Txt), drive (Google Drive).
3. Deep Research Agent
Delegate complex web research to NotebookLM.
Workflow:
research_start -> Returns task_id.
research_status -> Loop every 30s until status: "completed".
research_import -> Import found sources into the notebook.
mcporter call notebooklm.research_start --args '{"query": "Latest advances in Solid State Batteries", "mode": "deep", "notebook_id": "UUID"}'
mcporter call notebooklm.research_status --args '{"notebook_id": "UUID", "task_id": "TASK_UUID"}'
mcporter call notebooklm.research_import --args '{"notebook_id": "UUID", "task_id": "TASK_UUID"}'
4. Studio Generation (Podcasts, Quizzes, etc.)
Generate artifacts from sources.
Supported Types:
audio: Audio Overview (Podcast).
quiz: Learning Quiz (Multiple Choice).
faq: Frequently Asked Questions.
study_guide: Study Guide.
briefing_doc: Briefing Document.
mcporter call notebooklm.studio_create --args '{"notebook_id": "UUID", "artifact_type": "audio", "audio_format": "deep_dive", "confirm": true}'
mcporter call notebooklm.studio_create --args '{"notebook_id": "UUID", "artifact_type": "quiz", "confirm": true}'
mcporter call notebooklm.studio_status --args '{"notebook_id": "UUID"}'
mcporter call notebooklm.download_artifact --args '{"notebook_id": "UUID", "artifact_type": "audio", "output_path": "./podcast.mp3"}'
5. Querying the Notebook (Critical Field Info)
Once all sources are added and processed, you can ask questions.
NOTEBOOK_ID="...."
npx -y mcporter --config ~/.mcporter_config.json call notebooklm.notebook_query --args "{\"notebook_id\": \"$NOTEBOOK_ID\", \"query\": \"Summarize key findings.\"}"
- IMPORTANT: The JSON response from this call contains the actual answer text in the
answer field (e.g., jq -r '.answer'), NOT directly in result or response. Wait patiently for the output.
6. Note Management
Interact with specific notes (atomic thoughts) within a notebook.
mcporter call notebooklm.note --args '{"notebook_id": "UUID", "action": "list"}'
mcporter call notebooklm.note --args '{"notebook_id": "UUID", "action": "create", "content": "My observation...", "title": "Observation 1"}'
🏆 Proven Agent Script (Reference Implementation)
Use this logic for reliable "Deep Research" tasks.
NOTEBOOK_TITLE="[Agent] Research Task"
SOURCE_URL="https://example.com/source"
QUERY="Summarize key findings."
npx -y mcporter --config ~/.mcporter_config.json config add notebooklm --stdio "bash -c 'export NOTEBOOKLM_COOKIES=\$(cat ~/.nlm/cookies.txt); notebooklm-mcp --transport stdio'"
LIST_RESPONSE=$(npx -y mcporter --config ~/.mcporter_config.json call notebooklm.notebook_list --args "{}")
NOTEBOOK_ID=$(echo $LIST_RESPONSE | jq -r --arg title "$NOTEBOOK_TITLE" '.notebooks[] | select(.title == $title) | .id' | head -n 1)
if [ -z "$NOTEBOOK_ID" ]; then
CREATE_RESPONSE=$(npx -y mcporter --config ~/.mcporter_config.json call notebooklm.notebook_create --args "{\"title\": \"$NOTEBOOK_TITLE\"}")
NOTEBOOK_ID=$(echo $CREATE_RESPONSE | jq -r '.notebook.id')
npx -y mcporter --config ~/.mcporter_config.json call notebooklm.source_add --args "{\"notebook_id\": \"$NOTEBOOK_ID\", \"source_type\": \"url\", \"url\": \"$SOURCE_URL\", \"wait\": true, \"wait_timeout\": 600}"
fi
QUERY_RESPONSE=$(npx -y mcporter --config ~/.mcporter_config.json call notebooklm.notebook_query --args "{\"notebook_id\": \"$NOTEBOOK_ID\", \"query\": \"$QUERY\"}")
FINAL_ANSWER=$(echo $QUERY_RESPONSE | jq -r '.answer')
echo "Final Answer: $FINAL_ANSWER"
- IMPORTANT: The JSON response from this call contains the actual answer text in the
answer field (e.g., jq -r '.answer'), NOT directly in result or response. Wait patiently for the output.
🛡️ Best Practices & Failure Prevention
To ensure 100% success rate, the Agent MUST follow these rules:
-
Smart Polling (No Blind Waits):
- Source Addition: Always use
"wait": true. The notebook_get command does not show processing status, so you must rely on the source_add response.
- Studio/Research: These do support polling. Use
studio_status or research_status loops.
-
Rate Limiting:
- NotebookLM has rate limits. Do not poll faster than once every 10-20 seconds.
- If you receive a 429 error, sleep for 60 seconds.
-
Source Limits:
- Keep inputs under 350,000 words or 200MB per source.
- If a source is too large, split it or summarize it first.
-
Google Drive Access:
- Ensure the
cookies.txt account has permissions to the Drive file.
- For shared files, make sure they are "Anyone with link can view" or shared directly.
⚙️ Configuration (User Setup)
For the Agent to work, notebooklm-mcp must be authenticated.
Robust Auth Setup (Recommended):
- Save browser cookies to
~/.nlm/cookies.txt.
- Register with auth injection:
Linux / macOS:
npx -y mcporter --config ~/.mcporter_config.json config add notebooklm --stdio \
"bash -c 'export NOTEBOOKLM_COOKIES=\$(cat ~/.nlm/cookies.txt); notebooklm-mcp --transport stdio'"
Windows (PowerShell):
npx -y mcporter --config "$HOME\.mcporter_config.json" config add notebooklm --stdio \
"powershell -c \"`$env:NOTEBOOKLM_COOKIES = Get-Content '$HOME\.nlm\cookies.txt' -Raw; notebooklm-mcp --transport stdio\""