Skip to main content
Glama
reidar80

Norwegian Business Registry MCP Server

by reidar80

search_entities

Find Norwegian business entities using filters like name, organization number, industry codes, or registration status to access company information from the national registry.

Instructions

Search for Norwegian business entities (hovedenheter) with various filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
navnNoEntity name (1-180 characters)
navnMetodeForSoekNoSearch method for name parameter
organisasjonsnummerNoList of organization numbers (9 digits)
overordnetEnhetNoParent entity organization number
fraAntallAnsatteNoMinimum number of employees
tilAntallAnsatteNoMaximum number of employees
konkursNoWhether entity is bankrupt
registrertIMvaregisteretNoRegistered in VAT registry
registrertIForetaksregisteretNoRegistered in business registry
registrertIStiftelsesregisteretNoRegistered in foundation registry
registrertIFrivillighetsregisteretNoRegistered in voluntary organization registry
underTvangsavviklingEllerTvangsopplosningNoUnder forced liquidation
underAvviklingNoUnder liquidation
underKonkursbehandlingNoUnder bankruptcy proceedings
organisasjonsformNoOrganizational forms
hjemmesideNoWebsite
kommunenummerNoMunicipality numbers
naeringskodeNoIndustry codes
sizeNoPage size (default 20)
pageNoPage number
sortNoSort field and order (e.g., 'navn,ASC')

Implementation Reference

  • The main MCP tool handler logic for 'search_entities'. It extracts parameters, calls the BrregApiClient's searchEntities method, and returns the results as a formatted JSON text content block.
    case "search_entities":
      const entityResults = await apiClient.searchEntities(request.params.arguments as EntitySearchParams);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(entityResults, null, 2),
          },
        ],
      };
  • TypeScript interface defining the input parameters for the search_entities tool, matching the MCP inputSchema.
    interface EntitySearchParams {
      navn?: string;
      navnMetodeForSoek?: string;
      organisasjonsnummer?: string[];
      overordnetEnhet?: string;
      fraAntallAnsatte?: number;
      tilAntallAnsatte?: number;
      konkurs?: boolean;
      registrertIMvaregisteret?: boolean;
      registrertIForetaksregisteret?: boolean;
      registrertIStiftelsesregisteret?: boolean;
      registrertIFrivillighetsregisteret?: boolean;
      underTvangsavviklingEllerTvangsopplosning?: boolean;
      underAvvikling?: boolean;
      underKonkursbehandling?: boolean;
      organisasjonsform?: string[];
      hjemmeside?: string;
      kommunenummer?: string[];
      naeringskode?: string[];
      size?: number;
      page?: number;
      sort?: string;
    }
  • MCP input schema definition for the search_entities tool, as returned by ListTools.
      type: "object",
      properties: {
        navn: { type: "string", description: "Entity name (1-180 characters)" },
        navnMetodeForSoek: { type: "string", enum: ["FORTLOEPENDE"], description: "Search method for name parameter" },
        organisasjonsnummer: { type: "array", items: { type: "string" }, description: "List of organization numbers (9 digits)" },
        overordnetEnhet: { type: "string", description: "Parent entity organization number" },
        fraAntallAnsatte: { type: "number", description: "Minimum number of employees" },
        tilAntallAnsatte: { type: "number", description: "Maximum number of employees" },
        konkurs: { type: "boolean", description: "Whether entity is bankrupt" },
        registrertIMvaregisteret: { type: "boolean", description: "Registered in VAT registry" },
        registrertIForetaksregisteret: { type: "boolean", description: "Registered in business registry" },
        registrertIStiftelsesregisteret: { type: "boolean", description: "Registered in foundation registry" },
        registrertIFrivillighetsregisteret: { type: "boolean", description: "Registered in voluntary organization registry" },
        underTvangsavviklingEllerTvangsopplosning: { type: "boolean", description: "Under forced liquidation" },
        underAvvikling: { type: "boolean", description: "Under liquidation" },
        underKonkursbehandling: { type: "boolean", description: "Under bankruptcy proceedings" },
        organisasjonsform: { type: "array", items: { type: "string" }, description: "Organizational forms" },
        hjemmeside: { type: "string", description: "Website" },
        kommunenummer: { type: "array", items: { type: "string" }, description: "Municipality numbers" },
        naeringskode: { type: "array", items: { type: "string" }, description: "Industry codes" },
        size: { type: "number", description: "Page size (default 20)" },
        page: { type: "number", description: "Page number" },
        sort: { type: "string", description: "Sort field and order (e.g., 'navn,ASC')" }
      }
    }
  • Tool registration in the ListTools response, defining name, description, and input schema.
    {
      name: "search_entities",
      description: "Search for Norwegian business entities (hovedenheter) with various filters",
      inputSchema: {
        type: "object",
        properties: {
          navn: { type: "string", description: "Entity name (1-180 characters)" },
          navnMetodeForSoek: { type: "string", enum: ["FORTLOEPENDE"], description: "Search method for name parameter" },
          organisasjonsnummer: { type: "array", items: { type: "string" }, description: "List of organization numbers (9 digits)" },
          overordnetEnhet: { type: "string", description: "Parent entity organization number" },
          fraAntallAnsatte: { type: "number", description: "Minimum number of employees" },
          tilAntallAnsatte: { type: "number", description: "Maximum number of employees" },
          konkurs: { type: "boolean", description: "Whether entity is bankrupt" },
          registrertIMvaregisteret: { type: "boolean", description: "Registered in VAT registry" },
          registrertIForetaksregisteret: { type: "boolean", description: "Registered in business registry" },
          registrertIStiftelsesregisteret: { type: "boolean", description: "Registered in foundation registry" },
          registrertIFrivillighetsregisteret: { type: "boolean", description: "Registered in voluntary organization registry" },
          underTvangsavviklingEllerTvangsopplosning: { type: "boolean", description: "Under forced liquidation" },
          underAvvikling: { type: "boolean", description: "Under liquidation" },
          underKonkursbehandling: { type: "boolean", description: "Under bankruptcy proceedings" },
          organisasjonsform: { type: "array", items: { type: "string" }, description: "Organizational forms" },
          hjemmeside: { type: "string", description: "Website" },
          kommunenummer: { type: "array", items: { type: "string" }, description: "Municipality numbers" },
          naeringskode: { type: "array", items: { type: "string" }, description: "Industry codes" },
          size: { type: "number", description: "Page size (default 20)" },
          page: { type: "number", description: "Page number" },
          sort: { type: "string", description: "Sort field and order (e.g., 'navn,ASC')" }
        }
      }
    },
    {
  • Helper method in BrregApiClient that performs the actual API request to search entities using makeRequest.
    async searchEntities(params: EntitySearchParams = {}) {
      return this.makeRequest('/enhetsregisteret/api/enheter', params);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It doesn't disclose whether this is a read-only operation, if it has rate limits, authentication requirements, pagination behavior (implied by 'size' and 'page' parameters but not explained), or what the output format looks like. The phrase 'Search for' suggests a query operation, but no further details are given.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core purpose. It could be slightly more structured by explicitly mentioning pagination or result format, but it avoids redundancy and wastes no words.

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?

For a complex search tool with 21 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the search scope, result format, pagination, error conditions, or how to interpret the numerous boolean and array filters. The agent would struggle to use this effectively without trial and error.

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 schema fully documents all 21 parameters. The description adds no parameter-specific information beyond mentioning 'various filters', which is already evident from the schema. This meets the baseline of 3 when schema coverage is high, but doesn't provide additional semantic context like how filters combine or which are most commonly used.

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

Purpose4/5

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

The description clearly states the action ('Search for') and resource ('Norwegian business entities (hovedenheter)'), specifying the entity type and geographic scope. However, it doesn't explicitly differentiate from sibling tools like 'search_sub_entities' or 'search_voluntary_organizations', which search different entity types.

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 like 'get_entity' (for specific entities) or other search tools for sub-entities or voluntary organizations. It mentions 'various filters' but doesn't explain when filtering is appropriate or what distinguishes this search from other retrieval methods.

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