update_planned_course
Update details of a planned course including dates, costs, participant limits, and teacher assignments.
Instructions
Update a planned course.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the planned course to update | |
| is_published | No | Boolean if is published on the website. | |
| course_id | No | Unique identifier of the course. | |
| start_date | No | Date at which the planned course starts. Only needed for fixed planned courses. | |
| end_date | No | Date at which the planned course ends. Only needed for fixed planned courses. | |
| min_participants | No | A number representing the minimum number of participants that can enroll for the planned course. | |
| max_participants | No | A number representing the maximum number of participants that can enroll for the planned course. | |
| cost_scheme | No | The cost schema that the payment will follow for the specified course. | |
| cost | No | A positive float representing the price of the planned course. | |
| course_variant_id | No | Unique identifier of the course variant. | |
| course_location_id | No | Unique identifier of the course location. | |
| duration | No | The period of time of the planned course. Only needed for flexible planned courses. | |
| teacher_ids | No | The ids of the teachers in the course | |
| custom | No | ||
| custom_associations | No |
Implementation Reference
- src/tools/planned_courses.ts:216-224 (handler)The handler for 'update_planned_course' - an async function that destructures id from the input, makes an apiPatch call to /planned_courses/{id}, logs the response, and returns the formatted update.
async ({ id, ...body }) => { try { const record = await apiPatch<EduframeRecord>(`/planned_courses/${id}`, body); void logResponse("update_planned_course", { id, ...body }, record); return formatUpdate(record, "planned course"); } catch (error) { return formatError(error); } }, - src/tools/planned_courses.ts:179-214 (schema)Input schema for 'update_planned_course' defining all optional/required fields: id (required), is_published, course_id, start_date, end_date, min_participants, max_participants, cost_scheme, cost, course_variant_id, course_location_id, duration, teacher_ids, custom, custom_associations.
inputSchema: { id: z.number().int().positive().describe("ID of the planned course to update"), is_published: z.boolean().optional().describe("Boolean if is published on the website."), course_id: z.number().int().optional().describe("Unique identifier of the course."), start_date: z .string() .optional() .describe("Date at which the planned course starts. Only needed for fixed planned courses."), end_date: z .string() .optional() .describe("Date at which the planned course ends. Only needed for fixed planned courses."), min_participants: z .number() .int() .optional() .describe("A number representing the minimum number of participants that can enroll for the planned course."), max_participants: z .number() .int() .optional() .describe("A number representing the maximum number of participants that can enroll for the planned course."), cost_scheme: plannedCourseCostSchemeEnum .optional() .describe("The cost schema that the payment will follow for the specified course."), cost: z.number().optional().describe("A positive float representing the price of the planned course."), course_variant_id: z.number().int().optional().describe("Unique identifier of the course variant."), course_location_id: z.number().int().optional().describe("Unique identifier of the course location."), duration: z .number() .optional() .describe("The period of time of the planned course. Only needed for flexible planned courses."), teacher_ids: z.array(z.string()).optional().describe("The ids of the teachers in the course"), custom: z.record(z.unknown()).optional(), custom_associations: z.record(z.unknown()).optional(), }, - src/tools/planned_courses.ts:174-225 (registration)Registration of 'update_planned_course' tool via server.registerTool() with description, annotations (readOnlyHint: false, destructiveHint: false, idempotentHint: true), and inputSchema.
server.registerTool( "update_planned_course", { description: "Update a planned course.", annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true }, inputSchema: { id: z.number().int().positive().describe("ID of the planned course to update"), is_published: z.boolean().optional().describe("Boolean if is published on the website."), course_id: z.number().int().optional().describe("Unique identifier of the course."), start_date: z .string() .optional() .describe("Date at which the planned course starts. Only needed for fixed planned courses."), end_date: z .string() .optional() .describe("Date at which the planned course ends. Only needed for fixed planned courses."), min_participants: z .number() .int() .optional() .describe("A number representing the minimum number of participants that can enroll for the planned course."), max_participants: z .number() .int() .optional() .describe("A number representing the maximum number of participants that can enroll for the planned course."), cost_scheme: plannedCourseCostSchemeEnum .optional() .describe("The cost schema that the payment will follow for the specified course."), cost: z.number().optional().describe("A positive float representing the price of the planned course."), course_variant_id: z.number().int().optional().describe("Unique identifier of the course variant."), course_location_id: z.number().int().optional().describe("Unique identifier of the course location."), duration: z .number() .optional() .describe("The period of time of the planned course. Only needed for flexible planned courses."), teacher_ids: z.array(z.string()).optional().describe("The ids of the teachers in the course"), custom: z.record(z.unknown()).optional(), custom_associations: z.record(z.unknown()).optional(), }, }, async ({ id, ...body }) => { try { const record = await apiPatch<EduframeRecord>(`/planned_courses/${id}`, body); void logResponse("update_planned_course", { id, ...body }, record); return formatUpdate(record, "planned course"); } catch (error) { return formatError(error); } }, ); - src/tools/planned_courses.ts:7-8 (helper)Enum definitions used in the schema: plannedCourseCostSchemeEnum (zod enum: 'student' | 'order' | 'tbd' | 'free').
const plannedCourseTypeEnum = z.enum(["FixedPlannedCourse", "FlexiblePlannedCourse"]); const plannedCourseCostSchemeEnum = z.enum(["student", "order", "tbd", "free"]); - src/tools/index.ts:40-103 (registration)Import and registration of registerPlannedCourseTools in the central tools index.
import { registerPlannedCourseTools } from "./planned_courses"; import { registerPlanningAttendeeTools } from "./planning_attendees"; import { registerPlanningConflictTools } from "./planning_conflicts"; import { registerPlanningEventTools } from "./planning_events"; import { registerPlanningLocationTools } from "./planning_locations"; import { registerPlanningMaterialTools } from "./planning_materials"; import { registerPlanningRequiredTeacherGroupAttendeeTools } from "./planning_required_teacher_group_attendees"; import { registerPlanningTeacherTools } from "./planning_teachers"; import { registerProgramEditionTools } from "./program_editions"; import { registerProgramElementTools } from "./program_elements"; import { registerProgramEnrollmentTools } from "./program_enrollments"; import { registerProgramPersonalProgramElementTools } from "./program_personal_program_elements"; import { registerProgramProgramTools } from "./program_programs"; import { registerReferralTools } from "./referrals"; import { registerSignupQuestionTools } from "./signup_questions"; import { registerTaskTools } from "./tasks"; import { registerTeacherEnrollmentTools } from "./teacher_enrollments"; import { registerTeacherRoleTools } from "./teacher_roles"; import { registerTeacherTools } from "./teachers"; import { registerTheseTools } from "./theses"; import { registerUserTools } from "./users"; import { registerWebhookNotificationTools } from "./webhook_notifications"; import { registerWebhookTools } from "./webhooks"; const tools: Array<(server: McpServer) => void> = [ registerAccountTools, registerAffiliationTools, registerAttendanceTools, registerAuthenticationTools, registerCatalogProductTools, registerCatalogVariantTools, registerCategorieTools, registerCertificateTools, registerCommentTools, registerCourseLocationTools, registerCourseTabTools, registerCourseVariantTools, registerCourseTools, registerCreditCategorieTools, registerCreditTools, registerCustomAssociationTools, registerCustomFieldOptionTools, registerCustomObjectTools, registerCustomRecordTools, registerDiscountCodeTools, registerEditionDescriptionSectionTools, registerEducatorTools, registerEmailTools, registerEnrollmentTools, registerGradeTools, registerInvoiceVatTools, registerInvoiceTools, registerLabelTools, registerLeadTools, registerMaterialGroupTools, registerMaterialTools, registerMeetingLocationTools, registerMeetingTools, registerOrderTools, registerOrganizationTools, registerPaymentMethodTools, registerPaymentOptionTools, registerPaymentTools, registerPlannedCourseTools,