Skip to main content
Glama

update_notebook

Modify notebook metadata including topics, description, tags, and use cases to keep content organized and current.

Instructions

Update notebook metadata based on user intent.

Pattern

  1. Identify target notebook and fields (topics, description, use_cases, tags, url)

  2. Propose the exact change back to the user

  3. After explicit confirmation, call this tool

Examples

  • User: "React notebook also covers Next.js 14" You: "Add 'Next.js 14' to topics for React?" User: "Yes" → call update_notebook

  • User: "Include error handling in n8n description" You: "Update the n8n description to mention error handling?" User: "Yes" → call update_notebook

Tip: You may update multiple fields at once if requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe notebook ID to update
nameNoNew display name
descriptionNoNew description
topicsNoNew topics list
content_typesNoNew content types
use_casesNoNew use cases
tagsNoNew tags
urlNoNew notebook URL

Implementation Reference

  • Main MCP tool handler: receives args, delegates to library.updateNotebook, handles errors and logging.
    * Handle update_notebook tool */ async handleUpdateNotebook(args: UpdateNotebookInput): Promise<ToolResult<{ notebook: any }>> { log.info(`🔧 [TOOL] update_notebook called`); log.info(` ID: ${args.id}`); try { const notebook = this.library.updateNotebook(args); log.success(`✅ [TOOL] update_notebook completed: ${notebook.name}`); return { success: true, data: { notebook }, }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error(`❌ [TOOL] update_notebook failed: ${errorMessage}`); return { success: false, error: errorMessage, }; } }
  • Core library function that performs the actual notebook update by merging new fields into the library data and persisting it.
    updateNotebook(input: UpdateNotebookInput): NotebookEntry { const notebook = this.getNotebook(input.id); if (!notebook) { throw new Error(`Notebook not found: ${input.id}`); } log.info(`📝 Updating notebook: ${input.id}`); const updated = { ...this.library }; const index = updated.notebooks.findIndex((n) => n.id === input.id); updated.notebooks[index] = { ...notebook, ...(input.name && { name: input.name }), ...(input.description && { description: input.description }), ...(input.topics && { topics: input.topics }), ...(input.content_types && { content_types: input.content_types }), ...(input.use_cases && { use_cases: input.use_cases }), ...(input.tags && { tags: input.tags }), ...(input.url && { url: input.url }), }; this.saveLibrary(updated); log.success(`✅ Notebook updated: ${input.id}`); return updated.notebooks[index]; }
  • TypeScript interface defining the input parameters for updating a notebook.
    export interface UpdateNotebookInput { id: string; // Required: which notebook to update name?: string; description?: string; topics?: string[]; content_types?: string[]; use_cases?: string[]; tags?: string[]; url?: string; // Allow changing URL }
  • MCP tool definition including name, description, and JSON input schema for registration.
    name: "update_notebook", description: `Update notebook metadata based on user intent. ## Pattern 1) Identify target notebook and fields (topics, description, use_cases, tags, url) 2) Propose the exact change back to the user 3) After explicit confirmation, call this tool ## Examples - User: "React notebook also covers Next.js 14" You: "Add 'Next.js 14' to topics for React?" User: "Yes" → call update_notebook - User: "Include error handling in n8n description" You: "Update the n8n description to mention error handling?" User: "Yes" → call update_notebook Tip: You may update multiple fields at once if requested.`, inputSchema: { type: "object", properties: { id: { type: "string", description: "The notebook ID to update", }, name: { type: "string", description: "New display name", }, description: { type: "string", description: "New description", }, topics: { type: "array", items: { type: "string" }, description: "New topics list", }, content_types: { type: "array", items: { type: "string" }, description: "New content types", }, use_cases: { type: "array", items: { type: "string" }, description: "New use cases", }, tags: { type: "array", items: { type: "string" }, description: "New tags", }, url: { type: "string", description: "New notebook URL", }, }, required: ["id"], }, },
  • src/index.ts:201-214 (registration)
    Dispatch routing in main server that maps tool name to handler call.
    case "update_notebook": result = await this.toolHandlers.handleUpdateNotebook( args as { id: string; name?: string; description?: string; topics?: string[]; content_types?: string[]; use_cases?: string[]; tags?: string[]; url?: string; } ); break;

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