Create an invoice
create_invoiceIssue an invoice for a client using billable time between two dates; totals come from logged entries, and the number defaults to INV--NNN.
Instructions
Issue an invoice for a client from billable time between two dates. Totals are computed on the server from the logged entries (one line per project). The number defaults to the next INV--NNN. This creates a permanent record; confirm the client, period and dates with the user first.
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": {
"client": "<client>",
"from": "<from>",
"to": "<to>",
"issue_date": "<issue_date>"
},
"name": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Last day of the billed period | |
| from | Yes | First day of the billed period | |
| notes | No | Notes printed on the invoice (max 1,000 characters) | |
| client | Yes | Client id or exact client name | |
| number | No | Invoice number; defaults to the next INV-<year>-NNN | |
| due_date | No | Payment due date, YYYY-MM-DD, or null for none | |
| issue_date | Yes | The invoice date, YYYY-MM-DD | |
| compact_notes | No | Shorten entry descriptions to about 100 characters | |
| include_detail | No | Print each entry under the lines |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| hours | Yes | ||
| lines | Yes | One line per project | |
| total | Yes | Dollars | |
| client | Yes | ||
| number | Yes | ||
| period | Yes | "YYYY-MM-DD to YYYY-MM-DD" |