Skip to main content
Glama

get_program_versions

Retrieve version history for educational programs to track curriculum changes, compare program plans, and understand vocational training development.

Instructions

Hämta versionshistorik för ett program.

ANVÄNDNINGSFALL:

  • Spåra hur program förändrats

  • Jämföra gamla och nya programplaner

  • Förstå utveckling av yrkesutbildningar

RETURNERAR: Lista över alla versioner med datum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Implementation Reference

  • Main handler function that executes the tool: validates input implicitly via schema elsewhere, calls syllabusApi.getProgramVersions, formats response as JSON or error.
    export async function getProgramVersions(params: { code: string; }) { try { const versions = await syllabusApi.getProgramVersions(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 programversioner: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
  • Zod schema defining the input parameters for the tool (requires 'code' string).
    export const getProgramVersionsSchema = { code: z.string().describe('Programkod att hämta versioner för') };
  • Registers the getProgramVersions function as the 'get_program_versions' tool in the central tools registry object.
    search_programs: searchPrograms, get_program_details: getProgramDetails, get_program_versions: getProgramVersions,
  • Imports the getProgramVersions handler function into the http-server for registration.
    import { searchPrograms, getProgramDetails, getProgramVersions } from './tools/syllabus/programs.js';
  • API client helper method in SyllabusApiClient that makes the HTTP request to Skolverket's /v1/programs/{code}/versions endpoint.
    async getProgramVersions(code: string): Promise<VersionsResponse> { return this.get<VersionsResponse>(`/v1/programs/${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