Skip to main content
Glama
btn0s

Granola MCP Server

by btn0s

search_granola_panels

Search structured note sections in Granola documents using query strings to find relevant meeting content and document panels.

Instructions

Search through Granola document panels (structured note sections) by query string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find matching panels
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • The main handler function for the 'search_granola_panels' tool. It searches Granola documents using the API client, filters for documents with 'last_viewed_panel', converts panel content to Markdown, and returns a JSON-formatted list of matching panels.
    case "search_granola_panels": {
      const query = args?.query as string;
      const limit = (args?.limit as number) || 10;
      const results = await apiClient.searchDocuments(query, limit);
    
      const panelResults = results
        .filter((doc) => doc.last_viewed_panel)
        .map((doc) => {
          const panel = doc.last_viewed_panel;
          let markdown = "";
          if (panel?.content) {
            markdown = convertProseMirrorToMarkdown(panel.content);
          }
          return {
            id: panel?.id || doc.id,
            document_id: doc.id,
            heading: panel?.heading || doc.title,
            content: markdown.substring(0, 500) || "",
          };
        })
        .slice(0, limit);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                query,
                count: panelResults.length,
                results: panelResults,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Input schema defining the parameters for the 'search_granola_panels' tool: required 'query' string and optional 'limit' number.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query to find matching panels",
        },
        limit: {
          type: "number",
          description: "Maximum number of results to return (default: 10)",
          default: 10,
        },
      },
      required: ["query"],
    },
  • src/index.ts:88-107 (registration)
    Registration of the 'search_granola_panels' tool in the tools array used for listing available tools.
    {
      name: "search_granola_panels",
      description:
        "Search through Granola document panels (structured note sections) by query string.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query to find matching panels",
          },
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 10)",
            default: 10,
          },
        },
        required: ["query"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool searches by query string but doesn't disclose behavioral traits like whether it's read-only, how results are sorted, if there's pagination, error handling, or performance considerations. This is inadequate for a search tool with no annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and uses parenthetical clarification effectively, making it easy to parse quickly.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., read/write nature, sorting) and return values, which are critical for a search tool. The high schema coverage doesn't compensate for these gaps in context.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('query' and 'limit') fully. The description adds no additional meaning beyond what the schema provides, such as query syntax or result format details, meeting the baseline for high 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 action ('Search through') and resource ('Granola document panels'), specifying they are 'structured note sections'. It distinguishes from siblings like 'search_granola_notes' by focusing on panels, but doesn't explicitly contrast with other search tools like 'search_granola_events' or 'search_granola_transcripts'.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the name and description alone among multiple search siblings.

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/btn0s/granola-mcp'

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