get_api_info
Retrieve API metadata and technical documentation for Skolverket's educational data services, including version details and contact information.
Instructions
Hämta information om Skolverkets Läroplan API.
ANVÄNDNINGSFALL:
Se API-version
Kontakta information
Teknisk dokumentation
RETURNERAR: API-metadata och information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/syllabus/valuestore.ts:157-180 (handler)The primary handler function for the 'get_api_info' MCP tool. It fetches API information from the syllabus API client and returns a formatted text response containing the JSON data, with error handling.export async function getApiInfo() { try { const info = await syllabusApi.getApiInfo(); return { content: [ { type: 'text' as const, text: JSON.stringify(info, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Fel vid hämtning av API-information: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; } }
- src/http-server.ts:65-70 (registration)Registration of the 'get_api_info' tool in the tools registry object used by the HTTP/SSE MCP server.get_school_types: getSchoolTypes, get_types_of_syllabus: getTypesOfSyllabus, get_subject_and_course_codes: getSubjectAndCourseCodes, get_study_path_codes: getStudyPathCodes, get_api_info: getApiInfo,
- src/http-server.ts:26-26 (registration)Import statement that brings in the getApiInfo handler function for registration as the 'get_api_info' tool.import { getSchoolTypes, getTypesOfSyllabus, getSubjectAndCourseCodes, getStudyPathCodes, getApiInfo } from './tools/syllabus/valuestore.js';
- src/api/syllabus-client.ts:157-159 (helper)Helper method in the Syllabus API client that fetches cached API information from '/v1/api-info' endpoint.async getApiInfo(): Promise<ApiInfo> { return this.getCached<ApiInfo>('/v1/api-info', undefined, 3600000); }