Skip to main content
Glama

ANAF e-Factura

Read an invoice as JSON

parse_invoice
Read-onlyIdempotent

Read a UBL invoice or credit note into plain JSON: seller and buyer (names, VAT and legal ids, address, contact), every line (quantity, unit, price, net amount, VAT category and rate), the VAT breakdown, the totals, and the payment terms (due date, terms, IBAN). Every value is the document's own text, amounts included, never a number; a field the document does not fill is absent. Give the XML text as xml, which the server hashes (answered in file: size, sha256). Reads only: nothing goes to ANAF. To have ANAF check the document, use validate_invoice.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "parse_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlNoA UBL invoice or credit note, as the XML text itself (at most 1048576 characters). The server hashes the bytes it receives and answers their sha256 and size (file), so compare them with your source.

Output Schema

NameRequiredDescriptionDefault
fileNoThe file read, when the document came as xml
archiveNoThe archive read, when it came from the outbox
invoiceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations it discloses non-obvious behaviors: every value is the document's own text and never coerced to a number, unfilled fields are omitted rather than nulled, and the server hashes the received bytes and reports file size plus sha256 for source comparison.

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?

One dense paragraph, front-loaded with the purpose, then output shape, then the input contract, then the sibling routing. The hashing/sha256 sentence duplicates the schema slightly but earns its place as a verification cue.

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 an output schema present and a fully documented single parameter, nothing essential is missing: input format, text-vs-number typing, missing-field behavior, and the read-only boundary are all stated.

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 coverage is 100% and the single 'xml' parameter is already documented with max length, hashing, and sha256/size semantics. The description's restatement of hashing and 'Give the XML text as xml' adds little beyond 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?

The description opens with a specific verb and resource: 'Read a UBL invoice or credit note into plain JSON'. It also enumerates the extracted content (parties, lines, VAT breakdown, totals, payment terms), so an agent knows exactly what class of document and output to expect.

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?

It explicitly separates parsing from validation: 'To have ANAF check the document, use validate_invoice', and restates the reader-only stance ('nothing goes to ANAF'). It lacks an explicit statement about non-UBL input or malformed documents, but the routing to the alternative is clear.

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.