Skip to main content
Glama

get_efactura_archive

Get the archive ANAF returned for an invoice's current e-Factura submission (the one behind its download index). format 'xml' (default): the invoice XML ANAF validated and ANAF's signature, as text, with embedded documents (the PDF copy) left out. 'zip': the whole archive, byte for byte, base64-encoded. 'pdf': the PDF ANAF rendered of the invoice, base64-encoded. If ANAF rejected the submission, the archive holds ANAF's error report instead of the invoice (anaf_status 'nok').

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": {
      "invoice_id": "<invoice_id>"
    },
    "name": "get_efactura_archive"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo'xml' (default), 'zip' or 'pdf'
invoice_idYesInvoice ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses base64 encoding for binary formats, that 'xml' omits embedded documents like the PDF copy, and critically that a rejected submission returns ANAF's error report rather than the invoice. It stops short of stating behavior when no submission exists or whether errors are raised.

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 purpose and then a tight, parallel enumeration of formats; nearly every clause adds information. The parenthetical asides are slightly dense but not wasteful.

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?

No output schema exists, so the description must describe return values, and it does so per format including the error-report case for rejected submissions. What remains unaddressed is the state before submission or when ANAF is still processing, which a caller would benefit from knowing.

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%, so the baseline is 3, but the description adds real meaning beyond the enum's bare labels: byte-for-byte retyping with base64 for 'zip', ANAF-rendered PDF for 'pdf', and validated XML plus signature with embedded docs stripped for 'xml'. Only invoice_id meaning is left to the schema.

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 resource — the archive ANAF returned for an invoice's current e-Factura submission — and pins it down with 'the one behind its download index', which separates ANAF's returned artifact from locally-held copies. Each format's payload is spelled out, so an agent knows exactly what it gets.

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?

Format selection ('xml' default, 'zip', 'pdf') gives an implicit choice, and the rejection case hints at when the payload differs, but there is no explicit when-to-use versus siblings like export_efactura_xml or get_document_pdf, and no stated precondition such as an existing submission.

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