mcpField
N
notebooklm

notebooklm

github.com/mathews-tomProductivity33795 installsUpdated 4d ago
Repository

About notebooklm

notebooklm is an automation skill for operating Google NotebookLM from the command line, for users who need programmatic control of notebooks, sources, and generated content. It covers source imports, questions about content, and generation and download of multiple artifact types, with JSON output for automation.

Key features

  1. 01Create notebooks and manage sources
  2. 02Ask about source content with references
  3. 03Generate podcasts, videos, reports, and more
  4. 04Download generated results in multiple formats
  5. 05Use JSON output for automation

Use cases

  1. 01Build research notebooks from web pages or documents
  2. 02Ask questions about selected sources and inspect citations
  3. 03Turn research material into a podcast or report
  4. 04Import sources in bulk and export artifacts

MCP support

The input does not describe MCP integration or MCP server capabilities.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/mathews-tom/armory --skill notebooklm

After installing, type/notebooklmin Claude Code to confirm it loaded.

Bundled filesevals/cases.yaml

Details

From the project README

NotebookLM Automation

Complete programmatic access to Google NotebookLM — including capabilities not exposed in the web UI. Create notebooks, add sources (URLs, YouTube, PDFs, audio, video, images), chat with content, generate all artifact types, and download results in multiple formats.

Prerequisites

Installation
uv tool install notebooklm-py
Authentication (one-time)
notebooklm login          # Opens browser for Google OAuth
notebooklm list           # Verify authentication works

If commands fail with auth errors, re-run notebooklm login.

Verify Setup
notebooklm --version
notebooklm status         # Shows "Authenticated as: email@..."
notebooklm list --json    # Should return valid JSON
CI/CD and Parallel Agents
VariablePurpose
NOTEBOOKLM_HOMECustom config directory (default: ~/.notebooklm)
NOTEBOOKLM_AUTH_JSONInline auth JSON — no file writes needed

Parallel agents: The CLI stores notebook context in ~/.notebooklm/context.json. Multiple concurrent agents using notebooklm use overwrite each other's context. Use explicit -n <notebook_id> or --notebook <notebook_id> flags instead, or set unique NOTEBOOKLM_HOME per agent.

Quick Reference

TaskCommand
Authenticatenotebooklm login
Diagnose authnotebooklm auth check --test
List notebooksnotebooklm list
Create notebooknotebooklm create "Title"
Set contextnotebooklm use <notebook_id>
Show contextnotebooklm status
Add URL sourcenotebooklm source add "https://..."
Add filenotebooklm source add ./file.pdf
Add YouTubenotebooklm source add "https://youtube.com/..."
List sourcesnotebooklm source list
Wait for sourcenotebooklm source wait <source_id>
Web research (fast)notebooklm source add-research "query"
Web research (deep)notebooklm source add-research "query" --mode deep --no-wait
Check research statusnotebooklm research status
Wait for researchnotebooklm research wait --import-all
Chatnotebooklm ask "question"
Chat (new conversation)notebooklm ask "question" --new
Chat (specific sources)notebooklm ask "question" -s src_id1 -s src_id2
Chat (with references)notebooklm ask "question" --json
Get source fulltextnotebooklm source fulltext <source_id>
Get source guidenotebooklm source guide <source_id>
Generate podcastnotebooklm generate audio "instructions"
Generate videonotebooklm generate video "instructions"
Generate quiznotebooklm generate quiz
Generate infographicnotebooklm generate infographic
Generate slide decknotebooklm generate slide-deck
Generate reportnotebooklm generate report
Generate mind mapnotebooklm generate mind-map
Generate data tablenotebooklm generate data-table "description"
Generate flashcardsnotebooklm generate flashcards
Check artifact statusnotebooklm artifact list
Wait for completionnotebooklm artifact wait <artifact_id>
Download audionotebooklm download audio ./output.mp3
Download videonotebooklm download video ./output.mp4
Download reportnotebooklm download report ./report.md
Download mind mapnotebooklm download mind-map ./map.json
Download data tablenotebooklm download data-table ./data.csv
Download quiznotebooklm download quiz quiz.json
Download quiz (markdown)notebooklm download quiz --format markdown quiz.md
Download flashcardsnotebooklm download flashcards cards.json
Download infographicnotebooklm download infographic ./infographic.png
Download slide decknotebooklm download slide-deck ./slides.pdf
List languagesnotebooklm language list
Set languagenotebooklm language set zh_Hans

Partial IDs: Use the first 6+ characters of UUIDs. Must be a unique prefix. Prefer full UUIDs in automation.

Autonomy Rules

Run without confirmation:

  • status, auth check, list, source list, artifact list, language list/get/set
  • use <id>, create, ask "...", source add
  • source wait, artifact wait, research wait/status (in subagent context)

Confirm before running:

  • delete — destructive
  • generate * — long-running, may fail due to rate limits
  • download * — writes to filesystem
  • artifact wait, source wait, research wait — long-running (in main conversation)

Generation Types

All generate commands support:

  • -s, --source to use specific source(s) instead of all
  • --language to override output language
  • --json for machine-readable output (returns task_id and status)
  • --retry N for automatic retry with exponential backoff
TypeCommandKey OptionsDownload Format
Podcastgenerate audio--format [deep-dive|brief|critique|debate], --length [short|default|long].mp3
Videogenerate video--format [explainer|brief], --style [auto|classic|whiteboard|kawaii|anime|watercolor|retro-print|heritage|paper-craft].mp4
Slide Deckgenerate slide-deck--format [detailed|presenter], --length [default|short].pdf
Infographicgenerate infographic--orientation [landscape|portrait|square], --detail [concise|standard|detailed].png
Reportgenerate report--format [briefing-doc|study-guide|blog-post|custom].md
Mind Mapgenerate mind-map(sync, instant).json
Data Tablegenerate data-tabledescription required.csv
Quizgenerate quiz--difficulty [easy|medium|hard], --quantity [fewer|standard|more].json/.md/.html
Flashcardsgenerate flashcards--difficulty [easy|medium|hard], --quantity [fewer|standard|more].json/.md/.html

Features Beyond the Web UI

FeatureCommandDescription
Batch downloadsdownload <type> --allDownload all artifacts of a type at once
Quiz/Flashcard exportdownload quiz --format jsonExport as JSON, Markdown, or HTML
Mind map extractiondownload mind-mapHierarchical JSON for visualization tools
Data table exportdownload data-tableStructured tables as CSV
Source fulltextsource fulltext <id>Retrieve the indexed text content of any source
Programmatic sharingshare commandsManage sharing permissions without the UI

JSON Output Formats

Use --json for machine-readable output:

Create notebook:

{ "id": "abc123de-...", "title": "Research" }

Add source:

{ "source_id": "def456...", "title": "Example", "status": "processing" }

Generate artifact:

{ "task_id": "xyz789...", "status": "pending" }

Chat with references:

{
  "answer": "X is... [1] [2]",
  "conversation_id": "...",
  "references": [
    {
      "source_id": "abc123...",
      "citation_number": 1,
      "cited_text": "Relevant passage..."
    }
  ]
}

Source list:

{
  "sources": [
    { "id": "...", "title": "...", "status": "ready|processing|error" }
  ]
}

Artifact list:

{
  "artifacts": [
    {
      "id": "...",
      "title": "...",
      "type": "Audio Overview",
      "status": "in_progress|pending|completed|unknown"
    }
  ]
}

Common Workflows

Research to Podcast
  1. notebooklm create "Research: [topic]" --json — capture notebook ID
  2. notebooklm source add "https://..." --json for each source — capture source IDs
  3. notebooklm source list --json — wait until all status=ready
  4. notebooklm generate audio "Focus on [angle]" --json — capture artifact ID
  5. notebooklm artifact wait <artifact_id> — blocks until complete
  6. notebooklm download audio ./podcast.mp3
Document Analysis
  1. notebooklm create "Analysis: [project]"
  2. notebooklm source add ./doc.pdf
  3. notebooklm ask "Summarize the key points"
  4. Continue chatting as needed
Bulk Import
  1. notebooklm create "Collection: [name]"
  2. Add sources (max 50 per notebook):
    notebooklm source add "https://url1.com" --json
    notebooklm source add "https://url2.com" --json
    notebooklm source add ./local-file.pdf --json
    
  3. notebooklm source list --json to verify

Supported source types: PDFs, YouTube URLs, web URLs, Google Docs, text files, Markdown, Word docs, audio files, video files, images.

Deep Web Research
  1. notebooklm create "Research: [topic]"
  2. Start deep research: notebooklm source add-research "topic" --mode deep --no-wait
  3. Wait: notebooklm research wait --import-all --timeout 300
  4. Sources auto-imported when research completes

Modes: --mode fast (5-10 sources, seconds) vs --mode deep (20+ sources, 2-5 min). Search from: --from web (default) or --from drive (Google Drive).

Subagent Pattern for Long Operations

For non-blocking generation, spawn a background agent:

  1. Run notebooklm generate audio "..." --json — parse artifact_id
  2. Spawn a Task agent to wait and download:
    Wait for artifact {artifact_id} in notebook {notebook_id} to complete.
    Use: notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600
    Then: notebooklm download audio ./podcast.mp3 -a {artifact_id} -n {notebook_id}
    
  3. Main conversation continues while agent waits

Processing Times

OperationTypical TimeSuggested Timeout
Source processing30s - 10 min600s
Research (fast)30s - 2 min180s
Research (deep)15 - 30+ min1800s
Mind mapinstant (sync)n/a
Notesinstantn/a
Quiz, flashcards5 - 15 min900s
Report, data table5 - 15 min900s
Audio generation10 - 20 min1200s
Video generation15 - 45 min2700s

Error Handling

ErrorCauseAction
Auth/cookie errorSession expirednotebooklm auth check then notebooklm login
"No notebook context"Context not setUse -n <id> flag or notebooklm use <id>
"No result found for RPC ID"Rate limitingWait 5-10 min, retry
GENERATION_FAILEDGoogle rate limitWait and retry later
Download failsGeneration incompleteCheck artifact list for status
Invalid notebook/source IDWrong IDRun notebooklm list to verify
RPC protocol errorGoogle changed APIsMay need CLI update (uv tool upgrade notebooklm-py)

Exit codes: 0 = success, 1 = error, 2 = timeout (wait commands only).

Reliable operations: Notebooks, sources, chat, mind map, report, data table. May hit rate limits: Audio, video, quiz, flashcards, infographic, slide deck.

Language Configuration

Language is a global setting affecting all notebooks.

notebooklm language list              # 80+ supported languages
notebooklm language get               # Current setting
notebooklm language set ja            # Set globally
notebooklm generate audio --language ja  # Override per command

Common codes: en, zh_Hans, zh_Hant, ja, ko, es, fr, de, pt_BR.

Limitations

  • Unofficial API: Uses browser automation via notebooklm-py. May break if Google changes NotebookLM internals. Not affiliated with Google.
  • 50 sources per notebook: Hard limit from NotebookLM.
  • Rate limiting: Generation endpoints are rate-limited by Google. No workaround beyond waiting.
  • Auth expiry: Google OAuth sessions expire. Re-run notebooklm login when auth fails.
  • No streaming: Chat responses are returned in full, not streamed.
  • Single-agent context: notebooklm use writes to a shared file. Use -n flags for parallel workflows.

Comments

Markdown supported