Skip to main content
Glama
anoopt

Outlook Meetings Scheduler MCP Server

create-event-with-attendees

Schedule Microsoft Outlook calendar events with attendees by defining subject, body, start/end times, time zone, location, and attendee details using Microsoft Graph API.

Instructions

Create a calendar event with attendees using Microsoft Graph API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
attendeesYesList of attendees for the event
bodyYesContent/body of the calendar event
endNoEnd time in ISO format (e.g. 2025-04-20T13:00:00). Defaults to next business day at 1PM
locationNoLocation of the event
startNoStart time in ISO format (e.g. 2025-04-20T12:00:00). Defaults to next business day at noon
subjectYesSubject of the calendar event
timeZoneNoTime zone for the event. Defaults to GMT Standard Time

Implementation Reference

  • The main handler function for the 'create-event-with-attendees' tool. It handles authentication, computes default times, formats attendees, constructs the Microsoft Graph Event object, calls the Graph API to create the event, and formats the response.
        async ({ subject, body, start, end, timeZone = "GMT Standard Time", location, attendees }) => {
          const { graph, userEmail, authError } = await getGraphConfig();
    
          if (authError) {
            return {
              content: [{ type: "text", text: `🔐 Authentication Required\n\n${authError}\n\nPlease complete the authentication and try again.` }]
            };
          }
      
          // Calculate default times if not provided
          const nextDay: string = format(addBusinessDays(new Date(), 1), 'yyyy-MM-dd');
          const startTime: string = start ? start : `${nextDay}T12:00:00`;
          const endTime: string = end ? end : `${nextDay}T13:00:00`;
      
          // Format attendees for the event
          const formattedAttendees: Attendee[] = attendees.map((attendee: any) => ({
            emailAddress: {
              address: attendee.email,
              name: attendee.name || attendee.email
            },
            type: attendee.type || "required"
          }));
    
          // Create the event object
          const event: Event = {
            subject,
            body: {
              contentType: "html",
              content: `${body}<br/>Request submitted around ${format(new Date(), 'dd-MMM-yyyy HH:mm')}`
            },
            start: {
              dateTime: startTime,
              timeZone
            },
            end: {
              dateTime: endTime,
              timeZone
            },
            attendees: formattedAttendees
          };
    
          // Add location if provided
          if (location) {
            event.location = {
              displayName: location
            };
          }
      
          // Call the Graph API to create the event
          const result = await graph.createEvent(event, userEmail);
          
          if (!result) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to create calendar event. Check the logs for details.",
                },
              ],
            };
          }
      
          // Format the result for response
          const eventUrl = result.webLink || "No event URL available";
          const eventId = result.id || "No event ID available";
          const successMessage = `
    Calendar event created successfully!
    
    Subject: ${subject}
    Start: ${startTime}
    End: ${endTime}
    Time Zone: ${timeZone}
    ${location ? `Location: ${location}\n                ` : ''}User: ${userEmail}
    Attendees: 
    ${formattedAttendees.map(a => {
        const name = a.emailAddress?.name || 'No name';
        const email = a.emailAddress?.address || 'No email';
        const type = a.type || 'required';
        return `${name} (${email}) - ${type}`;
    }).join("\n                ")}
    Event ID: ${eventId}
    Event URL: ${eventUrl}
                        `;
      
          return {
            content: [
              {
                type: "text",
                text: successMessage,
              },
            ],
          };
        }
  • Zod input schema defining parameters for creating an event with attendees: subject, body, start/end times, timezone, location, and list of attendees.
    {
      subject: z.string().describe("Subject of the calendar event"),
      body: z.string().describe("Content/body of the calendar event"),
      start: z.string().optional().describe("Start time in ISO format (e.g. 2025-04-20T12:00:00). Defaults to next business day at noon"),
      end: z.string().optional().describe("End time in ISO format (e.g. 2025-04-20T13:00:00). Defaults to next business day at 1PM"),
      timeZone: z.string().optional().describe("Time zone for the event. Defaults to GMT Standard Time"),
      location: z.string().optional().describe("Location of the event"),
      attendees: z.array(
        z.object({
          email: z.string().describe("Email address of the attendee"),
          name: z.string().optional().describe("Name of the attendee"),
          type: z.enum(["required", "optional"]).optional().describe("Type of attendee: required or optional")
        })
      ).describe("List of attendees for the event")
    },
  • Registration of the 'create-event-with-attendees' tool using registerTool, including name, description, schema, and handler.
      registerTool(
        server,
        "create-event-with-attendees",
        "Create a calendar event with attendees using Microsoft Graph API",
        {
          subject: z.string().describe("Subject of the calendar event"),
          body: z.string().describe("Content/body of the calendar event"),
          start: z.string().optional().describe("Start time in ISO format (e.g. 2025-04-20T12:00:00). Defaults to next business day at noon"),
          end: z.string().optional().describe("End time in ISO format (e.g. 2025-04-20T13:00:00). Defaults to next business day at 1PM"),
          timeZone: z.string().optional().describe("Time zone for the event. Defaults to GMT Standard Time"),
          location: z.string().optional().describe("Location of the event"),
          attendees: z.array(
            z.object({
              email: z.string().describe("Email address of the attendee"),
              name: z.string().optional().describe("Name of the attendee"),
              type: z.enum(["required", "optional"]).optional().describe("Type of attendee: required or optional")
            })
          ).describe("List of attendees for the event")
        },
        async ({ subject, body, start, end, timeZone = "GMT Standard Time", location, attendees }) => {
          const { graph, userEmail, authError } = await getGraphConfig();
    
          if (authError) {
            return {
              content: [{ type: "text", text: `🔐 Authentication Required\n\n${authError}\n\nPlease complete the authentication and try again.` }]
            };
          }
      
          // Calculate default times if not provided
          const nextDay: string = format(addBusinessDays(new Date(), 1), 'yyyy-MM-dd');
          const startTime: string = start ? start : `${nextDay}T12:00:00`;
          const endTime: string = end ? end : `${nextDay}T13:00:00`;
      
          // Format attendees for the event
          const formattedAttendees: Attendee[] = attendees.map((attendee: any) => ({
            emailAddress: {
              address: attendee.email,
              name: attendee.name || attendee.email
            },
            type: attendee.type || "required"
          }));
    
          // Create the event object
          const event: Event = {
            subject,
            body: {
              contentType: "html",
              content: `${body}<br/>Request submitted around ${format(new Date(), 'dd-MMM-yyyy HH:mm')}`
            },
            start: {
              dateTime: startTime,
              timeZone
            },
            end: {
              dateTime: endTime,
              timeZone
            },
            attendees: formattedAttendees
          };
    
          // Add location if provided
          if (location) {
            event.location = {
              displayName: location
            };
          }
      
          // Call the Graph API to create the event
          const result = await graph.createEvent(event, userEmail);
          
          if (!result) {
            return {
              content: [
                {
                  type: "text",
                  text: "Failed to create calendar event. Check the logs for details.",
                },
              ],
            };
          }
      
          // Format the result for response
          const eventUrl = result.webLink || "No event URL available";
          const eventId = result.id || "No event ID available";
          const successMessage = `
    Calendar event created successfully!
    
    Subject: ${subject}
    Start: ${startTime}
    End: ${endTime}
    Time Zone: ${timeZone}
    ${location ? `Location: ${location}\n                ` : ''}User: ${userEmail}
    Attendees: 
    ${formattedAttendees.map(a => {
        const name = a.emailAddress?.name || 'No name';
        const email = a.emailAddress?.address || 'No email';
        const type = a.type || 'required';
        return `${name} (${email}) - ${type}`;
    }).join("\n                ")}
    Event ID: ${eventId}
    Event URL: ${eventUrl}
                        `;
      
          return {
            content: [
              {
                type: "text",
                text: successMessage,
              },
            ],
          };
        }
      );
  • src/index.ts:33-33 (registration)
    Top-level call to register event creation tools, which includes the 'create-event-with-attendees' tool.
    registerEventCreateTools(server);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it creates an event with attendees via Microsoft Graph API, implying a write operation, but doesn't disclose permissions needed, rate limits, whether it sends invitations, or what happens on failure. For a mutation tool with zero annotation coverage, this is inadequate.

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?

Single sentence, front-loaded with the core action, zero waste. It efficiently conveys the tool's purpose 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 mutation tool with 7 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain return values, error handling, or behavioral details like whether attendees receive invitations. Given the complexity and lack of structured data, more context is needed.

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?

Schema description coverage is 100%, so the schema fully documents all 7 parameters. The description adds no additional parameter semantics beyond what's in the schema, such as explaining attendee invitation behavior or event creation constraints. Baseline 3 is appropriate when schema does all the work.

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 ('Create') and resource ('calendar event with attendees'), specifying it uses Microsoft Graph API. It distinguishes from 'create-event' by explicitly mentioning attendees, but doesn't fully differentiate from 'update-event-attendees' which also handles attendees.

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?

No guidance on when to use this tool versus alternatives like 'create-event' (without attendees) or 'update-event-attendees'. The description mentions attendees but doesn't provide explicit usage context or exclusions relative to sibling tools.

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/anoopt/outlook-meetings-scheduler-mcp-server'

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