NotebookLM Integration
Interact with Google NotebookLM for advanced RAG capabilities β query project documentation, manage research sources, and retrieve AI-synthesized information from notebooks.
Overview
This skill integrates with the notebooklm-mcp-cli tool (nlm CLI) to provide programmatic access to Google NotebookLM. It enables agents to manage notebooks, add sources, perform contextual queries, and retrieve generated artifacts like audio podcasts or reports.
When to Use
Use this skill when:
- Querying project documentation stored in Google NotebookLM
- Retrieving AI-synthesized information from notebooks (e.g., summaries, Q&A)
- Managing notebooks: creating, listing, renaming, or deleting
- Adding sources to notebooks: URLs, text, files, YouTube, Google Drive
- Generating studio content: audio podcasts, video explainers, reports, quizzes
- Downloading generated artifacts (audio, video, reports, mind maps)
- Performing research queries across web or Google Drive
- Checking freshness and syncing Google Drive sources
- An agent is tasked with using documentation stored in NotebookLM for implementation
Trigger phrases: "query notebooklm", "search notebook", "add source to notebook", "create podcast from notebook", "generate report from notebook", "nlm query"
Prerequisites
Installation
uv tool install notebooklm-mcp-cli
pip install notebooklm-mcp-cli
nlm --version
Authentication
nlm login
nlm login --check
nlm login --profile work
nlm login --profile personal
nlm login switch work
Diagnostics
nlm doctor
nlm doctor --verbose
β οΈ Important: This tool uses internal Google APIs. Cookies expire every ~2-4 weeks β run nlm login again when operations fail. Free tier has ~50 queries/day rate limit.
Instructions
Step 1: Verify Tool Availability
Before performing any NotebookLM operation, verify the CLI is installed and authenticated:
nlm --version && nlm login --check
If authentication has expired, inform the user they need to run nlm login.
Step 2: Identify the Target Notebook
List available notebooks or resolve an alias:
nlm notebook list
nlm alias get <alias-name>
nlm notebook get <notebook-id>
If the user references a notebook by name, use nlm notebook list to find the matching ID. If an alias exists, prefer using the alias.
Step 3: Perform the Requested Operation
Querying a Notebook
Use this to retrieve information from notebook sources:
nlm notebook query <notebook-id-or-alias> "What are the login requirements?"
Best practices for queries:
- Be specific and detailed in your questions
- Reference particular topics or sections when possible
- Use follow-up queries to drill deeper into specific areas
Managing Sources
nlm source list <notebook-id>
nlm source add <notebook-id> --url "<user-provided-url>" --wait
nlm source add <notebook-id> --text "Content here" --title "My Notes"
nlm source add <notebook-id> --file document.pdf --wait
nlm source add <notebook-id> --youtube "<user-provided-youtube-url>"
nlm source add <notebook-id> --drive <document-id>
nlm source stale <notebook-id>
nlm source sync <notebook-id> --confirm
nlm source get <source-id>
Creating a Notebook
nlm notebook create "Project Documentation"
nlm alias set myproject <notebook-id>
Generating Studio Content
nlm audio create <notebook-id> --format deep_dive --length long --confirm
nlm video create <notebook-id> --format explainer --style classic --confirm
nlm report create <notebook-id> --format "Briefing Doc" --confirm
nlm quiz create <notebook-id> --count 10 --difficulty medium --confirm
nlm studio status <notebook-id>
Downloading Artifacts
nlm download audio <notebook-id> <artifact-id> --output podcast.mp3
nlm download report <notebook-id> <artifact-id> --output report.md
nlm download slide-deck <notebook-id> <artifact-id> --output slides.pdf
Research
nlm research start "<user-provided-query>" --notebook-id <notebook-id> --mode fast
nlm research start "<user-provided-query>" --notebook-id <notebook-id> --mode deep
nlm research status <notebook-id> --max-wait 300
nlm research import <notebook-id> <task-id>
Step 4: Present Results for User Review
- Parse the CLI output and present information clearly to the user
- For queries, present the AI-generated answer with relevant context β always ask for user confirmation before using query results to drive implementation or code changes
- For list operations, format results in a readable table
- For long-running operations (audio, video), inform the user about expected wait times (1-5 minutes)
- Never autonomously act on NotebookLM output β always present results and wait for user direction
Aliases
The alias system provides user-friendly shortcuts for notebook UUIDs:
nlm alias set <name> <notebook-id>
nlm alias list
nlm alias get <name>
nlm alias delete <name>
Aliases can be used in place of notebook IDs in any command.
Examples
Example 1: Query Documentation for Implementation
Task: "Write the login use case based on documentation in NotebookLM"
nlm notebook list
Expected output:
ID Title Sources Created
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
abc123... Project X Docs 12 2026-01-15
def456... API Reference 5 2026-02-01
nlm notebook query myproject "What are the login requirements and user authentication flows?"
Expected output:
Based on the sources in this notebook:
The login flow requires email/password authentication with the following steps:
1. User submits credentials via POST /api/auth/login
2. Server validates against stored bcrypt hash
3. JWT access token (15min) and refresh token (7d) are returned
...
nlm notebook query myproject "What validation rules apply to the login form?"
Example 2: Build a Research Notebook
Task: "Create a notebook with our API docs and generate a summary"
nlm notebook create "API Documentation"
Expected output:
Created notebook: API Documentation
ID: ghi789...
nlm alias set api-docs ghi789
nlm source add api-docs --url "<user-provided-url>" --wait
nlm source add api-docs --file openapi-spec.yaml --wait
nlm report create api-docs --format "Briefing Doc" --confirm
nlm studio status api-docs
Expected output:
Artifact ID Type Status Created
ββββββββββββββββββββββββββββββββββββββββββββββββββ
art123... Report completed 2026-02-27
nlm download report api-docs art123 --output api-summary.md
Example 3: Generate a Podcast from Project Docs
nlm source add myproject --url "<user-provided-url>" --wait