Skip to main content
Glama

Find companies by activity

lookup_by_category
Read-onlyIdempotent

Find companies by what they do, not by name: search Romanian firms by topic or CAEN code, then narrow by county, revenue, headcount, and VAT status.

Instructions

Find companies by what they do, not by name: a curated topic ('software', 'retail'), plain words ('dentists', a CAEN class title; see matched) or CAEN codes ('4321,4322'; 6201 also finds Rev.3 6210). Narrow by county; qualify by revenue, headcount, VAT, main activity. active_only (default) drops dead and ANAF-inactive firms.

Input Schema

NameRequiredDescriptionDefault
sortNoOrder of the results: 'newest' registrations first (default), 'revenue' (latest filing's turnover, biggest first) or 'employees' (headcount, biggest first); firms without a filing come last.newest
topicYesWhat the firms do: a curated topic ('software', 'retail'), plain words for a trade ('dentists', 'stomatologie'), a CAEN class title in Romanian or English, or CAEN codes ('6201' or '4321,4322'). Case-, space- and diacritic-insensitive. A number that names another activity in each revision takes a suffix: '4781r3' (Rev.3) or '4781r2' (Rev.2).
countyNoOptional county to narrow to (diacritic-insensitive: 'bucuresti', 'cluj'; a county town such as 'Cluj-Napoca' or a Bucharest sector is read as its county); omit for nationwide. An unknown county is an error (unknown_county) with suggestions, not 0 firms.
fieldsNoOptional: keep only these company fields in each row, comma-separated (companyName,cui,county,risk; dotted paths such as risk.level work). Without it the full record is returned.
compactNoOptional: true keeps a short preset per row (name, CUI, county, city, legal form, risk level and what it did not check, phone, website, latest revenue and headcount, record url).
vat_payerNoOptional: true keeps VAT-registered firms only, false only non-VAT payers (ANAF data). Omit for both.
legal_formNoOptional legal form(s) to keep, comma-separated, case-insensitive: 'SRL', 'SA', 'PFA', 'II', or 'SRL,SA' (companies, no sole traders). Default: any form.
active_onlyNoDefault true: drop firms that are not a lead (struck off, dissolving, in liquidation, insolvent or bankrupt, activity suspended, or ANAF fiscally inactive). false returns every firm.
has_websiteNotrue keeps only firms with a website on file in the registry (default false).
max_resultsNoMaximum number of companies to return (1-100, default 10).
max_revenueNoOptional maximum net turnover in RON on the latest filing.
min_revenueNoOptional minimum net turnover in RON on the latest filing (FY2025, else FY2024). Firms without a filing never match a band.
max_employeesNoOptional maximum average headcount on the latest filing.
min_employeesNoOptional minimum average headcount on the latest filing.
main_activity_onlyNoDefault false: a firm matches when the code is ANY of its authorised activities (ONRC lists a dozen per firm, most never practised). true keeps only firms whose DECLARED main activity is one of the codes (ANAF main CAEN, else the CAEN on the latest filing): fewer, more relevant firms. The Leadgen app's lists use true by default.

Output Schema

NameRequiredDescriptionDefault
asOfNoWhat to cite: registry (ONRC snapshot date), financialYear (fiscal year of the figures), anaf (day of the ANAF data), snapshot, published, source.
sortNoThe order of results: newest, revenue or employees.
errorNoSet only when there is no answer (empty_query, invalid_cui, data_unavailable, plan_required ...); such a call is not counted.
labelNoHuman label of what was matched.
queryNoThe topic as given.
topicNoThe curated topic matched, if any.
totalNoRows returned in this answer (at most max_results), not the size of the match set: a full page (total == max_results) may have more; narrow the filters or raise max_results.
appUrlNoThe same list opened in the Leadgen app (CAEN codes, county, legal form, active and main-activity filters), to share with the user; null when the app cannot open it (more than 10 codes, a legal form it does not offer).
countyNoThe county filter, if any.
fieldsNoThe company fields kept when fields or compact trimmed the rows.
sourceNoData source: onrc (registry) or mfp (Ministry of Finance filings).
filtersNoThe filters applied (legalForm, activeOnly, revenue and headcount bands, vatPayer, mainActivityOnly ...).
matchedNoHow plain words were read: by, niche or class title, codes.
messageNoA sentence for the caller.
resultsNoThe company records, best first.
warningsNoNotes on how the request was read (a clamped limit, a widened CAEN code, an ignored field).
caenCodesNoThe CAEN codes searched, when given or derived as codes.
caenNamesNoThe CAEN codes as asked, named: [{code, title (Romanian), titleEn}].
truncatedNotrue when max_results was cut to the list cap (and the list is full).
candidatesNoWhen the words fit several activities (ambiguous_topic): the ones to choose from.
codesAddedNoCAEN Rev.2/Rev.3 counterparts added to the search.
matchTotalNoHow many firms the whole list holds with every filter (active_only on; null when off): exact, or estimated when matchTotalApproximate is true.
attributionNoThe credit line to keep when redistributing the data (CC BY 4.0).
availableTopicsNoThe curated topic ids, when the topic is unknown or ambiguous.
matchTotalMarginNoThe 99% margin of an estimated matchTotal.
availableTopicNamesNoEach curated topic id with its name, e.g. {"agriculture": "Agriculture & Food"}, next to availableTopics.
inactiveFilteredOutNoFirms removed by active_only (null when off).
matchTotalApproximateNotrue when matchTotal is estimated (matchTotalMargin: its 99% margin).
inactiveFilteredOutApproximateNotrue when that count is estimated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.1.3
    • changedInput schema / properties / compact / description
      Previous value: -"Optional: true keeps a short preset per row (name, CUI, county, city, legal form, risk level, phone, website, latest revenue and headcount)."New value: +"Optional: true keeps a short preset per row (name, CUI, county, city, legal form, risk level and what it did not check, phone, website, latest revenue and headcount, record url)."
    • changedInput schema / properties / county / description
      Previous value: -"Optional county name to narrow to (diacritic-insensitive: 'bucuresti', 'cluj'); omit for nationwide."New value: +"Optional county to narrow to (diacritic-insensitive: 'bucuresti', 'cluj'; a county town such as 'Cluj-Napoca' or a Bucharest sector is read as its county); omit for nationwide. An unknown county is an error (unknown_county) with suggestions, not 0 firms."
    • changedInput schema / properties / main_activity_only / description
      Previous value: -"true keeps firms whose declared main activity (ANAF main CAEN, else the CAEN on the latest filing) is one of the codes, instead of any authorised activity (default false)."New value: +"Default false: a firm matches when the code is ANY of its authorised activities (ONRC lists a dozen per firm, most never practised). true keeps only firms whose DECLARED main activity is one of the codes (ANAF main CAEN, else the CAEN on the latest filing): fewer, more relevant firms. The Leadgen app's lists use true by default."
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "newest",
      +  "description": "Order of the results: 'newest' registrations first (default), 'revenue' (latest filing's turnover, biggest first) or 'employees' (headcount, biggest first); firms without a filing come last.",
      +  "enum": [
      +    "newest",
      +    "revenue",
      +    "employees"
      +  ],
      +  "title": "Sort",
      +  "type": "string"
      +}
    • changedOutput schema / description
      Previous value: -"A lead list: firms in an activity, newest registration first."New value: +"A lead list: firms in an activity, newest registration first (or by turnover / headcount: sort)."
    • addedOutput schema / properties / appUrl
      Added value: +{
      +  "description": "The same list opened in the Leadgen app (CAEN codes, county, legal form, active and main-activity filters), to share with the user; null when the app cannot open it (more than 10 codes, a legal form it does not offer).",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / availableTopicNames
      Added value: +{
      +  "description": "Each curated topic id with its name, e.g. {\"agriculture\": \"Agriculture & Food\"}, next to availableTopics.",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / availableTopics / description
      Previous value: -"The curated topics, when the topic is unknown."New value: +"The curated topic ids, when the topic is unknown or ambiguous."
    • addedOutput schema / properties / caenNames
      Added value: +{
      +  "description": "The CAEN codes as asked, named: [{code, title (Romanian), titleEn}].",
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / matchTotal
      Added value: +{
      +  "description": "How many firms the whole list holds with every filter (active_only on; null when off): exact, or estimated when matchTotalApproximate is true.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / matchTotalApproximate
      Added value: +{
      +  "description": "true when matchTotal is estimated (matchTotalMargin: its 99% margin).",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / matchTotalMargin
      Added value: +{
      +  "description": "The 99% margin of an estimated matchTotal.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / results / items / description
      Previous value: -"A company record: companyName, cui, registrationCode, registrationDate (DD/MM/YYYY), legalForm, euid, address, county, city, website, phone, caenActivities [{code, activity}], directors, status [{code, name}], latestFinancials {year, revenue, netResult, employees; RON}, anaf {mainCaen, vatPayer, eFactura, inactive}, risk {level, label, reasons, isLead}, source, asOf, and score/match on name searches. With fields or compact, only the requested keys."New value: +"A company record: companyName, cui, registrationCode, registrationDate (DD/MM/YYYY), legalForm, euid, address, county, city, website, phone, caenActivities [{code, activity (RO), activityEn}], directors, representatives [{name, role}], status [{code, name}], latestFinancials {year, revenue, netResult, employees; RON}, anaf {mainCaen, vatPayer, eFactura, inactive}, risk {level, label, reasons, isLead}, source, asOf, url (the firm's public record page to share with the user; null for sole traders and other natural persons), and score/match on name searches. With fields or compact, only the requested keys (compact keeps url)."
    • addedOutput schema / properties / sort
      Added value: +{
      +  "description": "The order of results: newest, revenue or employees.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / total / description
      Previous value: -"Number of companies returned."New value: +"Rows returned in this answer (at most max_results), not the size of the match set: a full page (total == max_results) may have more; narrow the filters or raise max_results."
    • changedOutput schema / properties / truncated / description
      Previous value: -"true when more firms match than were returned."New value: +"true when max_results was cut to the list cap (and the list is full)."
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld=false, so the safety profile is covered. The description adds real behavioral context beyond that: the default active_only filter meaningfully changes result sets by dropping struck-off, dissolving, insolvent, suspended and ANAF-inactive firms, and it discloses that codes match ANY authorised activity unless main_activity_only narrows it. Return shape is left to the output schema, which is fine.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core differentiator ('not by name') before the accepted input formats and filters; dense but every clause carries information. Minor waste and ambiguity in fragments like 'see matched' and the parenthetical CAEN examples.

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

Completeness4/5

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

For a 15-parameter tool with a full output schema, the description covers the essential decision points: what 'topic' accepts, the scoping/qualifying filters, and the default filtering behavior. It is slightly thin on how this tool relates to its closest siblings, but nothing needed to call it correctly is missing.

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?

Schema description coverage is 100%, so the schema already documents all 15 parameters, and the baseline is 3. The description mostly restates the filter categories rather than extending them, though the cross-revision note ('6201 also finds Rev.3 6210') and the 'a CAEN class title; see matched' hint add a little semantics the schema states only for the topic param.

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

Purpose4/5

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

A concrete verb+resource ('Find companies by what they do') with an explicit negative qualifier ('not by name') that separates it from name/domain lookups. However, it never names the close siblings (lookup_companies, match_companies) that an agent must choose between, so differentiation is by implication rather than by reference.

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?

Usage context is implied through the accepted topic formats and the filter list ('narrow by county; qualify by revenue, headcount, VAT, main activity'), which tells the agent when the tool fits. But there are no explicit when-not conditions, prerequisites, or named alternatives among the many lookup_* siblings, and the fragment 'a CAEN class title; see matched' is puzzling rather than instructive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.