Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Semantic kernel CalendarPlugin OpenAPI

From Leeroopedia
Knowledge Sources
Domains OpenAPI, Copilot_Agent_Plugins
Last Updated 2026-02-11 00:00 GMT

Overview

Concrete OpenAPI 3.0.4 specification for the Microsoft Graph Calendar Events API, used as the CalendarPlugin definition within the Copilot Agent Plugins sample of Semantic Kernel.

Description

This file is an OpenAPI 3.0.4 YAML specification describing a subset of the Microsoft Graph v1.0 OData service focused on calendar event operations. It defines two endpoints:

  • GET /me/calendar/events -- Retrieves a list of events in the signed-in user's calendar with full OData query parameter support ($top, $skip, $search, $filter, $count, $orderby, $select, $expand). Supports pagination via @odata.nextLink.
  • POST /me/calendar/events -- Creates a new calendar event with a full event object in the request body.

The specification includes comprehensive schema definitions for Microsoft Graph calendar entities:

  • microsoft.graph.event -- Full event model with properties for attendees, body, start/end times, location, recurrence, online meeting info, organizer, and more.
  • microsoft.graph.attendee -- Attendee with email, type (required/optional/resource), proposed new time, and response status.
  • microsoft.graph.location -- Location with physical address, geo coordinates, display name, and location type.
  • microsoft.graph.patternedRecurrence -- Recurrence pattern and range for recurring events.
  • Supporting enums: importance, sensitivity, freeBusyStatus, eventType, onlineMeetingProviderType, attendeeType, dayOfWeek, weekIndex, and more.

Usage

This file is used by the Copilot Agent Plugins Concepts sample to demonstrate how calendar operations can be exposed as agent-callable tools. Developers use this to understand how to build Copilot Agent Plugins backed by Microsoft Graph calendar APIs.

Code Reference

Source Location

Signature

openapi: 3.0.4
info:
  title: OData Service for namespace microsoft.graph - Subset
  description: This OData service is located at https://graph.microsoft.com/v1.0
  version: v1.0
servers:
  - url: https://graph.microsoft.com/v1.0
paths:
  /me/calendar/events:
    get:
      tags:
        - me.calendar
      summary: List events
      description: "Retrieve a list of events in a calendar."
      operationId: me_calendar_ListEvents
      parameters:
        - $ref: '#/components/parameters/top'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/count'

Import

// Loaded as part of the Copilot Agent Plugin configuration:
await kernel.ImportPluginFromOpenApiAsync(
    "CalendarPlugin",
    Path.Combine("Resources", "Plugins", "CopilotAgentPlugins",
                 "CalendarPlugin", "calendar-openapi.yml"));

I/O Contract

Inputs

Name Type Required Description
$top integer (query) no Show only the first n items.
$skip integer (query) no Skip the first n items.
$search string (query) no Search items by search phrases.
$filter string (query) no Filter items by property values.
$count boolean (query) no Include count of items.
$orderby array of strings (query) no Order items by property values.
$select array of strings (query) no Select properties to be returned.
$expand array of strings (query) no Expand related entities.
event microsoft.graph.event (body) yes Full event object for creating a new calendar event (POST only).

Outputs

Name Type Description
eventCollectionResponse object Paginated collection of event objects with @odata.count, @odata.nextLink, and value array.
event microsoft.graph.event Single created event object returned by the POST operation.

Usage Examples

Loading the CalendarPlugin

var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAIChatCompletion(deploymentName, endpoint, apiKey)
    .Build();

await kernel.ImportPluginFromOpenApiAsync(
    "CalendarPlugin",
    Path.Combine("Resources", "Plugins", "CopilotAgentPlugins",
                 "CalendarPlugin", "calendar-openapi.yml"));

// List upcoming events
var events = await kernel.InvokeAsync("CalendarPlugin", "me_calendar_ListEvents");

// Create a new event
var newEvent = await kernel.InvokeAsync("CalendarPlugin", "me_calendar_CreateEvents",
    new KernelArguments { ["body"] = eventJson });

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment