Skip to main content
Glama

Generate a Romanian e-Factura XML

generate_efactura
Read-onlyIdempotent

Builds a valid RO e-Factura (CIUS-RO 1.0.1, UBL 2.1) invoice XML from simple JSON: seller/buyer (just the CUI is enough: name, address, county code and VAT status are auto-filled from ANAF), lines with quantity, unit price and VAT rate (default 21%; categories S, Z, E, AE reverse charge, K, G, O not subject). Computes line, VAT and grand totals and returns the XML plus ANAF's validation verdict (public validation service). Does NOT submit to SPV. Costs 2 credits; not billed on errors or if ANAF's validator is unreachable (the XML is still returned).

Input Schema

NameRequiredDescriptionDefault
noteNo
buyerYes
linesYes
numberYesInvoice number, e.g. HTR-0001
sellerYes
dueDateNo
autofillNoFill parties from ANAF by CUI (default true)
currencyNoDefault RON
issueDateNoYYYY-MM-DD, default today
paymentTermsNo
vatToRonRateNoRequired if currency != RON (RON per unit, e.g. BNR rate)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: 2-credit cost, no billing on errors or when ANAF's validator is unreachable, XML still returned in that case, and the returned validation verdict. This is exactly the extra behavioral detail annotations cannot convey.

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?

A single dense paragraph that front-loads the core action and standards, then layers defaults, return value, and cost. Every clause carries information, though the run-on structure makes it slightly harder to scan than a bulleted form.

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?

No output schema exists, and the description correctly explains the return (XML plus ANAF validation verdict) and the failure mode. For an 11-param nested tool this is nearly complete, with only minor optional fields left undocumented.

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?

With only 45% schema coverage, the description compensates well: CUI-only autofill from ANAF, default VAT rate 21% with the S/Z/E/AE/K/G/O category list, and the vatToRonRate requirement when currency is not RON. A few params (dueDate, paymentTerms, note) remain unexplained, keeping it below 5.

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 (Builds) and resource (RO e-Factura invoice XML) with the exact standards (CIUS-RO 1.0.1, UBL 2.1), and the 'Does NOT submit to SPV' clause separates it from submission tools and from validate_efactura/parse_efactura siblings.

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 clear context for when to use it (building XML from simple JSON, with ANAF autofill and validation) and an explicit exclusion (does not submit to SPV). It stops short of naming validate_efactura or parse_efactura as alternatives, so routing between siblings is only partly resolved.

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