fi_recent_registrations
Discover recently registered Finnish companies to track new business formation trends. Filter results by location, company form, industry, and timeframe.
Instructions
Find recently registered Finnish companies. Great for tracking new business formation trends.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days_back | No | How many days back to look (default 7) | |
| location | No | Filter by town/city | |
| company_form | No | Filter by company form (OY, OYJ, etc.) | |
| business_line | No | Filter by industry | |
| page | No | Page number |
Implementation Reference
- src/servers/finnish-companies.js:276-302 (handler)The handler logic for the 'fi_recent_registrations' tool, which calculates the date range and calls the apiFetch helper.
async ({ days_back, location, company_form, business_line, page }) => { const end = new Date(); const start = new Date(end.getTime() - days_back * 24 * 60 * 60 * 1000); const fmt = d => d.toISOString().slice(0, 10); const params = { registrationDateStart: fmt(start), registrationDateEnd: fmt(end), }; if (location) params.location = location; if (company_form) params.companyForm = company_form; if (business_line) params.mainBusinessLine = business_line; 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 registered in the last ${days_back} days matching your criteria.` }] }; } const header = `${total.toLocaleString()} companies registered ${fmt(start)} to ${fmt(end)} (showing ${companies.length}):\n`; const results = companies.map((c, i) => `${i + 1}. ${formatCompanySummary(c)}`).join("\n\n"); return { content: [{ type: "text", text: header + "\n" + results }] }; } - src/servers/finnish-companies.js:266-275 (registration)Registration of the 'fi_recent_registrations' tool including its schema definition.
server.tool( "fi_recent_registrations", "Find recently registered Finnish companies. Great for tracking new business formation trends.", { days_back: z.number().optional().default(7).describe("How many days back to look (default 7)"), location: z.string().optional().describe("Filter by town/city"), company_form: z.string().optional().describe("Filter by company form (OY, OYJ, etc.)"), business_line: z.string().optional().describe("Filter by industry"), page: z.number().optional().default(1).describe("Page number"), },