简介
通过 nlm CLI 查询 NotebookLM 中已上传的文档,支持自然语言问答和摘要提取,适用于企业内部知识库检索。
原始描述
Search and answer questions over documents already uploaded to NotebookLM using the nlm CLI. Use when users ask to find information, summarize sources, or query a specific NotebookLM notebook.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
技能正文
name: notebooklm-cli description: Search and answer questions over documents already uploaded to NotebookLM using the nlm CLI. Use when users ask to find information, summarize sources, or query a specific NotebookLM notebook. metadata: {"openclaw":{"requires":{"bins":["nlm"],"env":["NOTEBOOKLM_MCP_CLI_PATH"]}}} user-invocable: true
NotebookLM CLI
Purpose
Use this skill when the user wants to search or ask questions over content that already exists in NotebookLM notebooks.
This skill assumes:
nlmis installed (notebooklm-mcp-clipackage).- Auth was pre-injected for headless runtime.
NOTEBOOKLM_MCP_CLI_PATHpoints to the auth storage directory.
Hard Rules (avoid wrong tool choices)
When the user mentions any of the following, treat it as a strict request to query NotebookLM:
- "NotebookLM", "notebooklm"
- "notebook alias", "alias"
- a known alias name (for example:
tai_lieu_dien,nlm_tai_lieu_dien)
In these cases:
- Always run
nlmvia Exec to answer. Do not answer from memory. - Do not switch to web search unless the user explicitly asks for web sources.
- If the answer is not in the notebook, say so (based on the
nlmoutput).
Slash command:
- If the user invokes this skill via
/nlm ...in Telegram, treat the raw text after/nlmas thenlmarguments. - Always execute exactly:
nlm <args>via Exec, and return the relevant stdout.
Runtime Checks
Before running queries:
- Verify auth path is configured:
echo "$NOTEBOOKLM_MCP_CLI_PATH"
- Verify login status:
nlm login --check
If auth check fails, stop and ask for auth refresh workflow (do not run browser login in AWS runtime).
Query Workflow
- List notebooks:
nlm notebook list --json
- Select notebook:
- If user provided notebook id, use it directly.
- If user provided title, resolve it to
notebook_idfrom the list output (do not pass raw title intonlm notebook get/source list/query). - If user provided alias, use the alias.
- If ambiguous, ask user to choose one notebook.
- Query notebook:
nlm notebook query "<notebook_id_or_alias>" "<user_question>"
- Return answer and include which notebook was queried.
Notes:
nlm notebook listreturns titles for display, but many other commands expect a notebook id (UUID) or an alias. Passing a title like"tài liệu điện"may return null/empty results.- If the user will query the same notebook often, create an alias and use it consistently (for example:
tai_lieu_dien).
Telegram Prompt Templates (copy/paste)
Prefer one of these formats to reliably trigger this skill:
- Force CLI query:
Chạy lệnh: nlm notebook query tai_lieu_dien "giá của A9N61500 là bao nhiêu? Nếu notebook không có thông tin giá thì trả lời: không thấy trong NotebookLM."
- Natural language but explicit:
Trong NotebookLM notebook alias tai_lieu_dien: trả lời câu hỏi "giá của A9N61500 là bao nhiêu?". Bắt buộc dùng nlm để truy vấn, không tìm web, không đọc file local.
Output Guidelines
- Be explicit about notebook identity (title + id when available).
- If query result is empty or vague, suggest a refined follow-up query.
- Prefer concise, factual answers grounded in NotebookLM response.
Common Errors
Authentication expired/401/403:- Check
NOTEBOOKLM_MCP_CLI_PATH. - Ensure
profiles/default/cookies.jsonandprofiles/default/metadata.jsonexist. - Refresh cookies outside AWS (machine with browser), then redeploy secret.
- Check
nlm: command not found:- Install package:
pip install notebooklm-mcp-clioruv tool install notebooklm-mcp-cli.
- Install package:
Command Reference
# List notebooks
nlm notebook list --json
# Query notebook by id or alias
nlm notebook query "<notebook_id_or_alias>" "<question>"
# Check auth status
nlm login --check
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。