Skip to main content
Glama

Parse a Romanian e-Factura XML to JSON

parse_efactura
Read-onlyIdempotent

Turns a UBL 2.1 e-Factura invoice or credit note XML (e.g. downloaded from ANAF SPV) into clean English JSON: number, dates, type, currency, seller/buyer (name, VAT id, CUI, address, contact), payment means and IBAN, lines (name, quantity, unit, price, net, VAT), VAT breakdown and totals. Costs 1 credit; not billed on errors.

Input Schema

NameRequiredDescriptionDefault
xmlYesUBL 2.1 Invoice or CreditNote XML (RO e-Factura / CIUS-RO)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive, and closed-world, so the safety profile needs no repetition. The description adds real value beyond them by disclosing cost ('Costs 1 credit; not billed on errors'), which an agent cannot infer from structured fields. It stops short of noting size limits (300k chars) or parse-failure behavior, but that is a minor gap.

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 transformation, then a compact enumeration of extracted fields, then cost. The enumerated field list is long but earns its place because there is no output schema; still, it is a single dense run-on sentence rather than clearly segmented.

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, the description compensates by enumerating the returned JSON structure (header, parties, payment, lines, VAT breakdown, totals). Combined with the single well-documented parameter and full annotation coverage, an agent has everything needed to call it 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% and the single 'xml' parameter is documented as UBL 2.1 Invoice or CreditNote (RO e-Factura / CIUS-RO). The description reinforces that accepted document scope (invoice or credit note) and names the authoritative source, adding a little meaning beyond the schema, though not format/syntax guidance.

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 (turns/parses), a specific input format (UBL 2.1 e-Factura invoice or credit note XML, CIUS-RO/ANAF SPV) and a specific output (clean English JSON). This clearly separates it from siblings like validate_efactura, generate_efactura, and efactura_to_pdf, which operate on the same artifact type.

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 example '(e.g. downloaded from ANAF SPV)' implies the intended source of input, but there is no explicit statement of when to choose this over validate_efactura or efactura_to_pdf, nor any preconditions (e.g. validate first if unsure). Usage is implied rather than directed.

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