MCP App Store
by KeenEthics
AsesorFacturas icon

AsesorFacturas MCP Server for ChatGPT

By Plusinfosys

Overview

AsesorFacturas helps users search business invoices, view invoice details and PDFs, and preview or create invoice drafts in their connected account. Users can select accessible legal entities and retrieve the customer and configuration data needed to prepare drafts.

How to connect

  1. ChatGPT: Open the AsesorFacturas listing in the ChatGPT app directory and choose Connect. ChatGPT listing AsesorFacturas exposes 8 tools here.

Tools

create_invoice_draft

ChatGPT
Creates a Draft invoice from an exact previously generated invoice Preview. LEGAL ENTITY RULE: Use legalEntityRef returned by list_legal_entities. If the user identifies the Legal Entity only by display name, legal name or tax identifier, first call list_legal_entities automatically and use the matching legalEntityRef. Do not ask the user for legalEntityRef. CONFIRMATION REQUIRED: Never call this tool immediately after preview_invoice_draft. First present the Preview to the user and stop. Call this tool only after the user explicitly confirms creation, for example 'Create it', 'Create the Draft', 'Yes, create it' or equivalent. This tool accepts only the exact previewRef returned by preview_invoice_draft. Never ask the user for previewRef and never construct, shorten or modify it. The Preview is retrieved server-side, recalculated and compared cryptographically with the originally Previewed invoice. If the invoice data has changed, creation is rejected and a new Preview must be generated and confirmed. Only after the Preview matches does this tool obtain the current serial number and call the existing AsesorFacturas create-invoice API.

get_invoice

ChatGPT
Retrieve invoice details for one invoice in the selected Legal Entity. Requires legalEntityRef and invoiceRef, which are opaque public references. Use list_legal_entities to obtain legalEntityRef when the intended Legal Entity has not already been resolved. Ask the user to choose when the selection is ambiguous. Use search_invoices for the selected Legal Entity to obtain invoiceRef when only an invoice number, official reference or customer is known. Pass the references exactly as returned by those tools. Do not pass names, invoice numbers or internal database IDs in reference fields. Use get_invoice_pdf to retrieve the invoice PDF. This operation does not modify the invoice.

get_invoice_pdf

ChatGPT
Retrieves an invoice PDF from AsesorFacturas. When the user provides a visible invoice number or reference, pass it in invoiceNumber. The server searches for that invoice only inside the selected Legal Entity. IMPORTANT: Draft, Scheduled or other invoices may have the same visible invoice number. If exactly one invoice matches, the PDF is downloaded automatically. If several invoices match, this tool returns the matching invoices with opaque invoiceRef values and enough information for the user to choose the intended invoice. Do not choose one automatically. After the user selects an invoice, call this tool again using its invoiceRef. Never ask for or expose an internal InvoiceID or LegalEntityID. Internally, the server resolves legalEntityRef and invoiceRef and calls the AsesorFacturas PDF API using LegalEntityID and InvoiceID. Downloading the PDF is read-only and never issues, schedules, signs, sends, rectifies, deletes or submits an invoice to AEAT.RESPONSE RULE: When the PDF is successfully retrieved, present the document.downloadUrl returned by this tool as a clickable download link using document.fileName as the link text. Do not merely say that the file was downloaded. The user must receive a link they can click to download it.

preview_invoice_draft

ChatGPT
Calculates an invoice draft preview using AsesorFacturas and stores a temporary preview workflow record. Returns previewRef for use with create_invoice_draft. This operation does not create or issue an invoice. Use legalEntityRef returned by list_legal_entities. Resolve clientRef, invoiceTypeRef, paymentMethodRef, currencyRef, languageRef, vatTypeRef and whTaxTypeRef using get_legal_entity_master_data for that legal entity. Use the returned references unchanged. Never invent references or ask the user to provide internal identifiers. Ask for clarification when the requested business record is ambiguous. Provide invoice line details and dates in YYYY-MM-DD format. Each line may specify at most one special fiscal treatment: disbursement, reverse charge, VAT exemption or non-subject operation. Returns supplier, customer and invoice information together with calculated items, totals and available tax breakdowns. Present preview.items, preview.totals, preview.vatGroups and preview.esGroups using the values returned by AsesorFacturas. Do not invent missing values or independently replace the backend calculations. After presenting the preview, ask whether the user wants to create the draft and wait for explicit confirmation. Preserve legalEntityRef and previewRef for create_invoice_draft. If the user changes invoice details, generate and present a new preview before requesting confirmation.

search_invoices

ChatGPT
Search invoices for one accessible Legal Entity using the filters, sorting and pagination defined in the input schema. Requires a legalEntityRef returned by list_legal_entities. Resolve the user's intended Legal Entity before calling this tool; ask the user to choose when the selection is ambiguous. For a named invoice series, call get_legal_entity_filter for the same Legal Entity and pass the matching returned seriesRef in seriesRefs. For a named customer, retrieve customer data using get_legal_entity_master_data and pass the matching returned FiscalID in clientFiscalIds. Do not use query for customer searches. Use public references for Legal Entities and invoice series, and customer fiscal identifiers for clientFiscalIds. Do not request or expose internal database IDs. Dates must use YYYY-MM-DD. This tool does not modify invoices.

Capabilities

Writes

Example Prompts

Click any prompt to copy it.

Similar Apps

Listed on MCP App Store

Listed on MCP App Store

Add this badge to your site or README. It links to this page.

HTML

<a href="https://mcp-app-store.keenethics-labs.com/app/asesorfacturas"><img src="https://mcp-app-store.keenethics-labs.com/badges/listed-on-mcp-app-store.svg" alt="Listed on MCP App Store" width="220" height="44"></a>

Markdown

[![Listed on MCP App Store](https://mcp-app-store.keenethics-labs.com/badges/listed-on-mcp-app-store.svg)](https://mcp-app-store.keenethics-labs.com/app/asesorfacturas)