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"], }, },

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