edit-source

A command for editing a source inside a NotebookLM notebook, a workspace that uses uploaded sources for AI-assisted research. Because the API cannot edit a source directly, it replaces the old source with an edited copy.

In plain words
What is it for?
Use it to choose a notebook source, retrieve its content, replace or modify text, review the proposed changes, and create the updated source.
Why use it?
It provides a workflow for changing source text despite that API limitation, while showing the source and a preview before replacement.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/creatmanceo/notebooklm-claude-workflows/edit-source
Clone the repo
git clone --depth 1 https://github.com/CreatmanCEO/notebooklm-claude-workflows
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 618 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00618
Opus 5 $0.00000 $0.00309
Sonnet 5 $0.00000 $0.00124
Haiku 4.5 $0.00000 $0.00062

Measured 3d ago against content hash 6971d6bb311d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edit-source scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/edit-source.md · 50 lines

How it starts

The opening of the file, as written. The whole thing — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/edit-source — Редактирование источника в NotebookLM

NotebookLM API не поддерживает прямое редактирование источников. Эта команда обходит ограничение: извлекает контент, позволяет отредактировать, удаляет старый и создаёт новый.

Параметр

$ARGUMENTS — название ноутбука или notebook_id

Действия

Шаг 1: Выбор источника

  1. Получи список источников через notebook_get для указанного ноутбука
  2. Покажи пользователю пронумерованный список источников с типом и названием
  3. Спроси какой источник нужно отредактировать

Шаг 2: Извлечение контента

  1. Получи содержимое через source_get_content по source_id
  2. Покажи пользователю текущий контент (или первые 500 символов если большой)
  3. Сохрани: source_id, title, полный текст

Шаг 3: Редактирование

  1. Спроси пользователя что нужно изменить. Варианты:
    • Заменить текст: "замени X на Y"
    • Добавить текст: "добавь в конец/начало: ..."
    • Удалить часть: "удали абзац про X"
    • Полная замена: пользователь вставляет новый текст целиком
  2. Примени изменения к полному тексту

Шаг 4: Замена источника

  1. Покажи превью изменённого контента (первые 500 символов + diff если возможно)
  2. Спроси подтверждение: "Заменить источник? Старый будет удалён."
  3. Если да:
    • Удали старый: source_delete с source_id и confirm=true
    • Создай новый: source_add с source_type=text, title (оригинальное название), text (изменённый контент), wait=true
  4. Покажи результат: "Источник обновлён. Новый source_id: ..."

Ограничения

  • Работает только с текстовыми источниками (source_type=text)
  • Для URL/YouTube/файловых источников: контент можно извлечь через source_get_content, но при замене тип станет text (теряется привязка к URL)
  • Для Google Drive источников лучше: отредактировать документ в Drive → source_sync_drive

Для Drive-источников (альтернативный путь)

Если источник из Google Drive:

  1. Сообщи пользователю: "Этот источник из Google Drive. Отредактируй документ в Drive, затем я синхронизирую."
  2. Дождись подтверждения
  3. Выполни source_sync_drive с source_ids и confirm=true

Read the full file on GitHub · 50 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 50 lines · 0 tokens per session scan A 6971d6bb311d

Subscribe to this mod's changes

edit-source is a command published in the GitHub repository CreatmanCEO/notebooklm-claude-workflows (5 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 618 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.