Skip to main content
Glama
dougrn

NotebookLM MCP Server

by dougrn

Source Add

source_add

Add URLs, YouTube links, text, files, Drive docs, or base64 bytes to a NotebookLM notebook by name or ID, including single, batch, and in-channel uploads.

Instructions

Add sources by notebook name or ID: single, batch, or in-channel bytes.

Choose ONE mode:

Single mode — pass source_type; it selects the required input:

  • url / youtube — require url (youtube → a YouTube link).

  • text — requires text; title optional.

  • file — over stdio, requires path (a local path on the server host inside NOTEBOOKLM_MCP_ALLOWED_ROOTS; host-path file-add is off until that env is set — not $HOME and not ~/.notebooklm). Over the remote (http) connector the host filesystem is unreachable, so it returns upload_required with two actor paths: human_upload (open the signed URL in a browser) and agent_upload (an agent POSTs the bytes as the raw body); agent_instructions gives the rule (try agent_upload, else human_upload.url). Alternatively pass bytes_base64 to add a SMALL file in-channel (any transport, no signed URL): standard base64 (not URL-safe) ≤ 10,000 chars (≈ 7 KB); filename seeds the title/extension. A bigger file must take the signed URL (≤ 200 MiB).

  • drive — requires document_id + mime_type (one of google-doc|google-slides|google-sheets|pdf; required, no default — a wrong default fails non-Doc imports, #1827).

The single-mode content inputs are mutually exclusive — supply only the one your source_type requires (bytes_base64 is the file alternative to path). An explicit title for url/youtube/drive is honored via a post-add rename; a miss returns title_override_applied: false (#1960).

Pass wait=true to block until the ONE added source finishes processing and return the source_wait aggregate (buckets + per-bucket *_count + total_count) with a top-level source_id (present even on timeout/failure); timeout/interval tune the poll. wait is single-mode only and NOT for a remote file signed-URL upload (add it, then source_wait). Without wait the added source is echoed under source with string kind / status_label labels; imports are ASYNCHRONOUS so the echo is usually still processing/preparing — confirm with source_wait or source_list(status="error"). A failed import is flagged inline (status_label="error" + a warning); source_wait also flags a READY web page with suspiciously thin text (dead link/soft-404/paywall).

Single web URLs support fallback_fetch=True: eligible connection failures become static text with fallback provenance (impersonate + markdown extras). cleanup_on_failure=True additionally deletes the attributable failed stub once its replacement is ready. Private fetch destinations are blocked.

Batch mode — pass urls (http/https, including YouTube). Returns notebook_id, added/failed counts and per-input results with input, status (added/error), source fields or an error object.

results[i] corresponds to urls[i] and includes commit_state (confirmed/rejected/unknown/not_sent). Batch is URL-only; invalid entries are not_sent errors. Escaping failures retain settled members as batch_outcome. Single-mode inputs and wait are invalid with urls; allow_internal applies to every entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
pathNo
textNo
urlsNo
waitNo
titleNo
timeoutNo
filenameNo
intervalNo
notebookYes
mime_typeNo
document_idNo
source_typeNo
bytes_base64No
allow_internalNo
fallback_fetchNo
cleanup_on_failureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so richly: imports are asynchronous with typically 'processing'/'preparing' echoes, failures are flagged inline with status_label='error' plus a warning, remote file-adds return upload_required with two actor paths, private destinations are blocked, and wait semantics/timeout behavior are spelled out. This is far beyond what any structural field conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but well out-organized: the mode-selection rule is front-loaded, bold headers separate single vs batch, and bullets map inputs to source_type. It loses a point for embedded internal issue references (#1827, #1960) that add noise rather than agent-usable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description explains the return shapes it can produce (source_wait aggregate with buckets and counts, a top-level source_id even on failure, the source echo with kind/status_label, and batch results with commit_state). For a 17-parameter, multi-mode tool this covers everything an agent needs to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 17 parameters, so the description must compensate, and it does for most: source_type, url, text, path, filename, document_id, mime_type, bytes_base64 (with format and size limits), wait/timeout/interval, title, and urls all get concrete semantics. A few (allow_internal, cleanup_on_failure's exact target) get only glancing treatment, leaving the full compensation slightly incomplete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Add sources by notebook name or ID') and immediately enumerates the three operating modes (single, batch, in-channel bytes), so an agent knows exactly what the tool does before reading any schema. The mode taxonomy is precise enough that the tool is distinguishable from siblings like source_list or source_wait.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent to 'Choose ONE mode' and gives the selection rule for each ('pass source_type' vs 'pass urls'), plus exclusion rules ('Single-mode inputs and wait are invalid with urls'). It does not, however, address when to prefer this tool over the sibling source_add_drive_file or source_add_play_book, both of which overlap with modes described here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.