Skip to main content
Glama

get_curriculum_versions

Retrieve version history for Swedish curricula to track revisions, compare different versions, and support educational research on curriculum development.

Instructions

Hämta versionshistorik för en läroplan.

ANVÄNDNINGSFALL:

  • Spåra revideringar av läroplaner

  • Jämföra olika versioner

  • Forskning om läroplansutveckling

RETURNERAR: Lista över versioner med datum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Implementation Reference

  • The primary handler function implementing the logic for the 'get_curriculum_versions' tool. It invokes the syllabus API client, processes the response into MCP-compatible content, and handles errors gracefully.
    export async function getCurriculumVersions(params: {
      code: string;
    }) {
      try {
        const versions = await syllabusApi.getCurriculumVersions(params.code);
    
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify({
                code: params.code,
                totalVersions: versions.totalElements,
                versions: versions.versions
              }, null, 2)
            }
          ]
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text' as const,
              text: `Fel vid hämtning av läroplansversioner: ${error instanceof Error ? error.message : String(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Zod input schema for the tool, validating the required 'code' parameter as a string with description.
    export const getCurriculumVersionsSchema = {
      code: z.string().describe('Läroplanskod att hämta versioner för')
    };
  • Tool registration in the HTTP server's tools registry, mapping the string name 'get_curriculum_versions' to the handler function.
    get_curriculum_versions: getCurriculumVersions,
  • API client method that performs the actual HTTP GET request to Skolverket's syllabus API to retrieve curriculum versions.
    async getCurriculumVersions(code: string): Promise<VersionsResponse> {
      return this.get<VersionsResponse>(`/v1/curriculums/${code}/versions`);
    }

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/isakskogstad/skolverket-syllabus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server