Download invoice file

The XML or PDF of one invoice or credit note, as a file.

MCP tool facturama_read → download_invoice_file

read

Returns the XML (the legal CFDI) or the PDF of one document as base64 content with its file name. Fails with a not-found error when the ID does not exist.

Parameters

Parameters: download_invoice_file
NameTypeDescription
invoice_id string required string Invoice ID from list_invoices or create_invoice.
format enum required enum xml or pdf.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "facturama_read",
    "arguments": {
      "operation": "download_invoice_file",
      "arguments": {
        "invoice_id": "Y61TLX-Ls_ZJFqzjanPN1w2",
        "format": "xml"
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "invoice_id": "Y61TLX-Ls_ZJFqzjanPN1w2",
    "format": "xml",
    "file_name": "FAC-101.xml",
    "content_base64": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4="
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.