search_granola_transcripts
Search meeting transcripts by query to find and retrieve relevant content from Granola meetings.
Instructions
Search through Granola meeting transcripts by query string. Returns matching transcripts with their content.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query to find matching transcripts | |
| limit | No | Maximum number of results to return (default: 10) |
Implementation Reference
- src/index.ts:221-260 (handler)Handler function implementing the core logic of the 'search_granola_transcripts' tool: parses arguments, searches documents via Granola API, filters for meeting transcripts, converts content to markdown, limits results, and formats JSON response.case "search_granola_transcripts": { const query = args?.query as string; const limit = (args?.limit as number) || 10; const results = await apiClient.searchDocuments(query, limit); const transcriptResults = results .filter((doc) => doc.type === "meeting") .map((doc) => { let markdown = ""; if (doc.last_viewed_panel?.content) { markdown = convertProseMirrorToMarkdown( doc.last_viewed_panel.content ); } return { id: doc.id, meeting_id: doc.id, title: doc.title, content: markdown.substring(0, 1000) || "", }; }) .slice(0, limit); return { content: [ { type: "text", text: JSON.stringify( { query, count: transcriptResults.length, results: transcriptResults, }, null, 2 ), }, ], }; }
- src/index.ts:48-67 (schema)Input schema and metadata definition for the 'search_granola_transcripts' tool, including name, description, and JSON schema for parameters (query required, limit optional). This is part of the tools array registered for ListTools requests.{ name: "search_granola_transcripts", description: "Search through Granola meeting transcripts by query string. Returns matching transcripts with their content.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query to find matching transcripts", }, 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 (including 'search_granola_transcripts') to the MCP server for handling ListTools requests.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools, }));