Skip to main content
Glama
peadams21

Google Calendar MCP Server

by peadams21

list_calendars

Retrieve available Google Calendars with options to filter by access role and include deleted or hidden calendars.

Instructions

List available Google Calendars

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minAccessRoleNoMinimum access role filter
showDeletedNoInclude deleted calendars (default: false)
showHiddenNoInclude hidden calendars (default: false)

Implementation Reference

  • The main handler function that executes the list_calendars tool logic, calling the Google Calendar API to list calendars.
    async function handleListCalendars(args: z.infer<typeof ListCalendarsArgsSchema>) {
      try {
        const response = await calendar.calendarList.list({
          minAccessRole: args.minAccessRole,
          showDeleted: args.showDeleted,
          showHidden: args.showHidden,
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: true,
                calendars: response.data.items || [],
                summary: `Found ${(response.data.items || []).length} calendars`,
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                success: false,
                error: error instanceof Error ? error.message : "Unknown error",
              }, null, 2),
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema for validating input arguments to the list_calendars tool.
    const ListCalendarsArgsSchema = z.object({
      minAccessRole: z.enum(["freeBusyReader", "owner", "reader", "writer"]).optional(),
      showDeleted: z.boolean().optional().default(false),
      showHidden: z.boolean().optional().default(false),
    });
  • src/index.ts:311-334 (registration)
    Tool registration in the tools array, defining name, description, and input schema for list_calendars.
    {
      name: "list_calendars",
      description: "List available Google Calendars",
      inputSchema: {
        type: "object",
        properties: {
          minAccessRole: {
            type: "string",
            enum: ["freeBusyReader", "owner", "reader", "writer"],
            description: "Minimum access role filter",
          },
          showDeleted: {
            type: "boolean",
            description: "Include deleted calendars (default: false)",
            default: false,
          },
          showHidden: {
            type: "boolean",
            description: "Include hidden calendars (default: false)",
            default: false,
          },
        },
      },
    },
  • Dispatch case in the main CallToolRequestSchema handler that routes to the list_calendars handler after validation.
    case "list_calendars": {
      const validatedArgs = ListCalendarsArgsSchema.parse(args);
      return await handleListCalendars(validatedArgs);
    }
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. It states it's a list operation but doesn't describe what 'available' means, whether it requires specific permissions, how results are returned, or any rate limits. For a read operation with zero annotation coverage, 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 waste. It's appropriately sized for a simple list operation and front-loads the essential information. Every word earns its place.

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?

For a simple list operation with good schema coverage but no annotations and no output schema, the description is minimally adequate. It states what the tool does but lacks behavioral context and usage guidance. The schema handles parameters well, but the description doesn't compensate for missing behavioral disclosure.

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 schema description coverage is 100%, so all parameters are documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema. This meets the baseline expectation when the 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 clearly states the verb ('List') and resource ('available Google Calendars'), making the purpose immediately understandable. It distinguishes from siblings like list_events by specifying calendars rather than events. However, it doesn't explicitly contrast with other calendar-related tools beyond the obvious scope difference.

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 prerequisites, when to choose list_calendars over list_events, or any contextual considerations. The agent must infer usage from the tool name alone.

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/peadams21/Google-Calendar-MCP-Server'

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