Skip to main content
Glama
EoinFalconer

Granola MCP Server

by EoinFalconer

get_meeting_content

Retrieve complete meeting notes and transcripts in Markdown format using a meeting ID. Access organized meeting content for review and reference.

Instructions

Get the full notes/content for a meeting in Markdown format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meeting_idYesMeeting ID to retrieve content for

Implementation Reference

  • Main handler function for get_meeting_content tool. Executes the tool logic: ensures data is loaded, retrieves the document by meeting_id, extracts and converts content to Markdown, and returns the formatted result with title.
    server.addTool({
      name: 'get_meeting_content',
      description: 'Get the full notes/content for a meeting in Markdown format',
      parameters: z.object({
        meeting_id: z.string().describe('Meeting ID to retrieve content for')
      }),
      execute: async ({ meeting_id }) => {
        await ensureDataLoaded();
    
        const doc = documentsCache.get(meeting_id);
        if (!doc) {
          return `Meeting '${meeting_id}' not found`;
        }
    
        const content = extractAndConvertContent(doc);
        if (!content) {
          return `No content available for meeting '${getTitle(doc)}'`;
        }
    
        return `# ${getTitle(doc)}\n\n${content}`;
      }
    });
  • Input parameter schema for get_meeting_content tool. Defines the required 'meeting_id' string parameter using zod validation.
    parameters: z.object({
      meeting_id: z.string().describe('Meeting ID to retrieve content for')
    }),
  • Helper function extractAndConvertContent that extracts content from a GranolaDocument's last_viewed_panel and converts it from ProseMirror format to Markdown.
    function extractAndConvertContent(doc: GranolaDocument): string {
      if (!doc.last_viewed_panel?.content) {
        return '';
      }
    
      const content = doc.last_viewed_panel.content;
      if (content.type === 'doc') {
        return convertProseMirrorToMarkdown(content);
      }
    
      return '';
    }
  • Helper function getTitle that retrieves the title from a GranolaDocument, returning 'Untitled Meeting' if no title exists.
    function getTitle(doc: GranolaDocument): string {
      return doc.title || 'Untitled Meeting';
    }
  • Core conversion function convertProseMirrorToMarkdown that transforms ProseMirror JSON content into formatted Markdown, supporting headings, paragraphs, lists, code blocks, blockquotes, text formatting, and links.
    export function convertProseMirrorToMarkdown(content: ProseMirrorContent | null | undefined): string {
      if (!content || !content.content) {
        return '';
      }
    
      const markdownLines: string[] = [];
    
      function processNode(node: ProseMirrorNode): string {
        const nodeType = node.type;
        const contentItems = node.content || [];
        const text = node.text || '';
    
        if (nodeType === 'heading') {
          const level = node.attrs?.level || 1;
          const headingText = contentItems.map(child => processNode(child)).join('');
          return `${'#'.repeat(level)} ${headingText}\n\n`;
        }
    
        if (nodeType === 'paragraph') {
          const paraText = contentItems.map(child => processNode(child)).join('');
          if (paraText.trim()) {
            return `${paraText}\n\n`;
          }
          return '\n';
        }
    
        if (nodeType === 'bulletList') {
          const items: string[] = [];
          for (const item of contentItems) {
            if (item.type === 'listItem') {
              const itemContent = (item.content || [])
                .map(child => processNode(child))
                .join('');
              items.push(`- ${itemContent.trim()}`);
            }
          }
          if (items.length > 0) {
            return items.join('\n') + '\n\n';
          }
          return '';
        }
    
        if (nodeType === 'orderedList') {
          const items: string[] = [];
          const start = node.attrs?.start || 1;
          contentItems.forEach((item, idx) => {
            if (item.type === 'listItem') {
              const itemContent = (item.content || [])
                .map(child => processNode(child))
                .join('');
              items.push(`${start + idx}. ${itemContent.trim()}`);
            }
          });
          if (items.length > 0) {
            return items.join('\n') + '\n\n';
          }
          return '';
        }
    
        if (nodeType === 'codeBlock') {
          const codeText = contentItems.map(child => processNode(child)).join('');
          const language = node.attrs?.language || '';
          return `\`\`\`${language}\n${codeText}\n\`\`\`\n\n`;
        }
    
        if (nodeType === 'blockquote') {
          const quoteText = contentItems.map(child => processNode(child)).join('');
          const quotedLines = quoteText.trim().split('\n').map(line => `> ${line}`);
          return quotedLines.join('\n') + '\n\n';
        }
    
        if (nodeType === 'horizontalRule') {
          return '---\n\n';
        }
    
        if (nodeType === 'text') {
          let formattedText = text;
          const marks = node.marks || [];
    
          for (const mark of marks) {
            const markType = mark.type;
            if (markType === 'bold' || markType === 'strong') {
              formattedText = `**${formattedText}**`;
            } else if (markType === 'italic' || markType === 'em') {
              formattedText = `*${formattedText}*`;
            } else if (markType === 'code') {
              formattedText = `\`${formattedText}\``;
            } else if (markType === 'link') {
              const href = mark.attrs?.href || '';
              formattedText = `[${formattedText}](${href})`;
            } else if (markType === 'strike' || markType === 'strikethrough') {
              formattedText = `~~${formattedText}~~`;
            }
          }
    
          return formattedText;
        }
    
        // Default: process child content if available
        return contentItems.map(child => processNode(child)).join('');
      }
    
      // Process top-level content
      for (const node of content.content) {
        const result = processNode(node);
        if (result) {
          markdownLines.push(result);
        }
      }
    
      return markdownLines.join('').trim();
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the output format (Markdown) but doesn't cover important aspects like authentication requirements, rate limits, error conditions, or whether this is a read-only operation. The description provides minimal behavioral context beyond the basic operation.

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 that communicates the core functionality without any wasted words. It's appropriately sized for a simple retrieval tool with one parameter.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the return value looks like (beyond format), error conditions, or important behavioral constraints. The description should provide more context given the lack of structured metadata.

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 fully documents the single 'meeting_id' parameter. The description doesn't add any parameter-specific information beyond what's in the schema, meeting the baseline expectation when schema coverage is complete.

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 verb 'Get' and resource 'full notes/content for a meeting' with format specification 'Markdown format', making the purpose explicit. However, it doesn't differentiate from sibling 'get_meeting_details' which might retrieve different aspects of a meeting.

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 about when to use this tool versus alternatives like 'get_meeting_details' or 'search_meetings'. The description only states what it does, not when it's appropriate or when other tools should be used instead.

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

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