Skip to main content
Glama
btn0s

Granola MCP Server

by btn0s

search_granola_events

Search Granola calendar events by query to find and retrieve meeting details. Use this tool to locate specific events in your schedule.

Instructions

Search through Granola calendar events by query string. Returns matching events with details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to find matching calendar events
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • Handler function implementing the search_granola_events tool. Fetches all documents via apiClient.getAllDocuments(), filters those with google_calendar_event where summary or description matches the query (case-insensitive), limits results, maps to event details, and returns JSON.
    case "search_granola_events": { const query = args?.query as string; const limit = (args?.limit as number) || 10; const allDocs = await apiClient.getAllDocuments(); const eventResults = allDocs .filter((doc) => { const event = doc.google_calendar_event; if (!event) return false; const summary = event.summary?.toLowerCase() || ""; const description = event.description?.toLowerCase() || ""; const lowerQuery = query.toLowerCase(); return ( summary.includes(lowerQuery) || description.includes(lowerQuery) ); }) .slice(0, limit) .map((doc) => ({ id: doc.google_calendar_event?.id || doc.id, summary: doc.google_calendar_event?.summary, description: doc.google_calendar_event?.description?.substring( 0, 500 ), start: doc.google_calendar_event?.start, end: doc.google_calendar_event?.end, attendees: doc.google_calendar_event?.attendees, htmlLink: doc.google_calendar_event?.htmlLink, })); return { content: [ { type: "text", text: JSON.stringify( { query, count: eventResults.length, results: eventResults, }, null, 2 ), }, ], }; }
  • Tool schema definition including name, description, and inputSchema with required 'query' string and optional 'limit' number.
    { name: "search_granola_events", description: "Search through Granola calendar events by query string. Returns matching events with details.", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query to find matching calendar events", }, 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