search_granola_panels
Search structured note sections in Granola documents using a query string 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 execution handler for the 'search_granola_panels' tool. It searches Granola documents using the API client, filters for those with a 'last_viewed_panel', extracts and 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:88-107 (schema)The tool schema definition including name, description, and input schema (query string required, optional limit) for 'search_granola_panels', registered in the tools list for MCP.{ 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"], }, },
- src/index.ts:152-154 (registration)Registration of the tools list handler, which exposes the 'search_granola_panels' schema via ListToolsRequestSchema.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools, }));