Skip to main content
Glama
robobobby
by robobobby

fi_company_lookup

Retrieve detailed Finnish company information using a Business ID (Y-tunnus), including registers, addresses, and historical data.

Instructions

Look up a Finnish company by Business ID (Y-tunnus). Returns detailed information including registers, addresses, and history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_idYesFinnish Business ID (Y-tunnus), e.g., '0112038-9' or '2331972-6'

Implementation Reference

  • The implementation of the 'fi_company_lookup' tool, which handles the validation of the Business ID and fetches company details from the PRH API.
    server.tool(
      "fi_company_lookup",
      "Look up a Finnish company by Business ID (Y-tunnus). Returns detailed information including registers, addresses, and history.",
      {
        business_id: z.string().describe("Finnish Business ID (Y-tunnus), e.g., '0112038-9' or '2331972-6'"),
      },
      async ({ business_id }) => {
        const clean = business_id.trim();
        // Finnish business IDs are format: 7 digits, dash, 1 check digit
        if (!/^\d{7}-\d$/.test(clean)) {
          return { content: [{ type: "text", text: "Invalid Business ID format. Expected format: 1234567-8 (7 digits, dash, check digit)." }] };
        }
    
        const data = await apiFetch("/companies", { businessId: clean });
        const companies = data.companies || [];
    
        if (companies.length === 0) {
          return { content: [{ type: "text", text: `No company found with Business ID ${clean}.` }] };
        }
    
        return { content: [{ type: "text", text: formatCompanyDetail(companies[0]) }] };
      }
    );

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