Skip to main content
Glama

ANAF e-Factura

Validate an invoice with ANAF

validate_invoice
Read-onlyIdempotent

Check a UBL invoice or credit note against ANAF's own schema and CIUS-RO rules without filing it. Answers valid, and when not, findings: each with the rule it broke (e.g. BR-RO-001), where in the document, and ANAF's text. invoice is what the XML says it is, and file which file was read (name, size, sha256). Needs no grant. CII is not accepted: ANAF validates UBL only. The document goes as the XML text as xml, which the server hashes (answered in file: size, sha256).

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": {
      "xml": "<xml>"
    },
    "name": "validate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe invoice XML (at most 5 MB), 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/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 on top: no grant/authorization required, the precise response shape (a validity answer plus findings carrying rule ID, document location, and ANAF's own text), and the server-side hashing behavior that lets the caller confirm the bytes received. It also discloses the hard format restriction (UBL only, not CII) that annotations cannot express.

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?

Purpose and the no-filing scope are front-loaded, and every sentence carries operational content. The only blemish is redundancy: the file echo (name, size, sha256) and the server-hashing explanation appear twice, in the middle and again in the closing sentence, which slightly muddies what should be a single statement.

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?

For a one-parameter tool with no output schema, the description covers everything an agent needs: what is validated, the accepted format, the auth posture, the return structure including finding fields, and how to corroborate the received document via the returned hash. Nothing essential is left to inference.

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% for the single xml parameter, so the baseline would be 3. The description goes further by clarifying that the XML text itself must be sent (not a path or reference) and that the response's file hash and size are the verification handle for that input, which adds real operational meaning about how to supply and confirm the parameter.

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?

The first sentence names a specific verb (check/validate) and resource (a UBL invoice or credit note), plus the exact rule sets applied (ANAF schema and CIUS-RO) and the key scope limit (without filing it). An agent can readily tell this is a read-only dry-run validator, though it never explicitly contrasts itself with siblings such as parse_invoice or build_invoice, leaving that differentiation inferential.

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?

'Without filing it' and 'CII is not accepted: ANAF validates UBL only' give clear positive and negative usage conditions, and 'Needs no grant' removes an auth prerequisite concern. What is missing is any named alternative for the excluded cases (e.g. which sibling to use for CII or for actual submission), so the agent knows when-not but not where-to instead.

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.