get_ou_types
Retrieve common organizational unit types and descriptions for Swedish public sector data analysis, such as V11=Preschool or V15=Elementary school.
Instructions
Hämta en lista över vanliga organisationsenhetstyper och deras beskrivningar (t.ex. V11=Förskola, V15=Grundskola).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/ou-tools.ts:155-186 (handler)The handler function for 'get_ou_types' tool. It returns a hardcoded JSON object listing common Swedish organizational unit types (OU types) like V11 for Preschool, with descriptions and a note.handler: async (): Promise<ToolResult> => { const startTime = Date.now(); logger.toolCall('get_ou_types', {}); const ouTypes = { V11: 'Förskola (Preschool)', V15: 'Grundskola (Primary School)', V16: 'Gymnasieskola (Upper Secondary School)', V17: 'Särskola (Special Needs School)', V18: 'Vuxenutbildning (Adult Education)', V21: 'Äldreboende (Elderly Care)', V31: 'Fritidshem (After-school Care)', }; logger.toolResult('get_ou_types', true, Date.now() - startTime); return { content: [ { type: 'text', text: JSON.stringify( { ou_types: ouTypes, note: 'Dessa är vanliga OU-typprefix. Använd search_organizational_units för att hitta faktiska enheter.', }, null, 2 ), }, ], }; },
- src/tools/ou-tools.ts:31-31 (schema)Zod input schema for 'get_ou_types' tool, which takes no parameters (empty object).const getOuTypesSchema = z.object({});
- src/tools/ou-tools.ts:151-187 (registration)Local registration/definition of the 'get_ou_types' tool within the ouTools object exported from ou-tools.ts.get_ou_types: { description: 'Hämta en lista över vanliga organisationsenhetstyper och deras beskrivningar (t.ex. V11=Förskola, V15=Grundskola).', inputSchema: getOuTypesSchema, annotations: READ_ONLY_ANNOTATIONS, handler: async (): Promise<ToolResult> => { const startTime = Date.now(); logger.toolCall('get_ou_types', {}); const ouTypes = { V11: 'Förskola (Preschool)', V15: 'Grundskola (Primary School)', V16: 'Gymnasieskola (Upper Secondary School)', V17: 'Särskola (Special Needs School)', V18: 'Vuxenutbildning (Adult Education)', V21: 'Äldreboende (Elderly Care)', V31: 'Fritidshem (After-school Care)', }; logger.toolResult('get_ou_types', true, Date.now() - startTime); return { content: [ { type: 'text', text: JSON.stringify( { ou_types: ouTypes, note: 'Dessa är vanliga OU-typprefix. Använd search_organizational_units för att hitta faktiska enheter.', }, null, 2 ), }, ], }; }, },
- src/server/handlers.ts:32-38 (registration)Central tool registry 'allTools' that spreads ouTools (containing get_ou_types) along with other tool sets for use in MCP server handlers.export const allTools = { ...kpiTools, ...municipalityTools, ...ouTools, ...dataTools, ...analysisTools, };
- src/server/handlers.ts:13-13 (registration)Import of ouTools module that provides the get_ou_types tool into the server handlers module.import { ouTools } from '../tools/ou-tools.js';