get_voluntary_organization
Retrieve detailed information about a specific voluntary organization from the Norwegian Business Registry using its 9-digit organization number.
Instructions
Get detailed information about a specific voluntary organization
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organisasjonsnummer | Yes | 9-digit organization number | |
| spraak | No | Language for code descriptions (e.g., 'NOB') |
Input Schema (JSON Schema)
{
"properties": {
"organisasjonsnummer": {
"description": "9-digit organization number",
"type": "string"
},
"spraak": {
"description": "Language for code descriptions (e.g., 'NOB')",
"type": "string"
}
},
"required": [
"organisasjonsnummer"
],
"type": "object"
}
Implementation Reference
- src/brreg-mcp-server.ts:154-156 (handler)The core handler function in BrregApiClient that executes the tool logic by constructing the API endpoint and calling makeRequest to fetch the voluntary organization data from BRREG.async getVoluntaryOrganization(orgNumber: string, params: { spraak?: string } = {}) { return this.makeRequest(`/frivillighetsregisteret/api/frivillige-organisasjoner/${orgNumber}`, params); }
- src/brreg-mcp-server.ts:376-383 (schema)Defines the input schema for the get_voluntary_organization tool, specifying parameters like organisasjonsnummer (required) and optional spraak.inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" }, spraak: { type: "string", description: "Language for code descriptions (e.g., 'NOB')" } }, required: ["organisasjonsnummer"] }
- src/brreg-mcp-server.ts:374-384 (registration)Registers the get_voluntary_organization tool in the MCP server's ListTools response, including name, description, and input schema.name: "get_voluntary_organization", description: "Get detailed information about a specific voluntary organization", inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" }, spraak: { type: "string", description: "Language for code descriptions (e.g., 'NOB')" } }, required: ["organisasjonsnummer"] } },
- src/brreg-mcp-server.ts:550-560 (handler)The MCP CallToolRequest dispatch handler for get_voluntary_organization, which extracts arguments, calls the apiClient method, and formats the response as MCP content.case "get_voluntary_organization": const { organisasjonsnummer: volOrgNum, spraak } = request.params.arguments as { organisasjonsnummer: string; spraak?: string }; const voluntaryOrg = await apiClient.getVoluntaryOrganization(volOrgNum, { spraak }); return { content: [ { type: "text", text: JSON.stringify(voluntaryOrg, null, 2), }, ], };