Skip to main content
Glama
rishipradeep-think41

Google Workspace MCP Server

list_events

Retrieve upcoming calendar events within specified time ranges using the Google Calendar API, with customizable start and end times, and control over the number of events returned.

Instructions

List upcoming calendar events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum number of events to return (default: 10)
timeMaxNoEnd time in ISO format
timeMinNoStart time in ISO format (default: now)

Implementation Reference

  • The handler function that executes the list_events tool. It fetches upcoming calendar events from Google Calendar API using the provided parameters (maxResults, timeMin, timeMax), formats them, and returns as JSON text content.
    private async handleListEvents(args: any) {
      try {
        const maxResults = args?.maxResults || 10;
        const timeMin = args?.timeMin || new Date().toISOString();
        const timeMax = args?.timeMax;
    
        const response = await this.calendar.events.list({
          calendarId: "primary",
          timeMin,
          timeMax,
          maxResults,
          singleEvents: true,
          orderBy: "startTime",
        });
    
        const events = response.data.items?.map((event) => ({
          id: event.id,
          summary: event.summary,
          start: event.start,
          end: event.end,
          location: event.location,
        }));
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(events, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: "text",
              text: `Error fetching calendar events: ${error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • src/index.ts:160-180 (registration)
    Tool registration in the listTools response, including name, description, and input schema definition.
    {
      name: "list_events",
      description: "List upcoming calendar events",
      inputSchema: {
        type: "object",
        properties: {
          maxResults: {
            type: "number",
            description: "Maximum number of events to return (default: 10)",
          },
          timeMin: {
            type: "string",
            description: "Start time in ISO format (default: now)",
          },
          timeMax: {
            type: "string",
            description: "End time in ISO format",
          },
        },
      },
    },
  • Input schema definition for the list_events tool, specifying parameters for filtering and limiting events.
    inputSchema: {
      type: "object",
      properties: {
        maxResults: {
          type: "number",
          description: "Maximum number of events to return (default: 10)",
        },
        timeMin: {
          type: "string",
          description: "Start time in ISO format (default: now)",
        },
        timeMax: {
          type: "string",
          description: "End time in ISO format",
        },
      },
    },
  • Dispatch case in the CallToolRequest handler that routes list_events calls to the handleListEvents function.
    case "list_events":
      return await this.handleListEvents(request.params.arguments);
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. 'List upcoming calendar events' implies a read-only operation but doesn't specify authentication requirements, rate limits, pagination behavior, or what happens when no events match criteria. For a tool with 3 parameters and no output schema, this leaves significant behavioral gaps.

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 with zero wasted words. It's appropriately sized for a straightforward list operation and front-loads the essential information without unnecessary elaboration.

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 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain return format, error conditions, or how the 'upcoming' scope relates to the time parameters. The agent would need to guess about important behavioral aspects despite having a clear but minimal purpose statement.

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 mentions 'upcoming' which implies future events, but doesn't explicitly connect this to the timeMin/timeMax parameters. With 100% schema description coverage, the schema already documents all 3 parameters thoroughly, so the description adds minimal value beyond what's in the structured fields. The baseline of 3 is appropriate when schema does the heavy lifting.

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 'List upcoming calendar events' clearly states the verb ('List') and resource ('upcoming calendar events'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'update_event' or other event-related tools, which would require mentioning specific scope or filtering characteristics.

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 like 'create_event', 'delete_event', or 'update_event'. There's no mention of prerequisites, appropriate contexts, or exclusions, leaving the agent with minimal usage direction beyond the basic purpose.

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/rishipradeep-think41/gsuite-mcp'

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