canvas_list_calendar_events
Retrieve calendar events from the Canvas LMS within a specified date range to organize and manage schedules effectively. Input start and end dates in ISO format for streamlined event tracking.
Instructions
List calendar events
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | No | End date (ISO format) | |
| start_date | No | Start date (ISO format) |
Input Schema (JSON Schema)
{
"properties": {
"end_date": {
"description": "End date (ISO format)",
"type": "string"
},
"start_date": {
"description": "Start date (ISO format)",
"type": "string"
}
},
"required": [],
"type": "object"
}
Implementation Reference
- src/client.ts:441-452 (handler)Core handler implementation: Fetches calendar events from Canvas API endpoint '/calendar_events' with optional date range parameters.async listCalendarEvents(startDate?: string, endDate?: string): Promise<CanvasCalendarEvent[]> { const params: any = { type: 'event', all_events: true }; if (startDate) params.start_date = startDate; if (endDate) params.end_date = endDate; const response = await this.client.get('/calendar_events', { params }); return response.data; }
- src/index.ts:345-355 (registration)Tool registration in TOOLS array, including name, description, and input schema.name: "canvas_list_calendar_events", description: "List calendar events", inputSchema: { type: "object", properties: { start_date: { type: "string", description: "Start date (ISO format)" }, end_date: { type: "string", description: "End date (ISO format)" } }, required: [] } },
- src/index.ts:1293-1299 (handler)MCP server handler dispatch: Calls CanvasClient.listCalendarEvents and formats response.case "canvas_list_calendar_events": { const { start_date, end_date } = args as { start_date?: string; end_date?: string }; const events = await this.client.listCalendarEvents(start_date, end_date); return { content: [{ type: "text", text: JSON.stringify(events, null, 2) }] }; }
- src/types.ts:369-385 (schema)TypeScript interface defining the structure of Canvas calendar events (output schema).export interface CanvasCalendarEvent { id: number; title: string; start_at: string; end_at: string; description: string; location_name?: string; location_address?: string; context_type: 'Course' | 'User' | 'Group'; context_id: number; workflow_state: 'active' | 'deleted'; hidden: boolean; url?: string; html_url: string; all_day: boolean; assignment?: CanvasAssignment; }