Skip to main content
Glama

get_notebook

Retrieve detailed information about a specific notebook by ID to access its content and metadata for querying and analysis.

Instructions

Get detailed information about a specific notebook by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe notebook ID

Implementation Reference

  • The primary handler function that implements the core logic of the 'get_notebook' tool. It retrieves the notebook by ID from the library, handles errors if not found, and returns the notebook data or an error.
    async handleGetNotebook(args: { id: string }): Promise<ToolResult<{ notebook: any }>> { log.info(`🔧 [TOOL] get_notebook called`); log.info(` ID: ${args.id}`); try { const notebook = this.library.getNotebook(args.id); if (!notebook) { log.warning(`⚠️ [TOOL] Notebook not found: ${args.id}`); return { success: false, error: `Notebook not found: ${args.id}`, }; } log.success(`✅ [TOOL] get_notebook completed: ${notebook.name}`); return { success: true, data: { notebook }, }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error(`❌ [TOOL] get_notebook failed: ${errorMessage}`); return { success: false, error: errorMessage, }; } }
  • The tool schema definition for 'get_notebook', specifying the input schema (requires 'id' string) and description used by the MCP protocol.
    { name: "get_notebook", description: "Get detailed information about a specific notebook by ID", inputSchema: { type: "object", properties: { id: { type: "string", description: "The notebook ID", }, }, required: ["id"], }, },
  • src/index.ts:189-193 (registration)
    The registration/dispatch logic in the main MCP server that maps incoming 'get_notebook' tool calls to the corresponding handler method.
    case "get_notebook": result = await this.toolHandlers.handleGetNotebook( args as { id: string } ); break;
  • The underlying helper method in NotebookLibrary that performs the actual notebook lookup by ID, used by the tool handler.
    getNotebook(id: string): NotebookEntry | null { return this.library.notebooks.find((n) => n.id === id) || null; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/inventra/notebooklm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server