get_adult_education_details
Retrieve detailed course information including curriculum content, admission requirements, and application planning for Swedish adult education programs.
Instructions
Hämta detaljerad information om ett utbildningstillfälle.
ANVÄNDNINGSFALL:
Se fullständig kursinformation
Läsa kursplan
Kontrollera antagningskrav
Planera ansökan
RETURNERAR: Komplett utbildningsinfo inkl. innehåll och krav.
EXEMPEL: Använd ID från search_adult_education.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- The main handler function for the get_adult_education_details tool. It calls the Planned Education API to fetch details for a specific adult education event by ID and returns formatted JSON or error message.export async function getAdultEducationDetails(params: { id: string; }) { try { const response = await plannedEducationApi.getAdultEducationDetails(params.id); if (response.status !== 'OK') { throw new Error(response.message || 'Okänt fel från API'); } return { content: [ { type: 'text' as const, text: JSON.stringify(response.body, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text' as const, text: `Fel vid hämtning av utbildningsdetaljer: ${error instanceof Error ? error.message : String(error)}` } ], isError: true }; }
- Zod schema defining the input parameters for the tool: requires an 'id' string for the education event.export const getAdultEducationDetailsSchema = { id: z.string().describe('Utbildningstillfällets ID') };
- src/http-server.ts:79-79 (registration)Registration of the tool in the HTTP server's tools registry, mapping 'get_adult_education_details' to the handler function. Imported from './tools/planned-education/adult-education.js' on line 28.get_adult_education_details: getAdultEducationDetails,
- API client method that performs the actual HTTP GET request to Skolverket's Planned Education API v3 to retrieve adult education event details by ID.async getAdultEducationDetails(id: string): Promise<ApiResponse<AdultEducationEvent>> { return this.get<ApiResponse<AdultEducationEvent>>(`/v3/adult-education-events/${id}`); }