Skip to main content
Glama

canvas_list_assignments

Retrieve and organize course assignments from the Canvas LMS, including optional submission data, by specifying the course ID for streamlined management.

Instructions

List assignments for a course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course
include_submissionsNoInclude submission data

Implementation Reference

  • Handler implementation for the 'canvas_list_assignments' tool within the CallToolRequestSchema switch statement. Extracts arguments, validates course_id, calls CanvasClient.listAssignments, and returns JSON response.
    case "canvas_list_assignments": {
      const { course_id, include_submissions = false } = args as { 
        course_id: number; 
        include_submissions?: boolean 
      };
      if (!course_id) throw new Error("Missing required field: course_id");
      
      const assignments = await this.client.listAssignments(course_id, include_submissions);
      return {
        content: [{ type: "text", text: JSON.stringify(assignments, null, 2) }]
      };
    }
  • Tool schema definition in the TOOLS array, specifying name, description, and inputSchema for canvas_list_assignments tool.
    name: "canvas_list_assignments",
    description: "List assignments for a course",
    inputSchema: {
      type: "object",
      properties: {
        course_id: { type: "number", description: "ID of the course" },
        include_submissions: { type: "boolean", description: "Include submission data" }
      },
      required: ["course_id"]
    }
  • src/index.ts:1071-1073 (registration)
    Registration of all tools including canvas_list_assignments via ListToolsRequestSchema handler that returns the TOOLS array.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS
    }));
  • CanvasClient.listAssignments method: core implementation that queries Canvas API endpoint /courses/{courseId}/assignments with optional submission include.
    async listAssignments(courseId: number, includeSubmissions: boolean = false): Promise<CanvasAssignment[]> {
      const params: any = {
        include: ['assignment_group', 'rubric', 'due_at']
      };
      
      if (includeSubmissions) {
        params.include.push('submission');
      }
    
      const response = await this.client.get(`/courses/${courseId}/assignments`, { params });
      return response.data;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't specify whether this is a read-only operation, what permissions are required, how results are paginated, or what the output format looks like. The description is too vague to adequately inform an agent about the tool's behavior beyond its basic purpose.

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?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core purpose ('List assignments'), making it easy to parse. Every word earns its place, achieving maximum efficiency.

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 tool with no annotations and no output schema, the description is insufficiently complete. It lacks details on behavioral traits (e.g., read-only status, pagination), output format, error handling, or usage context. Given the complexity of listing assignments in an educational system, more context is needed for an agent to use this tool effectively.

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?

The description mentions 'for a course', which aligns with the required 'course_id' parameter, but doesn't add meaning beyond what the schema already provides (100% coverage). It doesn't explain the 'include_submissions' parameter's effect or when to use it. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate with additional insights.

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 verb ('List') and resource ('assignments for a course'), making the purpose immediately understandable. It distinguishes itself from siblings like 'canvas_get_assignment' (singular) and 'canvas_get_upcoming_assignments' (time-filtered), though it doesn't explicitly mention these distinctions.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose it over 'canvas_get_assignment' (for a single assignment) or 'canvas_get_upcoming_assignments' (for time-filtered assignments), nor does it specify prerequisites like needing a valid course ID.

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

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