Tools reference

The 20 tools exposed by the RedERP MCP server: inputs, outputs, annotations and typical workflows for clients, products, sales documents, payments and KPIs.

All tools run as the connected user through the regular RedERP API: company scoping, role permissions and branch restrictions apply exactly as in the web app. Each tool declares MCP annotations — every tool is openWorldHint: false and destructiveHint: false; write tools are additive only.

Document types used by the *_sales_document* tools: quotation, sales_order, delivery_note, invoice, credit_note, return_note.

Discovery

ToolRead-onlyDescription
searchyesFree-text search across clients, products and all sales document types. Returns typed ids (invoice:<uuid>), titles, links and a snippet.
fetchyesFull record for a typed id from search (documents include lines, payments and the PDF link).

Clients

ToolRead-onlyInputsReturns
list_clientsyessearch, page, limitClients with contact details, credit terms and outstanding balance
get_clientyesclient_idProfile, addresses, financial summary (invoiced, paid, outstanding, credit)
create_clientnoname (required), email, phone, tax number, address, business type, payment terms, credit limit, notesThe new client (names are unique per company)
get_client_statementyesclient_id, date_from, date_toChronological statement lines (debit / credit) and totals with the balance

Products & setup

ToolRead-onlyInputsReturns
list_productsyessearch, stock_status (in_stock / low_stock / out_of_stock), page, limitProducts with price, VAT and total stock
get_productyesproduct_idProduct details, variants and available stock per warehouse
get_sales_setup_optionsyesLocations / warehouses, ledgers, payment methods, VAT rates, branches (ids needed to create documents)

Sales documents

ToolRead-onlyInputsReturns
list_sales_documentsyesdocument_type, status, payment_status (invoices), client_id, search, date_from, date_to, all_years, page, limitDocuments with status, client, totals, pdf_url, print_url, app_url
get_sales_documentyesdocument_type, idHeader, client, lines, linked documents, payments, links
get_sales_document_pdfyesdocument_type, idTime-limited PDF download link, filename, print and app links
create_sales_documentnodocument_type, client_id, date, due_or_expiry_date, location_id, ledger_id, note, items[] (product_id, quantity, unit_price, tax_rate, discount_percentage)The new draft document with lines and links. Missing location / ledger fall back to the company default
add_sales_document_itemsnodocument_type, id, items[]Updated document (existing lines are never modified)
update_sales_document_statusnodocument_type, id, statusDocument after a forward-only status change
convert_sales_documentnosource_type, source_id, target_type, reasonThe new document, linked to its source

Allowed status transitions

DocumentStatuses accepted by update_sales_document_status
quotationsent, accepted
sales_orderconfirmed, in-production, ready, shipped, delivered, completed
delivery_notesent, confirmed, shipped
invoicesent, approved
credit_noteissued, sent, acknowledged
return_notereceived, acknowledged, approved, completed

cancelled, voided, rejected and void are refused — use the RedERP web app for those.

Allowed conversions

FromTo
quotationsales_order, invoice, delivery_note
sales_orderinvoice, delivery_note
delivery_noteinvoice
invoicedelivery_note, credit_note
return_notecredit_note

Payments

ToolRead-onlyInputsReturns
list_paymentsyesclient_id, status, date_from, date_to, search, page, limitPayments with method, date, amount and invoice allocations
get_paymentyespayment_idOne payment with allocations
record_paymentnoclient_id, amount, paid_at, payment_method_id, ledger_id, invoice_id or allocations[], reference, noteThe recorded payment and the updated invoices (remaining balance, PDF link)

Reporting

ToolRead-onlyInputsReturns
get_sales_dashboardyesdate_from, date_to, include_monthly_seriesInvoiced total, unpaid invoices, quotations and conversion rate, orders, pending deliveries, latest documents, optional monthly series

Typical workflows

1

Quote to cash

list_clientslist_productscreate_sales_document (quotation with items) → update_sales_document_status (sent) → convert_sales_document (→ sales_order) → convert_sales_document (→ invoice) → record_payment.

2

Send a document

list_sales_documents or search to find it → get_sales_document_pdf → share pdf_url with the customer (link expires after 7 days).

3

Follow receivables

list_sales_documents (document_type: invoice, payment_status: pending) → get_client_statement for a given client → record_payment when money arrives.

Fiscal year default:

Like the web app, lists default to the company's current fiscal year. Pass all_years: true or a date range to include older documents; search always spans all years.