Skip to main content
Glama

search_granola_events

Search Granola calendar events using a query string to find and retrieve matching events with their details.

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 implementation for the 'search_granola_events' tool. It retrieves all documents, filters those with google_calendar_event fields matching the query in summary or description, limits results, maps to event details, and returns JSON-formatted response.
    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 ), }, ], }; }
  • src/index.ts:68-87 (registration)
    Registration of the 'search_granola_events' tool in the tools list, including name, description, and input schema definition.
    { 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"], }, },
  • Input schema for the 'search_granola_events' tool, defining query (required string) and optional limit (number).
    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