Skip to main content
Glama

google_calendar_list_calendars

Retrieve a comprehensive list of all available calendars to manage schedules and events efficiently. Ideal for integrating with AI clients for streamlined calendar access.

Instructions

List all available calendars

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function for the tool: validates input, fetches calendars from GoogleCalendar instance, formats them into a readable list, and returns as text content.
    export async function handleCalendarListCalendars( args: any, googleCalendarInstance: GoogleCalendar ) { if (!isListCalendarsArgs(args)) { throw new Error("Invalid arguments for google_calendar_list_calendars"); } const calendars = await googleCalendarInstance.listCalendars(); const formattedResult = calendars .map( (cal: any) => `${cal.summary}${cal.primary ? " (Primary)" : ""} - ID: ${cal.id}` ) .join("\n"); return { content: [{ type: "text", text: formattedResult }], isError: false, }; }
  • Tool definition including name, description, and input schema (no required parameters).
    export const LIST_CALENDARS_TOOL: Tool = { name: "google_calendar_list_calendars", description: "List all available calendars", inputSchema: { type: "object", properties: {}, }, };
  • server-setup.ts:97-101 (registration)
    Switch case registration that routes calls to this tool to the appropriate handler function.
    case "google_calendar_list_calendars": return await calendarHandlers.handleCalendarListCalendars( args, googleCalendarInstance );

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