Skip to main content
Glama

Check extracted Romanian company data (ANAF, ONRC)

validate_extracted_company_data
Read-onlyIdempotent

Checks company data an AI extracted from an invoice, contract or form against Romanian public sources (ANAF, ONRC) and checksums. Returns a verdict and the registered value per field (CUI, name, registration number, VAT status, company status, address, IBAN, legal representative), optional invoice arithmetic checks, and a deterministic confidence score with pass / review / reject. Use before saving to an ERP or paying. Costs 2 credits, +5 with legalRepresentative, +1 with invoice; not billed on errors or when ANAF is unreachable. Checked against public sources (ANAF, ONRC) and checksums. Not a KYC/AML check. A structurally valid IBAN does not prove the account belongs to the company. Always review before paying.

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": {
      "party": "<party>"
    },
    "name": "validate_extracted_company_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
partyYesCompany data extracted from the document. cui is required; other fields are checked only when sent
invoiceNoOptional invoice block. Adds 1 credit on validate_extracted_company_data. Checks total = net + VAT, Romanian VAT rates, and that the date is not in the future.
asOfDateNoDate the document claims, YYYY-MM-DD. Default today (Europe/Bucharest). Used for ANAF status on that date

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / asOfDate / description
      Previous value: -"YYYY-MM-DD, default today (Europe/Bucharest)"New value: +"Date the document claims, YYYY-MM-DD. Default today (Europe/Bucharest). Used for ANAF status on that date"
    • addedInput schema / properties / invoice / description
      Added value: +"Optional invoice block. Adds 1 credit on validate_extracted_company_data. Checks total = net + VAT, Romanian VAT rates, and that the date is not in the future."
    • addedInput schema / properties / invoice / properties / currency / description
      Added value: +"ISO 4217 currency code, e.g. RON or EUR"
    • changedInput schema / properties / invoice / properties / date / description
      Previous value: -"YYYY-MM-DD"New value: +"Invoice date, YYYY-MM-DD"
    • addedInput schema / properties / invoice / properties / net / description
      Added value: +"Net amount before VAT"
    • addedInput schema / properties / invoice / properties / number / description
      Added value: +"Invoice number as printed, e.g. FCT-1"
    • addedInput schema / properties / invoice / properties / total / description
      Added value: +"Gross total; checked against net + VAT"
    • addedInput schema / properties / invoice / properties / vat / description
      Added value: +"VAT amount"
    • addedInput schema / properties / invoice / properties / vatRates / description
      Added value: +"VAT percents on the invoice, e.g. [21] or [21, 11]"
    • addedInput schema / properties / party / description
      Added value: +"Company data extracted from the document. cui is required; other fields are checked only when sent"
    • addedInput schema / properties / party / properties / address / description
      Added value: +"Address as printed, e.g. Bucuresti, Sector 1, Str. Exemplu nr. 1"
    • addedInput schema / properties / party / properties / iban / description
      Added value: +"IBAN as printed, spaces optional, e.g. RO49AAAA1B31007593840000"
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds substantial context on top: credit cost of 2 base, +5 for legalRepresentative, +1 for invoice, no billing on errors or when ANAF is unreachable. It also discloses that legalRepresentative is never stored and only match/no-match is returned, and it sets expectations about what a checksum-valid IBAN does and does not prove.

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 purpose and return shape, then cost and caveats, which is the right order for an agent deciding whether to call. It loses a small amount to redundancy, since 'Checked against public sources (ANAF, ONRC) and checksums' restates the opening sentence, and 'Always review before paying' echoes the earlier ERP/paying guidance.

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?

With no output schema and nested object parameters, the description carries the return-value burden and does so by enumerating verdict, per-field registered values, optional invoice arithmetic checks, and the pass/review/reject confidence score. Combined with cost, billing exceptions, and scope limits, an agent has enough to decide and call correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description goes further by attaching cost consequences to specific parameters (legalRepresentative +5, invoice +1), stating privacy behavior for legalRepresentative, and summarizing what the invoice block verifies (total = net + VAT, Romanian VAT rates, no future date). It does not explain asOfDate's effect beyond what the schema already says.

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: it checks AI-extracted company data from a document against Romanian public sources (ANAF, ONRC) and checksums. That is clearly distinct from a plain lookup, but no sibling is named (e.g., lookup_company or check_identifier_format), so the differentiation is inferred rather than stated.

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

Usage Guidelines4/5

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

Gives an explicit usage trigger ('Use before saving to an ERP or paying') and an explicit scope exclusion ('Not a KYC/AML check'), plus the caution that a structurally valid IBAN does not prove ownership. It does not point to an alternative tool for the cases it excludes, so it stops short of full when/when-not/alternatives guidance.

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.