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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query to find matching panels | |
| limit | No | Maximum number of results to return (default: 10) |
Implementation Reference
- src/index.ts:310-348 (handler)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 ), }, ], }; }
- src/index.ts:92-106 (schema)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"], }, },