search_curriculums
Search for Swedish educational curricula by school type and time period to find current requirements, compare different educational levels, and understand curriculum structure.
Instructions
Sök efter läroplaner (t.ex. LGR11, GY11).
ANVÄNDNINGSFALL:
Hitta gällande läroplaner
Jämföra läroplaner mellan skolformer
Förstå läroplanernas struktur
RETURNERAR: Lista över läroplaner med kod, namn och giltighetsperiod.
EXEMPEL: LGR11 (Läroplan för grundskolan 2011), GY11 (Gymnasiet 2011).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schooltype | No | ||
| timespan | No | ||
| typeOfSyllabus | No |
Implementation Reference
- src/tools/syllabus/curriculums.ts:26-65 (handler)The async handler function for the 'search_curriculums' tool. It calls the syllabus API with provided parameters, formats the response as JSON text content, or returns an error message.export async function searchCurriculums(params: { schooltype?: string; timespan?: 'LATEST' | 'FUTURE' | 'EXPIRED' | 'MODIFIED'; date?: string; }) { try { const result = await syllabusApi.searchCurriculums(params); return { content: [ { type: 'text' as const, text: JSON.stringify({ totalElements: result.totalElements, curriculums: result.curriculums.map(c => ({ code: c.code, name: c.name, schoolType: c.schoolType, typeOfSyllabus: c.typeOfSyllabus, version: c.version, validFrom: c.validFrom, validTo: c.validTo, description: c.description?.substring(0, 200) + (c.description && c.description.length > 200 ? '...' : '') })) }, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Fel vid sökning av läroplaner: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
- Zod schema defining the input parameters for the searchCurriculums tool, including schooltype, timespan, and date with descriptions.export const searchCurriculumsSchema = { schooltype: z.string().optional().describe('Skoltyp (t.ex. "GR" för grundskola, "GY" för gymnasium)'), timespan: z.enum(['LATEST', 'FUTURE', 'EXPIRED', 'MODIFIED']).default('LATEST').describe('Tidsperiod: LATEST (gällande), FUTURE (framtida), EXPIRED (utgångna), MODIFIED (ändrade)'), date: z.string().optional().describe('Datum i formatet YYYY-MM-DD för att hämta läroplaner som var giltiga vid det datumet') };
- src/http-server.ts:51-87 (registration)Registration of all tools in the HTTP server's tools map, including 'search_curriculums' mapped to the imported searchCurriculums function.const tools: Record<string, (args: any) => Promise<any>> = { // Syllabus API search_subjects: searchSubjects, get_subject_details: getSubjectDetails, get_subject_versions: getSubjectVersions, search_courses: searchCourses, get_course_details: getCourseDetails, get_course_versions: getCourseVersions, search_programs: searchPrograms, get_program_details: getProgramDetails, get_program_versions: getProgramVersions, search_curriculums: searchCurriculums, get_curriculum_details: getCurriculumDetails, get_curriculum_versions: getCurriculumVersions, get_school_types: getSchoolTypes, get_types_of_syllabus: getTypesOfSyllabus, get_subject_and_course_codes: getSubjectAndCourseCodes, get_study_path_codes: getStudyPathCodes, get_api_info: getApiInfo, // School Units API search_school_units: searchSchoolUnits, get_school_unit_details: getSchoolUnitDetails, get_school_units_by_status: getSchoolUnitsByStatus, search_school_units_by_name: searchSchoolUnitsByName, // Planned Education API search_adult_education: searchAdultEducation, get_adult_education_details: getAdultEducationDetails, filter_adult_education_by_distance: filterAdultEducationByDistance, filter_adult_education_by_pace: filterAdultEducationByPace, get_education_areas: getEducationAreas, get_directions: getDirections, // Diagnostics health_check: healthCheck, };