Skip to main content
Glama
robobobby
by robobobby

fi_search_companies

Search the Finnish company registry (PRH/YTJ) by name, location, business ID, company form, or business line to find official company information using free government data.

Instructions

Search Finnish company registry (PRH/YTJ) by name, location, business ID, or company form. Free government API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoCompany name to search for
locationNoTown or city (e.g., 'Helsinki', 'Tampere', 'Espoo')
business_idNoFinnish Business ID (Y-tunnus), e.g., '0112038-9'
company_formNoCompany form code: OY (ltd), OYJ (public ltd), KY (limited partnership), AY (general partnership), OK (cooperative), SÄÄ (foundation)
business_lineNoMain line of business - TOL 2008 code (e.g., '62010') or text description
post_codeNoPostal code
pageNoPage number (100 results per page)

Implementation Reference

  • The 'fi_search_companies' tool is defined and implemented here using 'server.tool'. The handler function extracts query parameters, calls an internal 'apiFetch' function, and formats the results.
    server.tool(
      "fi_search_companies",
      "Search Finnish company registry (PRH/YTJ) by name, location, business ID, or company form. Free government API.",
      {
        name: z.string().optional().describe("Company name to search for"),
        location: z.string().optional().describe("Town or city (e.g., 'Helsinki', 'Tampere', 'Espoo')"),
        business_id: z.string().optional().describe("Finnish Business ID (Y-tunnus), e.g., '0112038-9'"),
        company_form: z.string().optional().describe("Company form code: OY (ltd), OYJ (public ltd), KY (limited partnership), AY (general partnership), OK (cooperative), SÄÄ (foundation)"),
        business_line: z.string().optional().describe("Main line of business - TOL 2008 code (e.g., '62010') or text description"),
        post_code: z.string().optional().describe("Postal code"),
        page: z.number().optional().default(1).describe("Page number (100 results per page)"),
      },
      async ({ name, location, business_id, company_form, business_line, post_code, page }) => {
        if (!name && !location && !business_id && !company_form && !business_line && !post_code) {
          return { content: [{ type: "text", text: "Please provide at least one search criterion (name, location, business_id, company_form, business_line, or post_code)." }] };
        }
    
        const params = {};
        if (name) params.name = name;
        if (location) params.location = location;
        if (business_id) params.businessId = business_id;
        if (company_form) params.companyForm = company_form;
        if (business_line) params.mainBusinessLine = business_line;
        if (post_code) params.postCode = post_code;
        if (page && page > 1) params.page = page;
    
        const data = await apiFetch("/companies", params);
        const companies = data.companies || [];
        const total = data.totalResults || 0;
    
        if (companies.length === 0) {
          return { content: [{ type: "text", text: "No companies found matching your criteria." }] };
        }
    
        const header = `Found ${total.toLocaleString()} companies (showing ${companies.length}, page ${page || 1}):\n`;
        const results = companies.map((c, i) => `${i + 1}. ${formatCompanySummary(c)}`).join("\n\n");
    
        return { content: [{ type: "text", text: header + "\n" + results }] };
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the API is 'free', which hints at no cost, but does not disclose other traits like rate limits, authentication needs, response format, or pagination behavior (beyond the 'page' parameter in the schema). It adds some context (e.g., data source) but lacks details on operational constraints or expected outcomes.

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 that front-loads key information (action, resource, search criteria, source) with no wasted words. It is appropriately sized for the tool's complexity, making it easy to parse and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (7 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the purpose and source well but lacks details on behavioral traits (e.g., rate limits, response format) and does not fully compensate for the absence of annotations and output schema, leaving the agent with incomplete operational context.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema by listing search criteria ('by name, location, business ID, or company form'), but it does not provide additional syntax, format details, or usage examples. This meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Search Finnish company registry'), resource ('companies'), and scope ('by name, location, business ID, or company form'), distinguishing it from sibling tools like 'fi_company_lookup' and 'fi_search_by_industry'. It also mentions the data source ('PRH/YTJ') and API nature ('Free government API'), making the purpose highly specific and well-defined.

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

Usage Guidelines3/5

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

The description implies usage context by listing search criteria (e.g., name, location) and mentioning it's for the Finnish registry, but it does not explicitly state when to use this tool versus alternatives like 'fi_company_lookup' or 'no_search_companies'. It provides some guidance through the search parameters but lacks explicit when/when-not instructions or named alternatives.

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

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