Skip to main content
Glama

get_calendars

Retrieve and list available Microsoft Outlook calendars on Windows systems directly through the Outlook Calendar MCP server, ensuring local data privacy and efficient calendar management.

Instructions

List available calendars

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'get_calendars' MCP tool: calls the getCalendars() helper, returns formatted JSON response or error.
    handler: async () => { try { const calendars = await getCalendars(); return { content: [ { type: 'text', text: JSON.stringify(calendars, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error getting calendars: ${error.message}` } ], isError: true }; } }
  • Input schema for 'get_calendars' tool (no parameters required).
    inputSchema: { type: 'object', properties: {} },
  • src/index.js:34-36 (registration)
    Loads tool definitions from outlookTools.js into the MCP server's tool registry.
    // Define the tools this.tools = defineOutlookTools();
  • src/index.js:67-95 (registration)
    MCP CallToolRequestSchema handler that dispatches tool calls to the appropriate tool.handler based on name (registers all tools dynamically).
    const { name, arguments: args } = request.params; // Find the requested tool const tool = this.tools[name]; if (!tool) { throw new McpError( ErrorCode.MethodNotFound, `Tool not found: ${name}` ); } try { // Call the tool handler return await tool.handler(args); } catch (error) { console.error(`Error executing tool ${name}:`, error); return { content: [ { type: 'text', text: `Error executing tool ${name}: ${error.message}`, }, ], isError: true, }; } });
  • Helper function that executes the 'getCalendars.vbs' script to retrieve calendars.
    /** * Lists available calendars * @returns {Promise<Array>} - Promise that resolves with an array of calendars */ export async function getCalendars() { return executeScript('getCalendars'); }

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/merajmehrabi/Outlook_Calendar_MCP'

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