Skip to main content
Glama

canvas_get_upcoming_assignments

Retrieve upcoming assignment due dates from Canvas LMS. Specify a limit to control the number of assignments returned, helping users stay organized and manage deadlines effectively.

Instructions

Get upcoming assignment due dates

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of assignments to return

Input Schema (JSON Schema)

{ "properties": { "limit": { "description": "Maximum number of assignments to return", "type": "number" } }, "required": [], "type": "object" }

Implementation Reference

  • Core handler function that implements the tool logic by calling Canvas API endpoint `/users/self/upcoming_events` and filtering for assignments.
    async getUpcomingAssignments(limit: number = 10): Promise<CanvasAssignment[]> { const response = await this.client.get('/users/self/upcoming_events', { params: { limit } }); return response.data.filter((event: any) => event.assignment); }
  • MCP CallToolRequestSchema handler case that receives arguments, calls CanvasClient.getUpcomingAssignments, and returns formatted JSON response.
    case "canvas_get_upcoming_assignments": { const { limit = 10 } = args as { limit?: number }; const assignments = await this.client.getUpcomingAssignments(limit); return { content: [{ type: "text", text: JSON.stringify(assignments, null, 2) }] }; }
  • Tool schema definition with name, description, and inputSchema for 'limit' parameter. Part of TOOLS array.
    { name: "canvas_get_upcoming_assignments", description: "Get upcoming assignment due dates", inputSchema: { type: "object", properties: { limit: { type: "number", description: "Maximum number of assignments to return" } }, required: [] } },
  • src/index.ts:1071-1073 (registration)
    Registration of ListToolsRequestSchema handler that returns the full TOOLS array containing this tool.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));

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/DMontgomery40/mcp-canvas-lms'

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