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))
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool searches and proposes notebooks, but doesn't describe key behaviors like whether it returns a list, how results are ranked, if there are limits on results, or what happens if no matches are found. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core functionality (searching by query) and includes a usage tip. It avoids unnecessary words, though the second part about proposing and asking could be slightly more integrated for optimal flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter with full schema coverage but no annotations or output schema, the description is adequate but incomplete. It covers the purpose and basic usage but lacks details on behavioral traits (e.g., result format, error handling) and doesn't explain return values, which is a gap since there's no output schema to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'query' documented as a search query. The description adds value by specifying what the query can match (name, description, topics, tags), which provides semantic context beyond the schema. However, it doesn't detail query syntax or examples, so it meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches a library using a query that can match name, description, topics, and tags, which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'list_notebooks' or 'get_notebook', which might offer alternative ways to find notebooks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: to propose relevant notebooks for a task based on a search query, and then ask which to use. This implies it's for discovery and selection purposes. However, it doesn't explicitly state when not to use it or name alternatives like 'list_notebooks' for unfiltered listing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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