getContractBillingCycles
getContractBillingCyclesRetrieves a contract's billing cycles to identify the exact date range for invoice generation. Required before calling generateInvoice to ensure accurate billing.
Instructions
Returns the contract's pre-computed billing cycles as a list of {name, start_date, end_date, bill_for_date, billing_cycle_start_day}. REQUIRED before calling generateInvoice. Workflow: (1) call this tool, (2) pick the cycle entry whose date range covers the period you want to invoice, (3) pass that entry's start_date → from_date, end_date → to_date, bill_for_date, billing_cycle_start_day to generateInvoice — copy the values verbatim, no math. The backend matches bill_for_date exactly against this list; arbitrary dates produce empty invoice arrays.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contractId | Yes | The unique identifier (UUID) of the contract. | |
| limit | No | Maximum number of cycles to return (default 10). Increase if the contract spans many years. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |