Generate draft invoice
generate_invoiceGenerate a DRAFT invoice from a customer's approved billable hours over a billing period. The draft is editable and can be deleted before it is issued.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"period_start": "<period_start>",
"period_end": "<period_end>"
},
"name": "generate_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Optional notes to include on the invoice. | |
| due_date | No | Optional explicit due date (ISO 8601). Overrides payment_terms-based calculation. | |
| grouping | No | How to group approved hours into line items: "project" (default) or "task". | |
| period_end | Yes | Billing period end date (ISO 8601, e.g. 2026-05-31). | |
| customer_id | Yes | Id of the customer to invoice. | |
| period_start | Yes | Billing period start date (ISO 8601, e.g. 2026-05-01). | |
| payment_terms | No | Payment terms string, e.g. "Net 30" (default). | |
| idempotency_key | No | Optional caller-supplied key; retrying with the same key returns the original result instead of acting twice. |