Skip to main content
Glama

ANAF e-Factura

Verify ANAF's seal on an invoice

verify_signature
Read-onlyIdempotent

Check that an invoice is the file ANAF stored, under ANAF's seal (semnatura_*.xml). Give the two files from an archive kept elsewhere (costs nothing): xml and signature, each the XML text of each, read byte for byte, since the seal covers the invoice's exact bytes (text you retype may differ from the file; the sha256 of what arrived is in source, to compare with the file's). Checked locally first: the certificate against Trans Sped's seal CA and the Ministry of Finance, the signature, and the digest of the invoice's raw bytes. Only when that cannot decide is ANAF asked. Answers valid, checkedBy (local or anaf), a reason when not valid, and the certificate. Revocation is not checked locally.

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>",
      "signature": "<signature>"
    },
    "name": "verify_signature"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe invoice XML from the archive, 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.
signatureYesThe semnatura_*.xml from the same archive, 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.1/5.0
Behavior5/5

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

Beyond the annotations (which already declare read-only, idempotent, open-world), the description discloses the actual verification pipeline: certificate checked against Trans Sped's seal CA and the Ministry of Finance, signature and raw-byte digest checked locally, with a remote ANAF call as fallback. It also flags a real limitation — 'Revocation is not checked locally' — and lists what the response contains, which is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the purpose and loosely structured as purpose, inputs, process, outputs, limitation. However, the middle is a long run-on with clumsy constructions ('each the XML text of each') and a parenthetical aside about sha256 that repeats the schema, so it is denser than a two-parameter tool needs.

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?

There is no output schema, so the description carries the return-value burden, and it does name the key fields: valid, checkedBy (local or anaf), a reason when invalid, and the certificate. Combined with the disclosed local-then-remote flow and the revocation caveat, an agent has enough to call it and interpret the result; only the exact response shape is left unspecified.

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 schema already explains that the server hashes received bytes and returns sha256/size. The description adds meaning on top: the inputs must be the XML text byte for byte because the seal covers exact bytes, and retyped text may differ, so the returned sha256 should be compared to the source file. Slightly redundant with the schema, but the byte-exactness rationale is genuine added value.

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 opening sentence states a precise verb and resource: confirm that an invoice file is the one ANAF stored, under ANAF's seal (semnatura_*.xml). That is specific enough to distinguish authenticity/seal verification from parsing or semantic validation work, but the description never names or contrasts a sibling (e.g. validate_invoice), so the differentiation is implicit rather than stated.

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 says clearly when the tool applies: you hold both the invoice XML and the signature XML from an archive kept elsewhere, and it notes this 'costs nothing', implying it is the cheap path. It also explains that ANAF is contacted only when local checking cannot decide. It stops short of explicit when-not guidance or naming an alternative tool for cases where you lack the archive.

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.