factura-luz
v0.1.0Lee y explica facturas de la luz españolas (QR de la CNMC).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read_invoice Leer factura de la luz
Read a Spanish electricity invoice and return everything it says, in structured form. Decodes the CNMC QR code from a PDF or image on this machine, then returns the supply point, the contract and what it means, the billing period, contracted and demanded power, consumption, prices, the amounts billed, an averaged monthly estimate, a Spanish summary you can relay to the user, and warnings about anything uncertain. Start here for any question about an invoice.
| Parameter | Type | Description |
|---|---|---|
file_path | string | Absolute path to the invoice file on this machine (PDF, PNG, JPG, WEBP). The file is read locally and never uploaded anywhere. |
invoice | object | The `invoice` object returned by a previous read_invoice call. Pass this to analyse the same invoice again without re-reading the file, which is much faster. |
qr_url | string | An already-decoded CNMC comparator URL (https://comparador.cnmc.gob.es/comparador/QRE?...). Use this when the QR has been read elsewhere. |
analyze_power ¿Puedo bajar la potencia contratada?
Decide whether the user can lower their contracted power (potencia contratada) and how much they would save per year. Compares the power they pay for against the maximum their meter actually recorded, leaving a safety margin, and works out the payback period against the one-off fee for changing it. This is the single most common way to cut a Spanish electricity bill without changing supplier.
| Parameter | Type | Description |
|---|---|---|
file_path | string | Absolute path to the invoice file on this machine (PDF, PNG, JPG, WEBP). The file is read locally and never uploaded anywhere. |
invoice | object | The `invoice` object returned by a previous read_invoice call. Pass this to analyse the same invoice again without re-reading the file, which is much faster. |
qr_url | string | An already-decoded CNMC comparator URL (https://comparador.cnmc.gob.es/comparador/QRE?...). Use this when the QR has been read elsewhere. |
simulate_power_change Simular un cambio de potencia
Work out the annual saving for a specific pair of contracted powers, rather than the recommended one. Use it to answer "and if I set it to 3 kW?". Warns when the proposal is below the power the meter actually recorded, which would trip the breaker.
| Parameter | Type | Description |
|---|---|---|
p1_kw * | number | Proposed contracted power for P1 (punta), in kW. |
p2_kw * | number | Proposed contracted power for P2 (valle), in kW. |
file_path | string | Absolute path to the invoice file on this machine (PDF, PNG, JPG, WEBP). The file is read locally and never uploaded anywhere. |
invoice | object | The `invoice` object returned by a previous read_invoice call. Pass this to analyse the same invoice again without re-reading the file, which is much faster. |
qr_url | string | An already-decoded CNMC comparator URL (https://comparador.cnmc.gob.es/comparador/QRE?...). Use this when the QR has been read elsewhere. |
explain_concept Explicar un concepto de la factura
Explain one concept of a Spanish electricity bill in plain Spanish, ready to relay to the user. Pass an invoice as well and the explanation comes back with that invoice’s own figures for the fields involved. Call list_concepts, or read the cnmc://glossary resource, to see the available concepts.
| Parameter | Type | Description |
|---|---|---|
concept * | string | The concept to explain, for example termino_potencia or impuesto_electricidad. |
file_path | string | Absolute path to the invoice file on this machine (PDF, PNG, JPG, WEBP). The file is read locally and never uploaded anywhere. |
invoice | object | The `invoice` object returned by a previous read_invoice call. Pass this to analyse the same invoice again without re-reading the file, which is much faster. |
qr_url | string | An already-decoded CNMC comparator URL (https://comparador.cnmc.gob.es/comparador/QRE?...). Use this when the QR has been read elsewhere. |
list_concepts Listar conceptos explicables
List every invoice concept explain_concept can describe, with its id and Spanish title. Takes no arguments.