Skip to main content
Glama

search_notebooks

Find relevant notebooks in your library by searching names, descriptions, topics, and tags to identify useful resources for your task.

Instructions

Search library by query (name, description, topics, tags). Use to propose relevant notebooks for the task and then ask which to use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • The primary handler function for the 'search_notebooks' tool. It logs the call, searches the notebook library using the provided query, returns the matching notebooks on success, or an error message on failure.
    * Handle search_notebooks tool */ async handleSearchNotebooks(args: { query: string }): Promise<ToolResult<{ notebooks: any[] }>> { log.info(`🔧 [TOOL] search_notebooks called`); log.info(` Query: "${args.query}"`); try { const notebooks = this.library.searchNotebooks(args.query); log.success(`✅ [TOOL] search_notebooks completed (${notebooks.length} results)`); return { success: true, data: { notebooks }, }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error(`❌ [TOOL] search_notebooks failed: ${errorMessage}`); return { success: false, error: errorMessage, }; } }
  • The tool definition including name, description, and input schema (requires 'query' string) for 'search_notebooks'.
    { name: "search_notebooks", description: "Search library by query (name, description, topics, tags). " + "Use to propose relevant notebooks for the task and then ask which to use.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query", }, }, required: ["query"], }, },
  • src/index.ts:222-226 (registration)
    MCP server dispatches 'search_notebooks' tool calls to the ToolHandlers.handleSearchNotebooks method.
    case "search_notebooks": result = await this.toolHandlers.handleSearchNotebooks( args as { query: string } ); break;
  • Core search logic in NotebookLibrary that filters notebooks matching the query in name, description, topics, or tags.
    searchNotebooks(query: string): NotebookEntry[] { const lowerQuery = query.toLowerCase(); return this.library.notebooks.filter( (n) => n.name.toLowerCase().includes(lowerQuery) || n.description.toLowerCase().includes(lowerQuery) || n.topics.some((t) => t.toLowerCase().includes(lowerQuery)) || n.tags?.some((t) => t.toLowerCase().includes(lowerQuery)) ); }

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