Skip to main content
Glama
DevstackK

Notebooklm-Unofficial-API-MCP

by DevstackK

source_add

Adds URLs, YouTube links, text, files, or Google Drive documents to a NotebookLM notebook by name or ID; supports batch URL imports and small base64 file 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.5/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: it discloses asynchronous import semantics and the usually-processing echo, the upload_required/signed-URL branch for remote file adds, base64 size limits (<=10,000 chars vs 200 MiB), title-override failure signaling (#1960), inline error/warning flags, thin-text soft-404 detection, and that private fetch destinations are blocked.

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?

The 'Choose ONE mode' framing with bold mode headers front-loads the decision and makes a dense 17-parameter tool navigable. It is long and occasionally stacks parenthetical caveats, but for this branching complexity nearly every sentence carries necessary information, so the size is mostly earned.

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?

Given a highly complex tool with 17 parameters, zero schema description coverage and no annotations or output schema, the description covers inputs, mode selection, return shapes (source_wait aggregate, results[i] with commit_state) and failure handling. An agent has everything needed to invoke it correctly.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate for all 17 parameters, and it effectively does: it maps source_type values to their required inputs, explains path/bytes_base64 as alternatives, documents mime_type's enum and the no-default rationale (#1827), and covers filename, title, wait, timeout/interval, urls, fallback_fetch, cleanup_on_failure and allow_internal. This is far beyond the schema's bare names.

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

Purpose4/5

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

The description opens with a concrete verb+resource ('Add sources by notebook name or ID') and enumerates the three modes, so the agent knows exactly what the tool does. However it never differentiates itself from siblings like source_add_drive_file or source_add_play_book, and it even overlaps the former by accepting source_type='drive', leaving that routing ambiguity unresolved.

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?

Guidance on when each mode applies is explicit and includes exclusions ('wait is single-mode only', 'Single-mode inputs and wait are invalid with urls', 'Batch is URL-only'). What it lacks is routing advice relative to alternative sibling tools, so an agent choosing between this and source_add_drive_file gets no help.

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