get_course_details
Retrieve detailed course information including content, grading requirements, objectives, and scope for Swedish educational planning and assessment.
Instructions
Hämta detaljerad information om en specifik kurs.
ANVÄNDNINGSFALL:
Granska centralt innehåll för kursplanering
Analysera kunskapskrav för alla betyg (E, C, A)
Förstå kursmål och syfte
Planera bedömning och examination
RETURNERAR: Komplett kursinformation inkl:
Centralt innehåll per område
Kunskapskrav för E, C och A
Poäng och omfattning
Syfte och mål
EXEMPEL: code="MATMAT01c" för Matematik 1c.
VIKTIGT: Detta är den mest använda funktionen för lärare!
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| version | No |
Implementation Reference
- src/tools/syllabus/courses.ts:78-105 (handler)The main handler function for the 'get_course_details' tool. It fetches course details from the syllabus API using the provided code, optional version, and date, then returns a formatted JSON response or an error message.export async function getCourseDetails(params: { code: string; version?: number; date?: string; }) { try { const course = await syllabusApi.getCourse(params.code, params.version, params.date); return { content: [ { type: 'text' as const, text: JSON.stringify(course, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Fel vid hämtning av kursdetaljer: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
- src/tools/syllabus/courses.ts:17-21 (schema)Zod schema defining the input parameters for the 'get_course_details' tool: code (required), version (optional), date (optional).export const getCourseDetailsSchema = { code: z.string().describe('Kurskod (t.ex. "MATMAT01a" för Matematik 1a)'), version: z.number().optional().describe('Versionsnummer (lämna tomt för senaste versionen)'), date: z.string().optional().describe('Datum i formatet YYYY-MM-DD för att hämta versionen som var giltig vid det datumet') };
- src/http-server.ts:57-57 (registration)Registration of the 'get_course_details' tool in the tools registry, mapping the snake_case tool name to the camelCase handler function.get_course_details: getCourseDetails,
- src/http-server.ts:23-23 (registration)Import statement bringing in the getCourseDetails handler from the courses module.import { searchCourses, getCourseDetails, getCourseVersions } from './tools/syllabus/courses.js';