get_sub_entity_updates
Retrieve updates on subsidiaries and sub-entities from the Norwegian Business Registry to maintain an accurate local copy with timestamp filtering.
Instructions
Get updates on sub-entities for maintaining a local copy of the registry
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dato | No | Show updates from this timestamp (ISO-8601) | |
| oppdateringsid | No | Show updates from this update ID | |
| organisasjonsnummer | No | Filter by organization numbers | |
| page | No | Page number | |
| size | No | Page size (default 20, max 10000) | |
| sort | No | Sort by ID (ASC/DESC) |
Input Schema (JSON Schema)
{
"properties": {
"dato": {
"description": "Show updates from this timestamp (ISO-8601)",
"type": "string"
},
"oppdateringsid": {
"description": "Show updates from this update ID",
"type": "string"
},
"organisasjonsnummer": {
"description": "Filter by organization numbers",
"items": {
"type": "string"
},
"type": "array"
},
"page": {
"description": "Page number",
"type": "number"
},
"size": {
"description": "Page size (default 20, max 10000)",
"type": "number"
},
"sort": {
"description": "Sort by ID (ASC/DESC)",
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/brreg-mcp-server.ts:126-135 (handler)The core handler function in BrregApiClient that performs the HTTP request to the BRREG API for sub-entity updates using the makeRequest helper.async getSubEntityUpdates(params: { dato?: string; oppdateringsid?: string; organisasjonsnummer?: string[]; page?: number; size?: number; sort?: string; } = {}) { return this.makeRequest('/enhetsregisteret/api/oppdateringer/underenheter', params); }
- src/brreg-mcp-server.ts:333-347 (schema)Input schema definition for the get_sub_entity_updates tool, provided in the ListTools response, defining parameters for filtering and paginating updates.{ name: "get_sub_entity_updates", description: "Get updates on sub-entities for maintaining a local copy of the registry", inputSchema: { type: "object", properties: { dato: { type: "string", description: "Show updates from this timestamp (ISO-8601)" }, oppdateringsid: { type: "string", description: "Show updates from this update ID" }, organisasjonsnummer: { type: "array", items: { type: "string" }, description: "Filter by organization numbers" }, page: { type: "number", description: "Page number" }, size: { type: "number", description: "Page size (default 20, max 10000)" }, sort: { type: "string", description: "Sort by ID (ASC/DESC)" } } } },
- src/brreg-mcp-server.ts:517-526 (registration)Registration and dispatching logic in the CallToolRequestHandler switch statement that calls the handler and returns the JSON-formatted response.case "get_sub_entity_updates": const subEntityUpdates = await apiClient.getSubEntityUpdates(request.params.arguments as any); return { content: [ { type: "text", text: JSON.stringify(subEntityUpdates, null, 2), }, ], };