get_planned_courses_by_id_and_course_id
Retrieve a specific planned course record using its ID and parent course ID. Use this to access detailed information about an individual planned course.
Instructions
Get a planned course record of a single course
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| course_id | Yes | ID of the parent resource | |
| id | Yes | ID of the planned course to retrieve |
Implementation Reference
- src/tools/planned_courses.ts:106-114 (handler)The handler function that executes the 'get_planned_courses_by_id_and_course_id' tool logic. It takes course_id and id as parameters, calls apiGet on GET /courses/{course_id}/planned_courses/{id}, logs the response, and formats the result.
async ({ course_id, id }) => { try { const record = await apiGet<EduframeRecord>(`/courses/${course_id}/planned_courses/${id}`); void logResponse("get_planned_courses_by_id_and_course_id", { course_id, id }, record); return formatShow(record, "planned course"); } catch (error) { return formatError(error); } }, - src/tools/planned_courses.ts:101-104 (schema)Input schema definition for the tool. Defines required parameters: course_id (positive integer) and id (positive integer).
inputSchema: { course_id: z.number().int().positive().describe("ID of the parent resource"), id: z.number().int().positive().describe("ID of the planned course to retrieve"), }, - src/tools/planned_courses.ts:96-115 (registration)Tool registration call using server.registerTool with the name 'get_planned_courses_by_id_and_course_id', including metadata (readOnlyHint, destructiveHint, idempotentHint) and the handler.
server.registerTool( "get_planned_courses_by_id_and_course_id", { description: "Get a planned course record of a single course", annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true }, inputSchema: { course_id: z.number().int().positive().describe("ID of the parent resource"), id: z.number().int().positive().describe("ID of the planned course to retrieve"), }, }, async ({ course_id, id }) => { try { const record = await apiGet<EduframeRecord>(`/courses/${course_id}/planned_courses/${id}`); void logResponse("get_planned_courses_by_id_and_course_id", { course_id, id }, record); return formatShow(record, "planned course"); } catch (error) { return formatError(error); } }, ); - src/tools/index.ts:103-103 (registration)The tool registration function is registered in the central tools index as part of the registerPlannedCourseTools array entry.
registerPlannedCourseTools,