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
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Invoice ID from list_invoices or create_invoice. |
| format enum required | enum | xml or pdf. |
tools/call
{
"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
{
"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
}