Skip to main content

list_invoices

Lecture seule List invoices and quotes with pagination and filters
number
default:"1"
Page number
number
default:"10"
Items per page (max 50)
string
Filter by status — Valeurs : draft | sent | partially_paid | paid | overdue | cancelled
string
Filter by type — Valeurs : invoice | quote

get_invoice

Lecture seule Get full details of an invoice or quote by ID
string
required
The invoice ID

create_invoice

Écriture Create a new invoice or quote and generate its PDF. Use get_client first to retrieve the client’s address IDs (client.addresses[]._id).
string
required
Client ID
string
required
Billing address ID — one of client.addresses[]._id. Use get_client to retrieve the address list first.
string
default:"invoice"
Document type — Valeurs : invoice | quote
array
required
Line items
array
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
string
Delivery address ID (optional)
string
Due date (ISO format)
string
Public notes on the document
string
Payment terms text

get_invoice_payments

Lecture seule Get all recorded payments for a specific invoice
string
required
The invoice ID

record_payment

Écriture Record a payment (partial or full) on an invoice. Automatically updates amountPaid, balanceDue and invoice status.
string
required
The invoice ID
number
required
Payment amount (in the invoice currency)
string
default:"other"
Payment method (must match the invoice model enum) — Valeurs : bank_transfer | card | cash | check | other
string
Payment date (ISO format, defaults to today)
string
Optional note about this payment

delete_payment

Écriture — destructif Delete a recorded payment from an invoice and recalculate the balance
string
required
The invoice ID
string
required
The payment ID to delete (from invoice.payments[]._id)

schedule_invoice_reminder

Écriture Schedule an email reminder for an invoice (e.g. before or after due date)
string
required
The invoice ID
string
required
Date to send the reminder (ISO format, e.g. “2025-12-01T09:00:00Z”)
string
default:"before_due"
Reminder type — Valeurs : before_due | after_due
string
default:"email"
Notification channel — Valeurs : email | sms

update_invoice_status

Écriture Update the status of an invoice or quote
string
required
The invoice ID
string
required
New status. L’envoi (« sent ») et l’annulation (« cancelled ») se font manuellement dans Klark après vérification — non disponibles via l’assistant. — Valeurs : draft | partially_paid | paid | overdue

delete_invoice

Écriture — destructif Delete a draft invoice and its PDF
string
required
The invoice ID to delete

send_e_invoice

Écriture — service externe Send an invoice electronically via SuperPDP (e-invoicing)
string
required
The invoice ID to send electronically

get_e_invoice_status

Lecture seule Get the e-invoicing status of an invoice from SuperPDP
string
required
The invoice ID

download_invoice_pdf

Lecture seule Get the PDF download URL for an invoice
string
required
The invoice ID

list_purchase_orders

Lecture seule 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.
string
Filter by status. Omit to get all. — Valeurs : draft | received | in_progress | invoiced | cancelled
string
Filter by client
number
default:"25"
 
number
default:"1"
 

get_purchase_order

Lecture seule Get full details of a purchase order by ID (including items, totals, client snapshot, and optional OCR source info).
string
required
Purchase order ID

create_purchase_order

Écriture 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.
string
required
Client ID
string
required
Billing address ID (one of client.addresses[]._id)
string
Delivery address ID (optional)
array
required
Line items
string
Date the PO was issued by the client (ISO)
string
Client’s internal reference (e.g. “PO-2026-042”)
string
 
string
 
array
Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)
array
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)

create_purchase_order_from_ocr

Écriture 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).
string
required
Client ID — use search_clients if not sure
string
required
Billing address ID — from client.addresses
string
 
array
required
 
string
Extracted date the client emitted the PO
string
Extracted reference from the scanned document
string
 
array
Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)
array
Remises/frais au niveau document (offre -X%, frais de préparation, envoi suivi, points fidélité…)
object
required
OCR metadata for traceability

update_purchase_order

Écriture 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.
string
required
 
string
Valeurs : draft | received | in_progress | invoiced | cancelled
string
 
string
 
array
 
array
Custom fields (numéro client, code avantage, remise, coloris, taille, etc.)

delete_purchase_order

Écriture — destructif 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).
string
required
 

convert_purchase_order_to_invoice

Écriture 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.
string
required
 
string
Override billing address (default: same as PO)
string
 
string
Invoice due date (ISO). Default: 30 days from now.
string
 
string
 

list_delivery_notes

Lecture seule List delivery notes (bons de livraison) with pagination and filters. Filter by sourcePurchaseOrderId to get all delivery notes of a given purchase order.
string
Valeurs : draft | delivered | cancelled
string
 
string
Filter by source purchase order
number
default:"25"
 
number
default:"1"
 

get_delivery_note

Lecture seule Get full details of a delivery note by ID (items with delivered quantities, addresses, carrier, link to source purchase order).
string
required
Delivery note ID

create_delivery_note

Écriture 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.
string
required
Client ID
string
required
Billing address ID (one of client.addresses[]._id)
string
Delivery address ID (optional)
array
required
Delivered line items
string
Source purchase order ID (enables partial delivery tracking)
string
Delivery date (ISO)
string
 
string
 
string
 
string
Initial status (default ‘delivered’) — Valeurs : draft | delivered

update_delivery_note

Écriture Update a delivery note metadata (status draft|delivered, notes, delivery date, carrier, tracking number). To cancel, use cancel_delivery_note instead.
string
required
 
string
Valeurs : draft | delivered
string
 
string
 
string
 
string
 

cancel_delivery_note

Écriture Cancel a delivery note. Restores the delivered quantities back to the remaining-to-deliver of the source purchase order (if any).
string
required
 

get_delivery_note_pdf

Écriture Generate (or return) the stored PDF of a delivery note and return its URL. Pass regenerate=true to force regeneration.
string
required
 
boolean
default:"false"
 

convert_delivery_note_to_invoice

Écriture 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).
string
required
 
string
Override billing address (defaults to the delivery note one)
string
 
string
Invoice due date (ISO)
string
 
string
 

send_delivery_note

Écriture Send a delivery note by email with the PDF attached (e.g. to a warehouse or subcontractor).
string
required
 
string
required
Recipient email
string
Optional custom message