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.
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": {
"contractId": "<contractId>"
},
"name": "getContractBillingCycles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of cycles to return (default 10). Increase if the contract spans many years. | |
| contractId | Yes | The unique identifier (UUID) of the contract. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |