get_sub_entity_updates
Retrieve updates on subsidiary entities to maintain an accurate local copy of the Norwegian Business Registry.
Instructions
Get updates on sub-entities for maintaining a local copy of the registry
Input Schema
TableJSON 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) |
Implementation Reference
- src/brreg-mcp-server.ts:126-135 (handler)Core handler function in BrregApiClient that executes the tool logic by making an HTTP request to the BRREG API for sub-entity updates.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 (registration)Tool registration in the ListTools response, including name, description, and input schema.{ 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:336-346 (schema)Input schema definition for the get_sub_entity_updates tool, specifying parameters and types.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 (handler)Dispatch handler in the MCP CallToolRequestSchema that invokes the apiClient method and formats the 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), }, ], };