get_entity_roles
Retrieve all roles associated with a specific Norwegian business entity using its 9-digit organization number to access corporate governance and structure data.
Instructions
Get all roles for a specific entity
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organisasjonsnummer | Yes | 9-digit organization number |
Input Schema (JSON Schema)
{
"properties": {
"organisasjonsnummer": {
"description": "9-digit organization number",
"type": "string"
}
},
"required": [
"organisasjonsnummer"
],
"type": "object"
}
Implementation Reference
- src/brreg-mcp-server.ts:425-436 (handler)MCP CallToolRequestSchema handler case for 'get_entity_roles': destructures organisasjonsnummer from arguments, calls apiClient.getEntityRoles, and returns the JSON-stringified roles as text content.case "get_entity_roles": const { organisasjonsnummer: orgNum } = request.params.arguments as { organisasjonsnummer: string }; const roles = await apiClient.getEntityRoles(orgNum); return { content: [ { type: "text", text: JSON.stringify(roles, null, 2), }, ], };
- src/brreg-mcp-server.ts:224-230 (schema)Input schema for the get_entity_roles tool: requires a single 'organisasjonsnummer' string property.inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" } }, required: ["organisasjonsnummer"] }
- src/brreg-mcp-server.ts:221-231 (registration)Tool registration in ListToolsRequestSchema response: defines name, description, and inputSchema for get_entity_roles.{ name: "get_entity_roles", description: "Get all roles for a specific entity", inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" } }, required: ["organisasjonsnummer"] } },
- src/brreg-mcp-server.ts:87-89 (helper)BrregApiClient helper method: performs HTTP request to BRREG API to fetch roles for the given organization number.async getEntityRoles(orgNumber: string) { return this.makeRequest(`/enhetsregisteret/api/enheter/${orgNumber}/roller`); }