Skip to main content
Glama

Match a list of records to companies

match_companies
Read-onlyIdempotent

Match a list of up to 500 records (name, optional county, domain or CUI) to Romanian companies: each row gets match {cui, companyName, confidence, matchedOn} and the record, or no_match with up to 3 candidates. A valid CUI wins (confidence 1.0). Each row is one lookup; rows past today's allowance come back not_processed (partial: true, remaining: rows to resend after the reset).

Input Schema

NameRequiredDescriptionDefault
rowsYesUp to 500 records, each {name, county, domain, cui, ref} (any of them; ref is your own id, echoed back), or a bare string (a CUI, a domain or a name).
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).

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.
errorNoSet only when there is no answer (empty_query, invalid_cui, data_unavailable, plan_required ...); such a call is not counted.
totalNoNumber of input rows.
errorsNoRows that are input errors (nothing to match on).
fieldsNoThe company fields kept when fields or compact trimmed the rows.
sourceNoData source: onrc (registry) or mfp (Ministry of Finance filings).
matchedNoRows matched to a company.
messageNoA sentence for the caller.
noMatchNoRows with no match above the threshold.
partialNotrue when today's allowance ran out partway: the first processed rows were answered, the rest have status not_processed (not run, not counted).
resultsNoPer row: row, input, status (matched or no_match), match {cui, companyName, confidence, matchedOn}, company, or candidates.
meteringNoWhat the batch cost: rows, counted, notCounted (input-error rows and rows not processed are not counted), notProcessed (when partial) and the rule.
warningsNoNotes on how the request was read (a clamped limit, a widened CAEN code, an ignored field).
processedNoRows answered, from the first one (input-error rows included).
remainingNoRows not processed (the last ones): send them again after the reset. 0 when the whole batch ran.
thresholdNoConfidence a row needs to be matched (0-1).
dailyLimitNoWhen partial: the daily-limit notice in the refusal vocabulary (error daily_limit_reached, message, limit, used, remaining allowance, resets_at, requested, processed, plan, get_a_key, pricing, docs, upgrade with a key).
attributionNoThe credit line to keep when redistributing the data (CC BY 4.0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / $defs / MatchRow / properties / county / description
      Previous value: -"Optional county hint (diacritic-insensitive): firms there rank higher."New value: +"Optional county hint (diacritic-insensitive): companies there rank higher."
    • changedOutput schema / properties / matched / description
      Previous value: -"Rows matched to a firm."New value: +"Rows matched to a company."
    • changedOutput schema / properties / results / items / properties / company / description
      Previous value: -"A company record: companyName, cui, registrationCode, registrationDate (DD/MM/YYYY), legalForm, euid, address (a sole trader's PFA/II/IF locality only in an answer listing several firms, with addressScope: locality), county, city, website, phone (+ phoneSource: ANAF, declared by the taxpayer), 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)."New value: +"A company record: companyName, cui, registrationCode, registrationDate (DD/MM/YYYY), legalForm, euid, address (a sole trader's PFA/II/IF locality only in an answer listing several companies, with addressScope: locality), county, city, website, phone as declared (+ phoneSource: ANAF, declared by the taxpayer; phoneStatus: valid, corrected with phoneSuggestion, or unverified: check before calling), 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 company'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)."
    • changedOutput schema / properties / results / items / properties / match / description
      Previous value: -"The firm matched: cui, companyName, confidence, matchedOn."New value: +"The company matched: cui, companyName, confidence, matchedOn."
  2. Changed6 schema fields changed
    • addedOutput schema / properties / dailyLimit
      Added value: +{
      +  "description": "When partial: the daily-limit notice in the refusal vocabulary (error daily_limit_reached, message, limit, used, remaining allowance, resets_at, requested, processed, plan, get_a_key, pricing, docs, upgrade with a key).",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / metering / description
      Previous value: -"What the batch cost: rows, counted, notCounted (input-error rows are not counted) and the rule."New value: +"What the batch cost: rows, counted, notCounted (input-error rows and rows not processed are not counted), notProcessed (when partial) and the rule."
    • addedOutput schema / properties / partial
      Added value: +{
      +  "description": "true when today's allowance ran out partway: the first processed rows were answered, the rest have status not_processed (not run, not counted).",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / processed
      Added value: +{
      +  "description": "Rows answered, from the first one (input-error rows included).",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / remaining
      Added value: +{
      +  "description": "Rows not processed (the last ones): send them again after the reset. 0 when the whole batch ran.",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / results / items / properties / status / description
      Previous value: -"matched, no_match, or an error status."New value: +"matched, no_match, error, or not_processed (reason daily_limit_reached: not run, not counted)."
  3. Changed1 schema field changed
    • changedOutput schema / properties / results / items / properties / company / description
      Previous 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)."New value: +"A company record: companyName, cui, registrationCode, registrationDate (DD/MM/YYYY), legalForm, euid, address (a sole trader's PFA/II/IF locality only in an answer listing several firms, with addressScope: locality), county, city, website, phone (+ phoneSource: ANAF, declared by the taxpayer), 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)."
  4. Changed1 schema field changed
    • changedOutput schema / properties / results / items / properties / company / 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, 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)."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)."
  5. Changed1 schema field changed
    • 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, record url)."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)."
  6. Changed2 schema fields changed
    • 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, phone, website, latest revenue and headcount, record url)."
    • changedOutput schema / properties / results / items / properties / company / 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}], directors, 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)."
  7. Changed7 schema fields changed
    • addedInput schema / $defs / MatchRow / properties / county / description
      Added value: +"Optional county hint (diacritic-insensitive): firms there rank higher."
    • addedInput schema / $defs / MatchRow / properties / cui / description
      Added value: +"Optional CUI (tax code); a valid one wins (confidence 1.0)."
    • addedInput schema / $defs / MatchRow / properties / domain / description
      Added value: +"Optional website domain ('dedeman.ro'), matched to the registry's website field."
    • addedInput schema / $defs / MatchRow / properties / name / description
      Added value: +"Company name (diacritic-insensitive; legal-form words ignored)."
    • addedInput schema / $defs / MatchRow / properties / ref / description
      Added value: +"Your own id for the row, echoed back unchanged."
    • addedInput schema / properties / rows / description
      Added value: +"Up to 500 records, each {name, county, domain, cui, ref} (any of them; ref is your own id, echoed back), or a bare string (a CUI, a domain or a name)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "One match per input record, in input order.",
      +  "properties": {
      +    "asOf": {
      +      "description": "What to cite: registry (ONRC snapshot date), financialYear (fiscal year of the figures), anaf (day of the ANAF data), snapshot, published, source.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "attribution": {
      +      "description": "The credit line to keep when redistributing the data (CC BY 4.0).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Set only when there is no answer (empty_query, invalid_cui, data_unavailable, plan_required ...); such a call is not counted.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "errors": {
      +      "description": "Rows that are input errors (nothing to match on).",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "fields": {
      +      "description": "The company fields kept when fields or compact trimmed the rows.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "matched": {
      +      "description": "Rows matched to a firm.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "description": "A sentence for the caller.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "metering": {
      +      "description": "What the batch cost: rows, counted, notCounted (input-error rows are not counted) and the rule.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "noMatch": {
      +      "description": "Rows with no match above the threshold.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "results": {
      +      "description": "Per row: row, input, status (matched or no_match), match {cui, companyName, confidence, matchedOn}, company, or candidates.",
      +      "items": {
      +        "additionalProperties": true,
      +        "description": "One input row's answer.",
      +        "properties": {
      +          "candidates": {
      +            "description": "Best candidates when no_match.",
      +            "type": [
      +              "array",
      +              "null"
      +            ]
      +          },
      +          "company": {
      +            "additionalProperties": true,
      +            "description": "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.",
      +            "type": "object"
      +          },
      +          "input": {
      +            "description": "The row as read: name, county, domain, cui, ref.",
      +            "type": [
      +              "object",
      +              "null"
      +            ]
      +          },
      +          "match": {
      +            "description": "The firm matched: cui, companyName, confidence, matchedOn.",
      +            "type": [
      +              "object",
      +              "null"
      +            ]
      +          },
      +          "ref": {
      +            "description": "Your own id for the row, echoed back.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "row": {
      +            "description": "Position of the row in the input (0-based).",
      +            "type": [
      +              "integer",
      +              "null"
      +            ]
      +          },
      +          "status": {
      +            "description": "matched, no_match, or an error status.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "description": "Data source: onrc (registry) or mfp (Ministry of Finance filings).",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "threshold": {
      +      "description": "Confidence a row needs to be matched (0-1).",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "total": {
      +      "description": "Number of input rows.",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "warnings": {
      +      "description": "Notes on how the request was read (a clamped limit, a widened CAEN code, an ignored field).",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  8. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, but the description adds genuinely new behavior: the per-row allowance, that rows beyond it return not_processed with partial:true and a remaining count to resend after reset, and that a valid CUI short-circuits to confidence 1.0. It does not disclose cost/plan implications of the allowance beyond the reset hint.

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?

Three dense sentences, front-loaded with the verb, resource and row limit, then outcomes, then the throttle behavior. No filler, though the middle sentence packs result-shape detail tightly enough to read as compressed.

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?

An output schema exists, so the description need not spell out return values, yet it usefully summarizes match/no_match and candidate limits. The main residual gap is that the actual size of 'today's allowance' is undefined and the fields/compact refinements are left entirely to the schema.

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 coverage is 100%, so all three parameters including fields and compact are fully documented in the schema. The description restates the row fields and the CUI-wins rule but adds nothing about fields or compact, so it stays at the baseline.

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?

States a specific verb and resource ('Match a list of up to 500 records ... to Romanian companies') and names the accepted input fields and output shape. The batch framing ('Each row is one lookup') implicitly separates it from the single-record siblings such as lookup_companies, though no sibling is named explicitly.

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 is implied rather than stated: the batch nature and the 500-row ceiling suggest bulk matching versus per-record lookup tools, but there is no explicit 'use this instead of lookup_companies when...' statement or prerequisite guidance. An agent must infer the routing decision.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources