Skip to main content
Glama

canvas_list_assignment_groups

Retrieve assignment groups for a specific course using the Canvas LMS API. Input the course ID to manage and organize assignments efficiently within Canvas MCP Server V2.0.

Instructions

List assignment groups for a course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYesID of the course

Implementation Reference

  • Core handler function that executes the Canvas API request to list assignment groups for a course, including associated assignments.
    async listAssignmentGroups(courseId: number): Promise<CanvasAssignmentGroup[]> {
      const response = await this.client.get(`/courses/${courseId}/assignment_groups`, {
        params: {
          include: ['assignments']
        }
      });
      return response.data;
    }
  • src/index.ts:211-220 (registration)
    Tool registration in the MCP TOOLS array, including name, description, and input schema.
      name: "canvas_list_assignment_groups",
      description: "List assignment groups for a course",
      inputSchema: {
        type: "object",
        properties: {
          course_id: { type: "number", description: "ID of the course" }
        },
        required: ["course_id"]
      }
    },
  • MCP server handler that processes the tool call, validates input, invokes the client method, and formats the response.
    case "canvas_list_assignment_groups": {
      const { course_id } = args as { course_id: number };
      if (!course_id) throw new Error("Missing required field: course_id");
      
      const groups = await this.client.listAssignmentGroups(course_id);
      return {
        content: [{ type: "text", text: JSON.stringify(groups, null, 2) }]
      };
    }
  • Type definition for Canvas assignment groups returned by the tool.
    export interface CanvasAssignmentGroup {
      id: number;
      name: string;
      position: number;
      weight: number;
      assignments?: CanvasAssignment[];
      group_weight: number;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists assignment groups but doesn't describe any behavioral traits—such as whether it's read-only (implied by 'list'), requires authentication, has rate limits, returns paginated results, or includes error handling. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple list operation and front-loaded with the key action and resource, making it easy to parse quickly.

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?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is minimal but insufficient. It lacks context on behavioral aspects (e.g., read-only nature, potential errors), usage guidelines, and output details (e.g., what data is returned). For a tool with no annotations or output schema, the description should compensate more to ensure completeness.

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 input schema has 100% description coverage, with the single parameter 'course_id' documented as 'ID of the course'. The description adds no additional meaning beyond this, such as format examples (e.g., numeric ID) or context about where to find the ID. With high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

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 ('List') and resource ('assignment groups for a course'), making the purpose understandable. It distinguishes itself from siblings like 'canvas_list_assignments' by focusing on assignment groups rather than assignments themselves. However, it doesn't specify what an 'assignment group' entails (e.g., categories, weightings), leaving some ambiguity.

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 prerequisites (e.g., needing course access), differentiate from similar tools like 'canvas_list_assignments', or specify use cases (e.g., for organizing assignments by category). Without such context, the agent must infer usage from the tool name alone.

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