Skip to main content
Glama

Generate a Romanian e-Factura XML

generate_efactura

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 official validation verdict. Does NOT submit to SPV. Costs 2 credits; not billed on errors.

Input Schema

TableJSON 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.3/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does well: it discloses the computed outputs (line, VAT and grand totals plus ANAF's validation verdict), the critical side-effect boundary (does not submit to SPV), and the billing profile (2 credits, free on errors). Rate limits and idempotency are unstated, but the mutation/cost/return behavior is unusually well covered.

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?

Dense but front-loaded: the core verb+artifact leads, followed by input shape, computed outputs, side-effect boundary, and cost. Every sentence carries distinct information; the single-block paragraph form makes it slightly harder to scan than a bulleted alternative.

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 an 11-parameter nested tool with no output schema and no annotations, the description covers the essentials an agent needs: required inputs (number, seller, buyer, lines), autofill behavior, defaults, return payload, and non-submission. It is nearly complete, though a few auxiliary parameters and any failure modes remain 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 schema coverage at only 45%, the description compensates substantially: it explains that supplying just the CUI triggers ANAF autofill of name, address, county code and VAT status, and it documents the VAT rate default (21%) and the full set of VAT categories including reverse-charge AE. The many untouched parameters (note, dueDate, paymentTerms, bank) keep it from a 5, since a low-coverage schema leaves gaps the prose does not close.

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 artifact ('Builds a valid RO e-Factura (CIUS-RO 1.0.1, UBL 2.1) invoice XML from simple JSON'), pinning down both the spec version and the output format. It explicitly declares what it does NOT do ('Does NOT submit to SPV'), which cleanly separates it from validate_efactura, parse_efactura and efactura_to_pdf.

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 operational context — generation only, no SPV submission, credit cost, no billing on errors — which frames when this tool is the right call. It stops short of explicitly routing to a sibling (e.g. 'use validate_efactura to re-check an existing XML'), so the when-not side is implied rather than named.

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