get_sub_entity
Retrieve detailed information about specific Norwegian business sub-entities using their 9-digit organization number to access corporate structure and governance data.
Instructions
Get detailed information about a specific Norwegian business sub-entity
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organisasjonsnummer | Yes | 9-digit organization number |
Implementation Reference
- src/brreg-mcp-server.ts:95-97 (handler)Core handler function in BrregApiClient class that makes the HTTP request to the BRREG API to fetch detailed information about a specific sub-entity (underenhet) by its organization number.async getSubEntity(orgNumber: string) { return this.makeRequest(`/enhetsregisteret/api/underenheter/${orgNumber}`); }
- src/brreg-mcp-server.ts:264-270 (schema)JSON schema defining the input parameters for the get_sub_entity tool: requires a 9-digit organisasjonsnummer string.inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" } }, required: ["organisasjonsnummer"] }
- src/brreg-mcp-server.ts:261-271 (registration)Tool registration in the ListTools response, including name, description, and input schema.{ name: "get_sub_entity", description: "Get detailed information about a specific Norwegian business sub-entity", inputSchema: { type: "object", properties: { organisasjonsnummer: { type: "string", description: "9-digit organization number" } }, required: ["organisasjonsnummer"] } },
- src/brreg-mcp-server.ts:448-458 (handler)MCP server handler case that extracts the organization number from tool arguments, calls the apiClient handler, and returns the JSON-formatted response as text content.case "get_sub_entity": const { organisasjonsnummer: subOrgNum } = request.params.arguments as { organisasjonsnummer: string }; const subEntity = await apiClient.getSubEntity(subOrgNum); return { content: [ { type: "text", text: JSON.stringify(subEntity, null, 2), }, ], };