Skip to main content
Glama
robobobby
by robobobby

no_search_companies

Search the Norwegian company registry (Enhetsregisteret) by name, industry, municipality, organization form, or employee count to find business information.

Instructions

Search Norwegian company registry (Enhetsregisteret) by name, industry, municipality, or organization form

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoCompany name to search for
municipalityNoMunicipality name (e.g., 'OSLO', 'BERGEN', 'STAVANGER')
industry_codeNoNACE industry code (e.g., '62.010' for programming)
org_formNoOrganization form code (e.g., 'AS', 'ASA', 'ENK', 'NUF')
min_employeesNoMinimum number of employees
active_onlyNoOnly show active companies (not bankrupt/dissolved)
limitNoNumber of results (max 50)

Implementation Reference

  • The tool "no_search_companies" is defined here, which includes both the schema definition (inputs) and the handler logic that fetches data from the Enhetsregisteret API.
    server.tool(
      "no_search_companies",
      "Search Norwegian company registry (Enhetsregisteret) by name, industry, municipality, or organization form",
      {
        query: z.string().optional().describe("Company name to search for"),
        municipality: z.string().optional().describe("Municipality name (e.g., 'OSLO', 'BERGEN', 'STAVANGER')"),
        industry_code: z.string().optional().describe("NACE industry code (e.g., '62.010' for programming)"),
        org_form: z.string().optional().describe("Organization form code (e.g., 'AS', 'ASA', 'ENK', 'NUF')"),
        min_employees: z.number().optional().describe("Minimum number of employees"),
        active_only: z.boolean().optional().default(true).describe("Only show active companies (not bankrupt/dissolved)"),
        limit: z.number().optional().default(10).describe("Number of results (max 50)"),
      },
      async ({ query, municipality, industry_code, org_form, min_employees, active_only, limit }) => {
        const params = { size: Math.min(limit, 50) };
        if (query) params.navn = query;
        if (municipality) params["kommunenummer"] = municipality; // We'll also support name
        if (industry_code) params["naeringskode1"] = industry_code;
        if (org_form) params["organisasjonsform"] = org_form;
        if (min_employees != null) params["fraAntallAnsatte"] = min_employees;
        if (active_only) {
          params["konkurs"] = false;
          params["underAvvikling"] = false;
        }
    
        // If municipality is a name, try search with it as part of query
        const data = await apiFetch("/enheter", params);
        const units = data._embedded?.enheter || [];
    
        if (units.length === 0) {
          return { content: [{ type: "text", text: "No companies found matching your criteria." }] };
        }
    
        const total = data.page?.totalElements || units.length;
        const header = `Found ${total.toLocaleString()} companies (showing ${units.length}):\n`;
        const results = units.map((u, i) => `${i + 1}. ${formatCompanySummary(u)}`).join("\n\n");
    
        return { content: [{ type: "text", text: header + "\n" + results }] };
      }
    );

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/robobobby/mcp-nordic'

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