Skip to main content
Glama

google_calendar_get_events

Retrieve upcoming Google Calendar events by specifying a limit, calendar ID, time range, search term, or inclusion of deleted events.

Instructions

Retrieve upcoming events from Google Calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
calendarIdNoOptional: ID of calendar to use (defaults to primary if not specified)
limitNoMaximum number of events to return
qNoFree text search term for events
showDeletedNoWhether to include deleted events
timeMaxNoEnd date/time in ISO format
timeMinNoStart date/time in ISO format (defaults to now)

Implementation Reference

  • The main handler function for the google_calendar_get_events tool, which validates arguments and calls the GoogleCalendar instance to retrieve events.
    export async function handleCalendarGetEvents(
      args: any,
      googleCalendarInstance: GoogleCalendar
    ) {
      if (!isGetEventsArgs(args)) {
        throw new Error("Invalid arguments for google_calendar_get_events");
      }
      const { limit, calendarId, timeMin, timeMax, q, showDeleted } = args;
      const result = await googleCalendarInstance.getEvents(
        limit || 10,
        calendarId,
        timeMin,
        timeMax,
        q,
        showDeleted
      );
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • Tool schema definition for google_calendar_get_events, specifying input parameters and descriptions.
    export const GET_EVENTS_TOOL: Tool = {
      name: "google_calendar_get_events",
      description: "Retrieve upcoming events from Google Calendar",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Maximum number of events to return",
          },
          calendarId: {
            type: "string",
            description:
              "Optional: ID of calendar to use (defaults to primary if not specified)",
          },
          timeMin: {
            type: "string",
            description: "Start date/time in ISO format (defaults to now)",
          },
          timeMax: {
            type: "string",
            description: "End date/time in ISO format",
          },
          q: {
            type: "string",
            description: "Free text search term for events",
          },
          showDeleted: {
            type: "boolean",
            description: "Whether to include deleted events",
          },
        },
      },
    };
  • Registration of the tool in the server switch statement, dispatching to the handler function.
    case "google_calendar_get_events":
      return await calendarHandlers.handleCalendarGetEvents(
        args,
        googleCalendarInstance
      );
  • Type guard function for validating arguments to google_calendar_get_events.
    export function isGetEventsArgs(args: any): args is {
      limit?: number;
      calendarId?: string;
      timeMin?: string;
      timeMax?: string;
      q?: string;
      showDeleted?: boolean;
    } {
      return (
        args &&
        (args.limit === undefined || typeof args.limit === "number") &&
        (args.calendarId === undefined || typeof args.calendarId === "string") &&
        (args.timeMin === undefined || typeof args.timeMin === "string") &&
        (args.timeMax === undefined || typeof args.timeMax === "string") &&
        (args.q === undefined || typeof args.q === "string") &&
        (args.showDeleted === undefined || typeof args.showDeleted === "boolean")
      );
    }
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 but offers minimal information. It states 'Retrieve upcoming events' but doesn't describe authentication requirements, rate limits, pagination behavior, error conditions, or what 'upcoming' means (e.g., default time range). This leaves significant gaps for an AI agent to understand how the tool behaves in practice.

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 gets straight to the point with no wasted words. It's appropriately sized for a tool with well-documented parameters in the schema, making it easy to parse while conveying the core purpose.

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?

Given the complexity of a Google Calendar API tool with 6 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'upcoming' entails, the format of returned events, error handling, or authentication needs. For a tool that likely returns structured event data, more context is needed to guide effective use.

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 input schema has 100% description coverage, providing clear documentation for all 6 parameters. The description adds no parameter-specific information beyond implying retrieval of 'upcoming events' (which relates to timeMin/timeMax). Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't enhance parameter understanding.

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 action ('Retrieve') and resource ('upcoming events from Google Calendar'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'google_calendar_get_event' (singular) or 'google_calendar_find_free_time', which also retrieve calendar data but with different scopes or purposes.

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 that this is for retrieving multiple events (vs. 'google_calendar_get_event' for a single event), doesn't specify use cases like viewing schedules or checking availability, and offers no exclusions or prerequisites for usage.

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

Related 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/vakharwalad23/google-mcp'

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