From 1d71b1f7c9d86812b05ca219ab4e23ddab4f14e3 Mon Sep 17 00:00:00 2001 From: Cristian Ugalde Date: Fri, 24 Apr 2026 18:12:47 -0400 Subject: [PATCH] Fix AttributeError: use sources_count instead of source_count The NotebookLM Notebook object exposes 'sources_count' (plural), not 'source_count'. Calling list_notebooks via the MCP tool raised: AttributeError: 'Notebook' object has no attribute 'source_count' Confirmed via runtime introspection that the correct attribute is sources_count. Co-Authored-By: Oz --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 1ffa3b3..e6b8ea9 100644 --- a/server.py +++ b/server.py @@ -52,7 +52,7 @@ async def list_notebooks(): """List all notebooks in your NotebookLM account.""" client = await get_client() notebooks = await client.notebooks.list() - return [{"id": nb.id, "title": nb.title, "source_count": nb.source_count} for nb in notebooks] + return [{"id": nb.id, "title": nb.title, "sources_count": nb.sources_count} for nb in notebooks] @mcp.tool() async def create_notebook(title: str):