Skip to main content
Glama

canvas_create_assignment

Create and configure assignments in Canvas courses with specific details like name, description, due date, points, submission types, and file extensions directly via the Canvas MCP Server V2.0.

Instructions

Create a new assignment in a Canvas course

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allowed_extensionsNoAllowed file extensions for submissions
course_idYesID of the course
descriptionNoAssignment description/instructions
due_atNoDue date (ISO format)
nameYesName of the assignment
points_possibleNoMaximum points possible
publishedNoWhether the assignment is published
submission_typesNoAllowed submission types

Implementation Reference

  • Core implementation of the assignment creation logic, making the POST request to Canvas API endpoint /courses/{course_id}/assignments
    async createAssignment(args: CreateAssignmentArgs): Promise<CanvasAssignment> {
      const { course_id, ...assignmentData } = args;
      const response = await this.client.post(`/courses/${course_id}/assignments`, {
        assignment: assignmentData
      });
      return response.data;
    }
  • MCP server tool handler for canvas_create_assignment: validates arguments and delegates to CanvasClient
    case "canvas_create_assignment": {
      const assignmentArgs = args as unknown as CreateAssignmentArgs;
      if (!assignmentArgs.course_id || !assignmentArgs.name) {
        throw new Error("Missing required fields: course_id and name");
      }
      const assignment = await this.client.createAssignment(assignmentArgs);
      return {
        content: [{ type: "text", text: JSON.stringify(assignment, null, 2) }]
      };
    }
  • src/index.ts:166-189 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema
    name: "canvas_create_assignment",
    description: "Create a new assignment in a Canvas course",
    inputSchema: {
      type: "object",
      properties: {
        course_id: { type: "number", description: "ID of the course" },
        name: { type: "string", description: "Name of the assignment" },
        description: { type: "string", description: "Assignment description/instructions" },
        due_at: { type: "string", description: "Due date (ISO format)" },
        points_possible: { type: "number", description: "Maximum points possible" },
        submission_types: { 
          type: "array", 
          items: { type: "string" },
          description: "Allowed submission types"
        },
        allowed_extensions: {
          type: "array",
          items: { type: "string" },
          description: "Allowed file extensions for submissions"
        },
        published: { type: "boolean", description: "Whether the assignment is published" }
      },
      required: ["course_id", "name"]
    }
  • TypeScript interface defining the structure of CreateAssignmentArgs used for type safety and validation
    export interface CreateAssignmentArgs {
      course_id: number;
      name: string;
      description?: string;
      due_at?: string;
      lock_at?: string;
      unlock_at?: string;
      points_possible?: number;
      grading_type?: CanvasGradingType;
      submission_types?: CanvasSubmissionType[];
      allowed_extensions?: string[];
      assignment_group_id?: number;
      position?: number;
      peer_reviews?: boolean;
      automatic_peer_reviews?: boolean;
      notify_of_update?: boolean;
      group_category_id?: number;
      published?: boolean;
      omit_from_final_grade?: boolean;
      hide_in_gradebook?: boolean;
    }
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. While 'create' implies a write operation, the description doesn't mention permission requirements, whether the assignment is automatically published, what happens on failure, or typical response formats. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 that efficiently communicates the core purpose without unnecessary words. It's front-loaded with the essential action and resource, making it easy to parse. Every word earns its place, and there's no redundancy or fluff.

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 creation tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address behavioral aspects like error handling, authentication needs, or what the tool returns upon success. The agent lacks critical context to use this tool effectively beyond the basic action stated.

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 adds no parameter-specific information beyond what's already in the schema (which has 100% coverage). It doesn't explain relationships between parameters (e.g., how 'published' interacts with 'due_at'), provide examples, or clarify edge cases. With complete schema documentation, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 ('create') and resource ('new assignment in a Canvas course'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'canvas_update_assignment' or 'canvas_get_assignment' by specifying creation rather than modification or retrieval. However, it doesn't explicitly differentiate from other creation tools like 'canvas_create_quiz' or 'canvas_create_conversation' beyond the resource type.

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 (like needing course access), when not to use it (e.g., for updating existing assignments), or direct alternatives (like 'canvas_update_assignment' for modifications). The agent must infer usage from the tool name and context 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