list_invoices
Read-only
List invoices and quotes with pagination and filters
get_invoice
Read-only
Get full details of an invoice or quote by ID
create_invoice
Write
Create a new invoice or quote and generate its PDF. Use get_client first to retrieve the client’s address IDs (client.addresses[]._id).
Billing address ID — one of client.addresses[]._id. Use get_client to retrieve the address list first.
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
get_invoice_payments
Read-only
Get all recorded payments for a specific invoice
record_payment
Write
Record a payment (partial or full) on an invoice. Automatically updates amountPaid, balanceDue and invoice status.
Payment method (must match the invoice model enum) — Values: bank_transfer | card | cash | check | other
delete_payment
Write — destructive
Delete a recorded payment from an invoice and recalculate the balance
schedule_invoice_reminder
Write
Schedule an email reminder for an invoice (e.g. before or after due date)
update_invoice_status
Write
Update the status of an invoice or quote
New status. L’envoi (« sent ») et l’annulation (« cancelled ») se font manuellement dans Klark après vérification — non disponibles via l’assistant. — Values: draft | partially_paid | paid | overdue
delete_invoice
Write — destructive
Delete a draft invoice and its PDF
send_e_invoice
Write — external service
Send an invoice electronically via SuperPDP (e-invoicing)
get_e_invoice_status
Read-only
Get the e-invoicing status of an invoice from SuperPDP
download_invoice_pdf
Read-only
Get the PDF download URL for an invoice
list_purchase_orders
Read-only
List purchase orders (BC) received from clients. A purchase order is a document the user RECEIVES from one of their clients (not sent). Use this to count pending POs, find a specific one, or summarize unprocessed orders. Filter by status: received (default), in_progress, invoiced (converted to invoice), cancelled.
Filter by status. Omit to get all. — Values: draft | received | in_progress | invoiced | cancelled
get_purchase_order
Read-only
Get full details of a purchase order by ID (including items, totals, client snapshot, and optional OCR source info).
create_purchase_order
Write
Create a purchase order received from a client (manual data entry, no OCR). For OCR-extracted data from a scanned PO, use create_purchase_order_from_ocr instead. Use get_client first to retrieve client.addresses[]._id, and get products via list_products.
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
create_purchase_order_from_ocr
Write
Create a purchase order from OCR-extracted data. Use this tool when YOU (the LLM) have scanned a PO document via your own vision capabilities (Claude vision, Gemini multimodal, etc.) and extracted the structured data. Pass extractedBy to track which tool was used (e.g. “claude”, “gemini”, “openai”). The ocrSource.fileUrl should point to the original scanned file if available (e.g. Wasabi or any public URL).
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
update_purchase_order
Write
Update an existing purchase order (status, notes, items, etc.). Cannot update if the PO has already been converted to an invoice — in that case modify the invoice instead.
delete_purchase_order
Write — destructive
Permanently delete a purchase order. Refused if the PO has been converted to an invoice (the invoice must be deleted first, or mark the PO as cancelled via update_purchase_order).
convert_purchase_order_to_invoice
Write
Transform a purchase order into an official invoice. Creates a new Invoice with the PO’s items, generates the PDF, and marks the PO as invoiced with a link to the new invoice. Idempotent: if the PO was already converted, returns the existing invoice. Returns the invoice with its PDF URL for download.
list_delivery_notes
Read-only
List delivery notes (bons de livraison) with pagination and filters. Filter by sourcePurchaseOrderId to get all delivery notes of a given purchase order.
get_delivery_note
Read-only
Get full details of a delivery note by ID (items with delivered quantities, addresses, carrier, link to source purchase order).
create_delivery_note
Write
Create a delivery note (bon de livraison) — quantities only, no prices. Pass sourcePurchaseOrderId to attach it to a purchase order: this enables partial delivery tracking (delivered quantity must be <= remaining; over-delivery is blocked). Without it, the delivery note is standalone. Use get_purchase_order to read remaining quantities (orderedQuantity - deliveredQuantity) per line.
update_delivery_note
Write
Update a delivery note metadata (status draft|delivered, notes, delivery date, carrier, tracking number). To cancel, use cancel_delivery_note instead.
cancel_delivery_note
Write
Cancel a delivery note. Restores the delivered quantities back to the remaining-to-deliver of the source purchase order (if any).
get_delivery_note_pdf
Write
Generate (or return) the stored PDF of a delivery note and return its URL. Pass regenerate=true to force regeneration.
convert_delivery_note_to_invoice
Write
Invoice a delivery note (facturation au bon de livraison): generates an invoice with the DELIVERED quantities and the unit prices taken from the source purchase order. Idempotent (a delivery note can only be invoiced once). Not available for standalone delivery notes (no source prices).
send_delivery_note
Write
Send a delivery note by email with the PDF attached (e.g. to a warehouse or subcontractor).