no_company_lookup
Retrieve detailed Norwegian company information using a 9-digit organization number. This tool provides access to public business records for Norway through the mcp-nordic server.
Instructions
Look up a Norwegian company by organization number (organisasjonsnummer). Returns detailed info.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_number | Yes | 9-digit organization number |
Implementation Reference
- Tool registration and handler implementation for 'no_company_lookup' which fetches detailed company information by organization number from the API.
server.tool( "no_company_lookup", "Look up a Norwegian company by organization number (organisasjonsnummer). Returns detailed info.", { org_number: z.string().describe("9-digit organization number"), }, async ({ org_number }) => { const clean = org_number.replace(/\s/g, ""); if (!/^\d{9}$/.test(clean)) { return { content: [{ type: "text", text: "Invalid org number. Must be 9 digits." }] }; } try { const data = await apiFetch(`/enheter/${clean}`); return { content: [{ type: "text", text: formatCompanyDetail(data) }] }; } catch (e) { if (e.message.includes("404")) { return { content: [{ type: "text", text: `No company found with org number ${clean}. Try searching sub-units (underenheter) instead.` }] }; } throw e; } } );