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"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool returns 'matching events with details', which hints at read-only behavior, but fails to cover critical aspects like authentication requirements, rate limits, error handling, or pagination. For a search tool with zero annotation coverage, this is a significant gap in transparency, as it doesn't adequately inform the agent about operational constraints or expected behavior.

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 highly concise and well-structured, consisting of two clear sentences that directly state the tool's function and output. Every word earns its place, with no redundancy or unnecessary elaboration, making it efficient and easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and output but lacks details on behavioral traits, usage context, and deeper parameter semantics. Without annotations or an output schema, the description doesn't fully compensate for these gaps, resulting in a score that reflects its partial but insufficient completeness for optimal agent guidance.

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?

The description adds minimal semantic value beyond the input schema, which has 100% coverage. It references 'query string' and 'matching events', aligning with the schema's 'query' and 'limit' parameters, but doesn't provide additional context like search syntax, result ordering, or default behaviors beyond the schema's 'default: 10' for limit. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does most of the documentation work.

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 tool's purpose: 'Search through Granola calendar events by query string. Returns matching events with details.' It specifies the verb ('search'), resource ('Granola calendar events'), and scope ('by query string'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_granola_notes' or 'search_granola_transcripts', which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools, prerequisites, or specific contexts for usage, such as when to prefer this over other search tools like 'search_granola_notes'. This leaves the agent with insufficient information to make informed decisions, scoring low due to the lack of comparative or contextual advice.

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

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