Skip to main content
Glama

Look up many companies by CUI

lookup_companies
Read-onlyIdempotent

Look up many Romanian companies by CUI in one call (up to 100): one result per input, in input order, each with found true/false and the company record.

Instructions

Look up many Romanian companies by CUI in one call (up to 100): one result per input, in input order, each with found true/false and the company record. Each row is one lookup; rows past today's allowance come back not_processed (partial: true, remaining: rows to resend after the reset). fields or compact trims each record.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cuis": "<cuis>"
    },
    "name": "lookup_companies"
  }
}

Input Schema

NameRequiredDescriptionDefault
cuisYesUp to 100 CUIs, as a list or one comma-separated string ('RO', spaces and leading zeros accepted, as in lookup_business).
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.
foundNoRows that matched a firm.
totalNoNumber of input rows.
errorsNoRows that are input errors (empty, not a CUI, wrong control digit).
fieldsNoThe company fields kept when fields or compact trimmed the rows.
sourceNoData source: onrc (registry) or mfp (Ministry of Finance filings).
messageNoA sentence for the caller.
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 input: input, cui, found, and company (the record) or error/reason; status not_processed for a row today's allowance did not cover.
meteringNoWhat the batch cost: rows, counted, notCounted (input-error rows and rows not processed are not counted), notProcessed (when partial) and the rule.
notFoundNoWell-formed CUIs not in the snapshot.
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.
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. Changed8 schema fields changedv0.1.4
    • 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 / description
      Previous value: -"Per input: input, cui, found, and company (the record) or error/reason."New value: +"Per input: input, cui, found, and company (the record) or error/reason; status not_processed for a row today's allowance did not cover."
    • 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)."
    • addedOutput schema / properties / results / items / properties / status
      Added value: +{
      +  "description": "not_processed (reason daily_limit_reached) for a row not run; absent otherwise.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 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)."
    • 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 (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)."
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial behavior beyond that: allowance/quota exhaustion produces not_processed rows with partial: true and a remaining count, results preserve input order, and each row carries a found flag. That quota and partial-failure disclosure is exactly what annotations cannot express.

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 action and cap, then layered with result-shape and quota details. It is dense and somewhat run-on in the middle, but every clause carries operational information rather than filler.

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

Completeness5/5

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

For a 3-parameter batch tool with an output schema, the description covers everything an agent needs: batch size limit, result ordering, the found flag, quota-exhaustion semantics and the recovery instruction ('rows to resend after the reset'). Nothing material 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 cuis, fields and compact. The description's note that 'fields or compact trims each record' and the 100-CUI cap add only marginal value over the schema, so the baseline 3 applies.

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?

States a specific verb and resource with batch scope: 'Look up many Romanian companies by CUI in one call (up to 100)'. An agent can tell it apart from single-record siblings like lookup_business or lookup_by_category immediately.

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 batch limit and one-result-per-input ordering imply this is the tool for bulk lookups, and it references lookup_business for CUI formatting. However, it never explicitly says when to prefer this over match_companies or repeated lookup_business calls, so usage selection is left largely to inference.

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