Skip to main content
Glama
reidar80

Norwegian Business Registry MCP Server

by reidar80

get_role_updates

Retrieve role change notifications for Norwegian companies to monitor board member and governance updates in real-time.

Instructions

Get role updates for entities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterTimeNoGet events after this timestamp (ISO-8601)
afterIdNoGet events after this ID
organisasjonsnummerNoFilter by organization numbers
sizeNoNumber of events to retrieve (default 100, max 10000)

Implementation Reference

  • Core implementation of get_role_updates tool: fetches role updates from BRREG API endpoint '/enhetsregisteret/api/oppdateringer/roller' using the shared makeRequest method.
    async getRoleUpdates(params: {
      afterTime?: string;
      afterId?: number;
      organisasjonsnummer?: string[];
      size?: number;
    } = {}) {
      return this.makeRequest('/enhetsregisteret/api/oppdateringer/roller', params);
    }
  • Registers the get_role_updates tool in the ListTools response with name, description, and input schema.
    {
      name: "get_role_updates",
      description: "Get role updates for entities",
      inputSchema: {
        type: "object",
        properties: {
          afterTime: { type: "string", description: "Get events after this timestamp (ISO-8601)" },
          afterId: { type: "number", description: "Get events after this ID" },
          organisasjonsnummer: { type: "array", items: { type: "string" }, description: "Filter by organization numbers" },
          size: { type: "number", description: "Number of events to retrieve (default 100, max 10000)" }
        }
      }
    },
  • MCP CallToolRequest handler case for get_role_updates: calls BrregApiClient.getRoleUpdates and formats response as JSON text.
    case "get_role_updates":
      const roleUpdates = await apiClient.getRoleUpdates(request.params.arguments as any);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(roleUpdates, null, 2),
          },
        ],
      };
  • Shared helper method used by getRoleUpdates (and other tools) to make HTTP requests to BRREG API, handling params, fetch, and errors.
    private async makeRequest(endpoint: string, params?: Record<string, any>): Promise<any> {
      const url = new URL(`${BASE_URL}${endpoint}`);
      
      if (params) {
        Object.entries(params).forEach(([key, value]) => {
          if (value !== undefined && value !== null) {
            if (Array.isArray(value)) {
              url.searchParams.set(key, value.join(','));
            } else {
              url.searchParams.set(key, String(value));
            }
          }
        });
      }
    
      const response = await fetch(url.toString(), {
        headers: {
          'Accept': 'application/json',
        },
      });
    
      if (!response.ok) {
        if (response.status === 404) {
          throw new McpError(ErrorCode.InvalidRequest, `Resource not found: ${endpoint}`);
        }
        throw new McpError(ErrorCode.InternalError, `API request failed: ${response.status} ${response.statusText}`);
      }
    
      return response.json();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does without mentioning permissions, rate limits, pagination, or response format. For a tool with 4 parameters and no output schema, this lack of detail is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded and appropriately sized for the tool's complexity, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'role updates' entail, how results are returned, or any behavioral traits, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents all parameters. The description adds no additional meaning beyond the schema, such as explaining relationships between parameters (e.g., 'afterTime' vs. 'afterId') or typical use cases. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get role updates for entities' states a purpose with a verb ('Get') and resource ('role updates'), but it's vague about what 'role updates' means and doesn't distinguish it from siblings like 'get_entity_roles' or 'get_entity_updates'. It lacks specificity about the scope or nature of these updates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_entity_roles' and 'get_entity_updates', there's no indication of how this tool differs in context, such as whether it's for historical changes, real-time updates, or filtered views, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/reidar80/BRREG-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server