Skip to main content
Glama

canvas_create_course

Create and configure new courses in Canvas by specifying account ID, name, course code, dates, and other settings such as visibility, enrollment, and syllabus details.

Instructions

Create a new course in Canvas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYesID of the account to create the course in
allow_student_forum_attachmentsNoWhether students can add forum attachments
allow_student_wiki_editsNoWhether students can edit the wiki
allow_wiki_commentsNoWhether wiki comments are allowed
apply_assignment_group_weightsNoWhether to apply assignment group weights
course_codeNoCourse code (e.g., CS101)
end_atNoCourse end date (ISO format)
hide_final_gradesNoWhether to hide final grades
integration_idNoIntegration ID for the course
is_publicNoWhether the course is public
is_public_to_auth_usersNoWhether the course is public to authenticated users
licenseNoCourse license
nameYesName of the course
open_enrollmentNoWhether the course has open enrollment
public_descriptionNoPublic description of the course
public_syllabusNoWhether the syllabus is public
public_syllabus_to_authNoWhether the syllabus is public to authenticated users
restrict_enrollments_to_course_datesNoWhether to restrict enrollments to course start/end dates
self_enrollmentNoWhether the course allows self enrollment
sis_course_idNoSIS course ID
start_atNoCourse start date (ISO format)
syllabus_bodyNoCourse syllabus content
term_idNoID of the enrollment term
time_zoneNoCourse time zone

Implementation Reference

  • src/index.ts:73-106 (registration)
    Registration of the 'canvas_create_course' tool including its input schema definition in the TOOLS array.
    { name: "canvas_create_course", description: "Create a new course in Canvas", inputSchema: { type: "object", properties: { account_id: { type: "number", description: "ID of the account to create the course in" }, name: { type: "string", description: "Name of the course" }, course_code: { type: "string", description: "Course code (e.g., CS101)" }, start_at: { type: "string", description: "Course start date (ISO format)" }, end_at: { type: "string", description: "Course end date (ISO format)" }, license: { type: "string", description: "Course license" }, is_public: { type: "boolean", description: "Whether the course is public" }, is_public_to_auth_users: { type: "boolean", description: "Whether the course is public to authenticated users" }, public_syllabus: { type: "boolean", description: "Whether the syllabus is public" }, public_syllabus_to_auth: { type: "boolean", description: "Whether the syllabus is public to authenticated users" }, public_description: { type: "string", description: "Public description of the course" }, allow_student_wiki_edits: { type: "boolean", description: "Whether students can edit the wiki" }, allow_wiki_comments: { type: "boolean", description: "Whether wiki comments are allowed" }, allow_student_forum_attachments: { type: "boolean", description: "Whether students can add forum attachments" }, open_enrollment: { type: "boolean", description: "Whether the course has open enrollment" }, self_enrollment: { type: "boolean", description: "Whether the course allows self enrollment" }, restrict_enrollments_to_course_dates: { type: "boolean", description: "Whether to restrict enrollments to course start/end dates" }, term_id: { type: "number", description: "ID of the enrollment term" }, sis_course_id: { type: "string", description: "SIS course ID" }, integration_id: { type: "string", description: "Integration ID for the course" }, hide_final_grades: { type: "boolean", description: "Whether to hide final grades" }, apply_assignment_group_weights: { type: "boolean", description: "Whether to apply assignment group weights" }, time_zone: { type: "string", description: "Course time zone" }, syllabus_body: { type: "string", description: "Course syllabus content" } }, required: ["account_id", "name"] } },
  • MCP tool handler for 'canvas_create_course' that validates input and delegates to CanvasClient.createCourse method.
    case "canvas_create_course": { const courseArgs = args as unknown as CreateCourseArgs; if (!courseArgs.account_id || !courseArgs.name) { throw new Error("Missing required fields: account_id and name"); } const course = await this.client.createCourse(courseArgs); return { content: [{ type: "text", text: JSON.stringify(course, null, 2) }] }; }
  • Core implementation of course creation in CanvasClient using Canvas API POST /accounts/{account_id}/courses.
    async createCourse(args: CreateCourseArgs): Promise<CanvasCourse> { const { account_id, ...courseData } = args; const response = await this.client.post(`/accounts/${account_id}/courses`, { course: courseData }); return response.data; }
  • TypeScript interface defining input parameters for createCourse (used by both tool handler and client).
    export interface CreateCourseArgs { account_id: number; name: string; course_code?: string; start_at?: string; end_at?: string; license?: string; is_public?: boolean; is_public_to_auth_users?: boolean; public_syllabus?: boolean; public_syllabus_to_auth?: boolean; public_description?: string; allow_student_wiki_edits?: boolean; allow_wiki_comments?: boolean; allow_student_forum_attachments?: boolean; open_enrollment?: boolean; self_enrollment?: boolean; restrict_enrollments_to_course_dates?: boolean; term_id?: number; sis_course_id?: string; integration_id?: string; hide_final_grades?: boolean; apply_assignment_group_weights?: boolean; time_zone?: string; syllabus_body?: string; }

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