list_notebooks
Retrieve available library notebooks with metadata to select appropriate sources for AI-powered document queries and synthesized responses.
Instructions
List all library notebooks with metadata (name, topics, use cases, URL). Use this to present options, then ask which notebook to use for the task.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/handlers.ts:597-617 (handler)The main handler function for the 'list_notebooks' tool. It logs the call, retrieves notebooks from the library, and returns them in a standardized ToolResult format, with error handling.* Handle list_notebooks tool */ async handleListNotebooks(): Promise<ToolResult<{ notebooks: any[] }>> { log.info(`🔧 [TOOL] list_notebooks called`); try { const notebooks = this.library.listNotebooks(); log.success(`✅ [TOOL] list_notebooks completed (${notebooks.length} notebooks)`); return { success: true, data: { notebooks }, }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error(`❌ [TOOL] list_notebooks failed: ${errorMessage}`); return { success: false, error: errorMessage, }; } }
- The input/output schema definition for the 'list_notebooks' tool, part of the notebookManagementTools array. It has no required input parameters.{ name: "list_notebooks", description: "List all library notebooks with metadata (name, topics, use cases, URL). " + "Use this to present options, then ask which notebook to use for the task.", inputSchema: { type: "object", properties: {}, }, },
- The underlying library method called by the handler, which simply returns the array of notebooks from the stored library data.listNotebooks(): NotebookEntry[] { return this.library.notebooks; }
- src/index.ts:185-187 (registration)The dispatch case in the main MCP tool execution switch statement that routes 'list_notebooks' calls to the appropriate handler method.case "list_notebooks": result = await this.toolHandlers.handleListNotebooks(); break;