get_entity_roles
Retrieve all roles for a Norwegian business entity using its 9-digit organization number to understand corporate structure and governance.
Instructions
Get all roles for a specific entity
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organisasjonsnummer | Yes | 9-digit organization number |
Implementation Reference
- src/brreg-mcp-server.ts:87-89 (handler)The core handler function in BrregApiClient that fetches entity roles from the BRREG API by making an HTTP request to the specific endpoint.async getEntityRoles(orgNumber: string) { return this.makeRequest(`/enhetsregisteret/api/enheter/${orgNumber}/roller`); }
- src/brreg-mcp-server.ts:222-231 (registration)Tool registration in the ListToolsRequestSchema handler, defining the tool name, description, and input schema.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:425-436 (handler)Dispatch handler in the CallToolRequestSchema that parses input arguments and invokes the BrregApiClient.getEntityRoles method, returning the JSON response.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 validating the tool parameters.inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" } }, required: ["organisasjonsnummer"] }