jaz-clio 9.4.7 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  <p align="center">
4
4
  <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/v/jaz-clio?style=for-the-badge&logo=npm" alt="npm"></a>
5
5
  <a href="https://www.npmjs.com/package/jaz-clio"><img src="https://img.shields.io/npm/dm/jaz-clio?style=for-the-badge&label=downloads" alt="npm downloads"></a>
6
- <img src="https://img.shields.io/badge/tools-396-blue?style=for-the-badge" alt="396 tools">
6
+ <img src="https://img.shields.io/badge/tools-476-blue?style=for-the-badge" alt="476 tools">
7
7
  <a href="https://github.com/teamtinvio/jaz-ai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/teamtinvio/jaz-ai?style=for-the-badge&color=green" alt="License"></a>
8
8
  </p>
9
9
 
10
10
  <p align="center"><b>Fastest ledger for agents.</b><br>Jaz accounting on the command line, and inside any AI agent.</p>
11
11
 
12
- 396 tools · 74 command groups · 7 skills · 13 calculators · 12 job playbooks · 148 field-tested API rules.
12
+ 476 tools · 77 command groups · 7 skills · 13 calculators · 12 job playbooks · 148 field-tested API rules.
13
13
 
14
14
  ```bash
15
15
  npm install -g jaz-clio
@@ -71,7 +71,7 @@ clio modules list # which features are swit
71
71
  clio navigate reports.profit-and-loss # deep link into the Jaz dashboard (offline)
72
72
  ```
73
73
 
74
- 74 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
74
+ 77 command groups, 17 report types, 13 calculators, 12 job playbooks. Every command takes `--json`. Run `clio --help` for the full list.
75
75
 
76
76
  Command groups by area:
77
77
 
@@ -109,7 +109,7 @@ that ends up in a journal.
109
109
 
110
110
  ## MCP server
111
111
 
112
- 396 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
112
+ 476 tools for any AI agent that speaks MCP. Runs locally: no cloud, no ports.
113
113
 
114
114
  > **No install at all?** Claude.ai, ChatGPT, Cowork, and Microsoft Copilot Studio can use Jaz through the hosted connector. Add `https://mcp.jaz.ai/mcp` as a custom connector and sign in with OAuth, no key. The local setup below is for terminal use, scripting, and editors that run MCP servers as local processes.
115
115
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill whenever you call, debug, or review code that touches the Jaz
6
6
  REST API. Covers field names, response shapes, 148 production gotchas, error
@@ -1904,6 +1904,7 @@ POST /api/v1/fixed-assets
1904
1904
  - `category`: `"TANGIBLE"` or `"INTANGIBLE"`
1905
1905
  - `saveAsDraft`: Defaults to `true`. Set `false` to activate; requires `purchaseBusinessTransactionType` (`PURCHASE`, `SALE`, `JOURNAL_MANUAL`, `JOURNAL_CASHFLOW`, `JOURNAL_DIRECT_CASH_IN`, `JOURNAL_DIRECT_CASH_OUT` or `JOURNAL_CASH_TRANSFER`) + `purchaseBusinessTransactionResourceId`
1906
1906
  - Optional string fields (`purchaseBusinessTransactionResourceId`, `capsuleResourceId`) can be safely omitted for drafts
1907
+ - An active save (`saveAsDraft: false`) also needs `reference` (`FIXED_ASSET_REFERENCE_REQUIRED`; `GET /references/next?type=FIXED_ASSET`) and `typeCode` (`FIXED_ASSET_TYPE_REQUIRED`; `typeName` is overwritten from the type master), plus `category`, `depreciationMethod` and `effectiveLife`. It links ONE purchase line (several lines are separate assets); `purchaseBusinessTransactionResourceId` is the line id from `POST /fixed-assets/eligible-lines/search`, not the document id. The eligible-lines filter also reads `description` and `amount`.
1907
1908
 
1908
1909
  ### Response
1909
1910
  ```json
@@ -1939,6 +1940,245 @@ Register an asset purchased before using Jaz, with accumulated depreciation.
1939
1940
  - No `purchaseBusinessTransactionType`/`purchaseBusinessTransactionResourceId` (unlike Create, no linked transaction)
1940
1941
  - All other fields same as Create
1941
1942
 
1943
+ ### Close Out / Reopen Fixed Asset
1944
+ POST /api/v1/close-out/fixed-assets/:resourceId
1945
+ ```json
1946
+ { "closeOutDate": "2026-06-30", "resourceId": "asset-uuid" }
1947
+ ```
1948
+
1949
+ POST /api/v1/reopen/fixed-assets/:resourceId (no body)
1950
+
1951
+ - Close out stops depreciation from that month-end; the asset stays on the register, nothing is reversed and no gain or loss is posted. Needs `ACTIVE` and a method other than `NO_DEPRECIATION`; `closeOutDate` is moved to its month-end and must be before the last depreciation month. Status becomes `CLOSED_OUT`.
1952
+ - Reopen needs `CLOSED_OUT`; the full schedule is re-posted and the status returns to `ACTIVE`. Edit, sell and discard are refused on a `CLOSED_OUT` asset, so reopen first.
1953
+
1954
+ ### Bulk Update Fixed Assets
1955
+ POST /api/v1/fixed-assets/bulk-update
1956
+
1957
+ ```json
1958
+ { "fixedAssets": [{ "resourceId": "asset-uuid", "name": "...", "purchaseDate": "2026-01-15", "...": "every update field" }] }
1959
+ ```
1960
+
1961
+ - 1-500 rows, async: returns `{ jobId }`; poll `search_background_jobs`. The ROUTE runs one Update Fixed Asset per row, a **full replace**: an omitted amount or text field is saved as 0 or blank. The `bulk_update_fixed_assets` tool and `clio fixed-assets bulk-update` do not expose that: they read the stored assets (search, 100 ids per request), merge each row over its asset as `update_fixed_asset` does, and submit the merged rows, so a row is `resourceId` plus only the fields to change (`tags` takes `{ add, remove }`). An unknown or repeated `resourceId` fails the whole call before anything is submitted. Calling the route directly, copy every field the row declares: GET returns epoch-millisecond dates and response-only fields; send dates as `YYYY-MM-DD` and leave out anything the row does not declare.
1962
+ - Dates are `YYYY-MM-DD` (unlike `bulk-upsert`, which takes epoch milliseconds). A record listed twice returns 422.
1963
+
1964
+ ### Fixed Asset Totals
1965
+ GET /api/v1/fixed-assets/totals?endDate=YYYY-MM-DD
1966
+ GET /api/v1/fixed-assets/disposal-totals?endDate=YYYY-MM-DD
1967
+
1968
+ - Register totals (purchase amount, accumulated depreciation, net book value) and disposed-asset totals (book value, sale proceeds, gain/loss) as at `endDate` (default today). Disposed assets are not in the register totals. `assetDisposalGainLossAmount`: positive = loss, negative = gain.
1969
+
1970
+ ### Fixed Asset Schedule
1971
+ GET /api/v1/fixed-assets/:resourceId/schedule?viewDate=YYYY-MM-DD
1972
+
1973
+ - Month-by-month depreciation rows grouped by year (with book value), plus disposal rows once the asset is sold or discarded.
1974
+ - The route takes only `viewDate`: no paging or range, and an asset runs to 1,200 months. The `get_fixed_asset_schedule` tool and `clio fixed-assets schedule` slice client-side with `fromPeriod` / `toPeriod` (row count from 1, inclusive); the tool returns at most 60 whole rows per call with `totalPeriods` and a `note` naming the next range.
1975
+
1976
+ ### Preview Custom Schedule / Calculate Disposal (read-only POSTs, nothing saved)
1977
+ POST /api/v1/fixed-assets/preview-custom-schedule
1978
+ ```json
1979
+ { "depreciableValueAmount": 1200, "depreciationStartDate": "2026-01-01", "effectiveLife": 12, "customSchedule": [{ "fromPeriod": 1, "toPeriod": 12, "amount": 100 }] }
1980
+ ```
1981
+
1982
+ POST /api/v1/fixed-assets/calculate-disposal
1983
+ ```json
1984
+ { "resourceId": "asset-uuid", "depreciationEndDate": "2026-06-30" }
1985
+ ```
1986
+
1987
+ - Preview returns `status` (`FULLY_SCHEDULED`, `SHORT`, `OVER`, `INCOMPLETE`), `scheduledAmount`, `difference` (target less scheduled; positive = short), `timeline`, `periods`, `defaultSchedule` (the straight-line split, a starting point to edit) and `errors`. Save the schedule only when `status` is `FULLY_SCHEDULED` with no `errors`.
1988
+ - Calculate returns `totalAccumulateDepreciationAtDisposal`: depreciation up to and including the month of `depreciationEndDate`, plus any brought in. Net book value = purchase amount less this; gain or loss on a sale = sale amount less net book value (negative is a loss). Run it before Mark as Sold or Discard. 422 if the asset has no depreciation method yet.
1989
+
1990
+ - `periods` runs to one entry per month (up to 1,200). The tool and `clio fixed-assets preview-schedule` window `periods` client-side with `fromPeriod` / `toPeriod` (inclusive; stripped before the request, the route binds strictly): the tool returns at most 60 periods per call with `totalPeriods` and a `note` naming the next range, and `timeline` keeps only the segments touching them.
1991
+
1992
+ ### Search Eligible Lines (what can be registered)
1993
+ POST /api/v1/fixed-assets/eligible-lines/search
1994
+
1995
+ - Bill and journal lines on a Fixed Asset account that no asset has claimed, grouped by document then account. `limit` counts **documents**, not lines. Filter fields: `documentType`, `documentResourceId`, `reference`, `valueDate`, `contactName`, `accountResourceId`, `accountName`, `description`, `amount`.
1996
+ - To create the asset: `sourceLineResourceId` -> `purchaseBusinessTransactionResourceId`, `documentType` -> `purchaseBusinessTransactionType`, `amount` -> `purchaseAmount`.
1997
+ - No natural-language `query`: only fixed-asset record search takes one; this search answers 400 `query_not_supported`.
1998
+
1999
+ ### Search Fixed Asset Types
2000
+ POST /api/v1/fixed-assets-types/search
2001
+
2002
+ - Filter `categoryCode`, `typeName`, `typeCode`. Pick a `typeCode` whose `categoryCode` matches the asset `category`.
2003
+ - No natural-language `query`: 400 `query_not_supported`.
2004
+
2005
+ ---
2006
+
2007
+ ## Deferrals (prepaid expenses and deferred revenue)
2008
+
2009
+ A deferral spreads whole bill, invoice or journal lines over months and, when active, posts every release row at once. Routes act as a user: a `jk-` key (`x-jk-api-key`), a personal access token or an OAuth sign-in works. Management credentials (the 48-character organization `API_KEY` header, the management key, the partner API key) are refused with `USER_NOT_AUTHORITY_PERMISSION` (the two deferrals reports accept them); a locked plan returns 403 `NOT_HAVE_ENOUGH_PERMISSION`. Single writes bind strictly: an unknown key is 400 `unknown_field`. Never PUT back a GET response.
2010
+
2011
+ ### Deferral accounts (set up first)
2012
+ POST /api/v1/deferral-accounts/search (`searchTerms` string[] is required by the spec; `[]` lists all)
2013
+ PUT /api/v1/deferral-accounts
2014
+ ```json
2015
+ { "accounts": [{ "organizationAccountResourceId": "account-uuid", "deferralAccount": true }] }
2016
+ ```
2017
+
2018
+ - Nothing is eligible until an account is marked. Current Asset gives `PREPAID_EXPENSE`, Current Liability gives `DEFERRED_REVENUE`. Marking changes org setup: confirm first. Unmarking an account any deferral (draft included) uses is refused (`DEFERRAL_ACCOUNT_IN_USE`).
2019
+
2020
+ ### Search Eligible Lines
2021
+ POST /api/v1/deferrals/eligible-lines/search
2022
+
2023
+ - Bill (`PURCHASE`), invoice (`SALE`) and journal lines on a deferral account that no deferral holds, grouped by document then account. `limit` counts **documents**. `amount` is net of tax in base currency. A line with `draftDeferralReference` is held by that draft.
2024
+
2025
+ ### Deferral Types
2026
+ POST /api/v1/deferral-types/search
2027
+
2028
+ - Filter `categoryCode`, `typeName`, `typeCode`. The same `typeCode` exists in both categories: always filter by `categoryCode`.
2029
+
2030
+ - `POST /api/v1/deferrals/preview-custom-schedule` returns up to 1,200 `periods`. The tool and `clio deferrals preview-schedule` window `periods` client-side with `fromPeriod` / `toPeriod` (inclusive; stripped before the request, the route binds strictly): the tool returns at most 60 periods per call with `totalPeriods` and a `note` naming the next range, and `timeline` keeps only the segments touching them.
2031
+
2032
+ ### Create Deferral
2033
+ POST /api/v1/deferrals (201, full deferral)
2034
+ ```json
2035
+ { "reference": "DF-000001", "sourceLineResourceIds": ["line-uuid"], "typeCode": "INSURANCE", "name": "Annual insurance", "amortizationStartDate": "2026-04-01", "effectiveLife": 12, "amortizationAccountResourceId": "expense-account-uuid", "saveAsDraft": false }
2036
+ ```
2037
+
2038
+ - `saveAsDraft` defaults **true**; a draft posts nothing. Amount is not an input: it is the sum of the whole lines, net of tax. Lines must be from one document and one account. Periods are anniversary periods from `amortizationStartDate`, not calendar months. `CUSTOM_SCHEDULE` takes `customSchedule: [{ fromPeriod, toPeriod, amount }]`, checked with `POST /deferrals/preview-custom-schedule` (save only when `status` is `FULLY_SCHEDULED` with no `errors`).
2039
+
2040
+ ### Update / Delete Deferral
2041
+ PUT /api/v1/deferrals/:resourceId (`reference` and `resourceId` required; `isDraftToActive: true` activates)
2042
+ DELETE /api/v1/deferrals/:resourceId
2043
+
2044
+ - Partial update: omitted keeps the stored value; text, tags and lists cannot be cleared. Schedule changes on an ACTIVE deferral delete and re-post every row and are refused once a period is locked. `CLOSED_OUT` is refused (`INVALID_DEFERRAL_STATUS`): reopen first. Delete works on any status and is refused under a lock.
2045
+
2046
+ ### Close Out / Reopen Deferral
2047
+ POST /api/v1/close-out/deferrals/:resourceId
2048
+ ```json
2049
+ { "closeOutDate": "2026-08-15", "resourceId": "deferral-uuid" }
2050
+ ```
2051
+
2052
+ POST /api/v1/reopen/deferrals/:resourceId (no body)
2053
+
2054
+ - Close out removes rows after the date (used as given, not moved to a month-end) and posts nothing: `remainingAmount` stays on the deferral account.
2055
+
2056
+ ### Search / Get / Totals / Schedule
2057
+ POST /api/v1/deferrals/search (`viewStatus`, `endDate` as-at, `filter`, `query`)
2058
+ GET /api/v1/deferrals/:resourceId
2059
+ GET /api/v1/deferrals/totals?endDate=&category=
2060
+ GET /api/v1/deferrals/:resourceId/schedule?viewDate=
2061
+
2062
+ - Totals: always pass `category`; prepaid and deferred revenue otherwise add into one meaningless number. Schedule rows are read from posted ledger rows, so a draft has none.
2063
+ - The schedule route takes only `viewDate`. `get_deferral_schedule` and `clio deferrals schedule` slice client-side with `fromPeriod` / `toPeriod` (row count from 1, inclusive); the tool returns at most 60 whole rows per call with `totalPeriods` and a `note` naming the next range.
2064
+
2065
+ ### Bulk Create / Update Deferrals
2066
+ POST /api/v1/deferrals/bulk-upsert
2067
+ POST /api/v1/deferrals/bulk-update
2068
+
2069
+ - 1-500 rows, async: `{ jobId }`, poll `search_background_jobs`. Upsert **creates only**, always ACTIVE, `STRAIGHT_LINE` only, `YYYY-MM-DD` dates. Update rows are partial with `resourceId` and `reference` required per row. A row's `tags` is the whole list and replaces every tag on the deferral, so the tool does not take it: tag changes go through `update_deferral` (add/remove).
2070
+
2071
+ ### Deferral reports and exports
2072
+ POST /api/v1/generate-reports/deferrals-summary
2073
+ POST /api/v1/generate-reports/deferrals-recon-summary (`accountResourceIds` optional)
2074
+ POST /api/v1/data-exports/deferrals-register
2075
+ POST /api/v1/data-exports/deferrals-reconciliation-summary (`accountResourceId` required)
2076
+
2077
+ ---
2078
+
2079
+ ## Leases (IFRS 16 lessee leases, hire purchase)
2080
+
2081
+ Call as a user: a `jk-` key (`x-jk-api-key`), a PAT or an OAuth sign-in works. Management credentials (the 48-character organization API key, the management key, a partner key) are refused `USER_NOT_AUTHORITY_PERMISSION` on every lease route except reports and exports. Leases are locked on plans without a yearly cadence, `GROWTH`, `INTERNAL` or `JOURNAL_ACCOUNTING` (403 `NOT_HAVE_ENOUGH_PERMISSION`). Posting or changing an active lease needs the Admin role. The body binds strictly: an unknown key is 400 `unknown_field`. Dates sent are `YYYY-MM-DD`; dates read back are epoch milliseconds.
2082
+
2083
+ - **The register never posts rent.** Rent bills and payments are coded to the current lease liability account; a rent bill coded to Rent Expense double counts. The reconciliation report shows the gap.
2084
+ - **`discountRate` is % per MONTH**: 6% a year is `0.5`, not `6` and not `0.06`.
2085
+ - **`customSchedule` is the rent**: `amount` is the rent of each month in the range, ranges cover months 1 to `leaseTerm` with no gap or overlap, at least one above 0.
2086
+
2087
+ - `POST /api/v1/leases/preview-rent-schedule` returns up to 600 `periods`. The tool and `clio leases preview-rent` window `periods` client-side with `fromPeriod` / `toPeriod` (inclusive; stripped before the request, the route binds strictly): the tool returns at most 60 periods per call with `totalPeriods` and a `note` naming the next range, and `timeline` keeps only the segments touching them.
2088
+
2089
+ ### Create Lease
2090
+ POST /api/v1/leases (returns 201 with the lease)
2091
+ ```json
2092
+ {
2093
+ "reference": "LS-000001", "name": "Office level 3", "typeCode": "OFFICE",
2094
+ "commencementDate": "2026-01-01", "leaseTerm": 36, "paymentTiming": "ADVANCE", "discountRate": 0.5,
2095
+ "customSchedule": [{ "fromPeriod": 1, "toPeriod": 36, "amount": 5000 }],
2096
+ "rouAssetAccountResourceId": "uuid", "accumulatedDepreciationAccountResourceId": "uuid",
2097
+ "depreciationExpenseAccountResourceId": "uuid", "leaseLiabilityAccountResourceId": "uuid",
2098
+ "interestExpenseAccountResourceId": "uuid", "saveAsDraft": false
2099
+ }
2100
+ ```
2101
+ - `saveAsDraft` defaults **true**: a draft posts nothing but returns `leaseLiabilityAmount`, `rouAssetAmount` and `endDate` when the terms already make a schedule. `reference` is required on drafts too (`GET /references/next?type=LEASE`).
2102
+ - `exemptionType: "EXEMPT"` (short-term or low-value) takes only reference, name, type, start and term, and posts nothing.
2103
+ - Optional: `contactResourceId` (lessor), `prepaidLeasePaymentsAmount` + account, `restorationCostAmount` + provision account, `ownershipTransfers` + `usefulLife` + `purchaseOptionPrice`, `leaseLiabilityNonCurrentAccountResourceId` (needed when principal falls due after 12 months). Interest Expense must be a Finance Cost account. The five required accounts (right-of-use asset, accumulated depreciation, depreciation expense, current lease liability, interest expense) must all be different (`LEASE_ACCOUNTS_NOT_DISTINCT`); the non-current liability account is added only when principal falls due after 12 months.
2104
+ - Hire purchase: `POST /leases/calculate-flat-rate` `{ "flatRate": 2.78, "financedAmount": 68000, "leaseTerm": 84, "paymentTiming": "ARREARS" }` returns the monthly `discountRate` (0.4322 here), `instalment`, `finalInstalment`, `totalInterest`. Create with `typeCode: "HIRE_PURCHASE"`, rent `instalment` for months 1 to term-1 and `finalInstalment` for the last, usually `ownershipTransfers: true` with `usefulLife`.
2105
+
2106
+ ### Update Lease
2107
+ PUT /api/v1/leases/:resourceId
2108
+ - Partial: omitted fields keep their value; `reference` and `resourceId` are required. `isDraftToActive: true` activates a draft.
2109
+ - On an ACTIVE lease, any schedule field (start, term, rent, timing, rate, prepaid, restoration, ownership, any account) rewrites every entry from the start date (past months restated) and is refused once a month is locked. There is no rent review or extension: a genuine mid-life change is terminate plus a new lease, which books a gain or loss.
2110
+ - Refused on `CLOSED_OUT` and `TERMINATED` leases (`INVALID_LEASE_STATUS`).
2111
+
2112
+ ### Search Leases / Lease Types
2113
+ POST /api/v1/leases/search, POST /api/v1/lease-types/search
2114
+ - Body `filter`, `sort`, `limit`, `offset` (a 0-indexed page), plus `viewStatus` (`ACTIVE`, `DRAFT`, `EXEMPT`, `COMPLETED`, `ENDED`, `CLOSED_OUT`, `TERMINATED`) and `endDate` (the as-at date) on leases. `query` answers 400 `query_not_supported`. A terminated lease shows its liability at termination.
2115
+ - Figures (`leaseLiabilityRemaining`, `currentPortion`, `nonCurrentPortion`, `rouNetBookValue`) come from the schedule, not the ledger.
2116
+
2117
+ ### Lease Schedule and Totals
2118
+ GET /api/v1/leases/:resourceId/schedule?viewDate=YYYY-MM-DD, GET /api/v1/leases/totals?endDate=YYYY-MM-DD
2119
+ - The schedule route takes only `viewDate`, and a lease runs to 600 months. `get_lease_schedule` and `clio leases schedule` slice client-side with `fromPeriod` / `toPeriod` (`PERIOD` rows by `periodNumber`, inclusive); the tool returns at most 60 months per call with `totalPeriods` and a `note` naming the next range. The RECOGNITION row comes with the first window and a close-out or termination note with the last.
2120
+ - Totals: `rouNetBookValue`, `leaseLiability`, `currentPortion`, `nonCurrentPortion`; the restoration provision, drafts, exempt, terminated and ended leases are left out.
2121
+
2122
+ ### Close Out / Reopen Lease
2123
+ POST /api/v1/close-out/leases/:resourceId `{ "closeOutDate": "2026-06-30", "resourceId": "uuid" }`; POST /api/v1/reopen/leases/:resourceId (no body)
2124
+ - Close out is **not an exit**: posting stops after the month-end, liability and right-of-use asset stay on the books. To take a lease off the books, terminate it.
2125
+
2126
+ ### Terminate Lease
2127
+ POST /api/v1/leases/calculate-termination `{ "resourceId": "uuid", "terminationDate": "2026-09-30" }` (preview, saves nothing); POST /api/v1/terminate/leases/:resourceId `{ "resourceId": "uuid", "terminationDate": "2026-09-30", "terminationGainLossAccountResourceId": "uuid" }`; POST /api/v1/undo-termination/leases/:resourceId (no body)
2128
+ - Preview first. `terminationGainLossAmount` is positive for a **gain** (the reverse of fixed assets). The gain/loss account is required when it is not 0. The restoration provision is not reversed; a penalty goes on a bill.
2129
+
2130
+ ### Bulk Update Leases
2131
+ POST /api/v1/leases/bulk-update `{ "leases": [{ "resourceId": "uuid", "reference": "LS-000001", "name": "..." }] }`
2132
+ - 1-500 rows, async: returns `{ jobId }`; poll `search_background_jobs`. Each row is the partial update; for renaming or activating drafts, not for rent changes. A row's `tags` is the whole list and replaces every tag on the lease, so the tool does not take it: tag changes go through `update_lease` (add/remove).
2133
+
2134
+ ### Lease Reports and Exports
2135
+ POST /api/v1/generate-reports/leases-summary (the IFRS 16 note; `groupBy` `TYPE`, `STATUS` or `ACCOUNT`), POST /api/v1/generate-reports/leases-recon-summary (register vs GL per lease account; `accountResourceIds` optional); POST /api/v1/data-exports/leases-register, POST /api/v1/data-exports/leases-reconciliation-summary (`accountResourceId` required)
2136
+ - Reports need `REPORTS:ADMIN`. A liability difference in the reconciliation almost always means a rent bill coded elsewhere, posted in another month, or not booked.
2137
+
2138
+ ## Loans (borrowings; term and on demand)
2139
+
2140
+ The register never posts cash: the user records the drawdown receipt (non-current loan account) and every installment IN FULL (current loan account). `annualInterestRate` is percent per **year** (6.5 = 6.5% a year). Hire purchase is a lease, not a loan. Every loan route binds strictly (unknown key = 400). Credentials: the routes act as a user, so a `jk-` key (`x-jk-api-key`), a personal access token or an OAuth sign-in works; a management credential (the 48-character organization `API_KEY` header, the management key, the partner API key) is refused with `USER_NOT_AUTHORITY_PERMISSION`, reads and previews included. Only the loan reports and data exports accept management callers (reports need `REPORTS:ADMIN`; a locked plan answers them 422 `UNAUTHORIZED`, the other routes 403 `NOT_HAVE_ENOUGH_PERMISSION`). `calculate-*` and `preview-schedule` save nothing but need a read-write token: a token limited to read-only scope refuses them, since their paths end neither in `/search` nor `/preview`. Loan search and loan-type search give 400 `query_not_supported` for `query`.
2141
+
2142
+ ### Loans
2143
+ | Method | Path | Notes |
2144
+ |--------|------|-------|
2145
+ | POST | `/loans` | Create; `saveAsDraft` defaults true; `reference` required; returns 201 with the loan |
2146
+ | GET | `/loans/:resourceId` | Get, figures as of today |
2147
+ | PUT | `/loans/:resourceId` | Partial; `reference` + `resourceId` required; `fees` replaces the list; `isDraftToActive`. A term, fee or account change on an ACTIVE loan rewrites the schedule from the start |
2148
+ | DELETE | `/loans/:resourceId` | Any status; removes the loan's own rows |
2149
+ | POST | `/loans/search` | Body `filter`, `sort`, `limit`, `offset`, plus `viewStatus` and `endDate` (as-at) |
2150
+ | GET | `/loans/totals` | `endDate`: outstandingPrincipal, currentPortion, nonCurrentPortion, accruedInterest |
2151
+ | GET | `/loans/:resourceId/schedule` | `viewDate` only: no paging or range, up to 600 rows. `get_loan_schedule` / `preview_loan_schedule` and `clio loans schedule` slice client-side with `fromPeriod` / `toPeriod` (`periodNumber`, inclusive); the tools return at most 60 installments per call with `totalPeriods` and a `note` naming the next range |
2152
+ | GET | `/loans/:resourceId/events` | Latest first, with `canUndo`; `limit`, `offset` |
2153
+ | GET | `/loans/:resourceId/ledger` | On-demand only; `endDate`, `limit`, `offset` |
2154
+ | POST | `/loans/preview-schedule` | Schedule from terms, saves nothing; `preview_loan_schedule` and `clio loans preview-schedule` take the same client-side `fromPeriod` / `toPeriod` as the schedule route (stripped before the request) |
2155
+ | POST | `/loans/bulk-upsert` | Create ACTIVE loans (max 500, creates only, dates YYYY-MM-DD); async `{ jobId }` |
2156
+ | POST | `/loans/bulk-update` | PUT per row (max 500); async `{ jobId }` |
2157
+ | POST | `/close-out/loans/:resourceId` | Body `closeOutDate`; not an exit |
2158
+ | POST | `/reopen/loans/:resourceId` | No body |
2159
+ | GET/POST | `/loan-types`, `/loan-types/search`, `/loan-types/:resourceId` | Master types (BANK, DIRECTOR, ...) |
2160
+
2161
+ ### Loan events
2162
+ Forward only (a date before the latest event is refused); only the latest event can be undone; a retry within 2 minutes returns `LOAN_EVENT_DUPLICATE` (the first call committed). CUSTOM-shape loans refuse drawdown, prepay, rate change, capitalize, payment holiday and restructure (`LOAN_EVENT_ON_LENDER_SCHEDULE`); on-demand loans take only settle, forgive and convert (`LOAN_NOT_A_TERM_LOAN` otherwise), and an on-demand settle needs the ledger at exactly 0 (`LOAN_PAYOFF_NOT_RECORDED`; owed to the company is `LOAN_NOTHING_OWED`). Forgiveness by the lender, a conversion difference and a restructure catch-up need a gain or loss account, sent or already on the loan (`LOAN_GAIN_LOSS_ACCOUNT_REQUIRED`). `fairValue` on conversion is 0 or more. `gainLossAmount` above 0 is a gain.
2163
+
2164
+ | Event | Preview (saves nothing) | Record |
2165
+ |-------|-------------------------|--------|
2166
+ | Drawdown | `POST /loans/calculate-drawdown` | `POST /record-drawdown/loans/:id` |
2167
+ | Prepayment (`keep` required) | `POST /loans/calculate-prepayment` | `POST /prepay/loans/:id` |
2168
+ | Rate change (`keep` required) | `POST /loans/calculate-rate-change` | `POST /change-rate/loans/:id` |
2169
+ | Capitalize interest | `POST /loans/calculate-capitalization` | `POST /capitalize-interest/loans/:id` |
2170
+ | Payment holiday | `POST /loans/calculate-payment-holiday` | `POST /payment-holiday/loans/:id` |
2171
+ | Restructure (10% or more ends the loan, new loan in event details) | `POST /loans/calculate-restructure` | `POST /restructure/loans/:id` |
2172
+ | Settle (payoff) | `POST /loans/calculate-settlement` | `POST /settle/loans/:id` |
2173
+ | Forgive | `POST /loans/calculate-forgiveness` | `POST /forgive/loans/:id` |
2174
+ | Convert to shares | `POST /loans/calculate-conversion` | `POST /convert-to-shares/loans/:id` |
2175
+ | Refinance (returns the NEW loan) | none | `POST /refinance/loans/:id` |
2176
+ | Reclassify as current (covenant breach) | none | `POST /reclassify-as-current/loans/:id` |
2177
+ | Undo | none | `POST /undo-event/loans/:id` (body `eventResourceId`) |
2178
+ | Opening balance after a missed payment | `POST /loans/calculate-opening-balance` | none |
2179
+
2180
+ Reports: `POST /generate-reports/loans-summary`, `loans-roll-forward`, `loans-related-party`, `loans-interest`, `loans-maturity-analysis` (one request) and `loans-recon-summary` (`accountResourceIds`). Exports: `POST /data-exports/loans-register`, `/data-exports/loans-reconciliation-summary` (`accountResourceId` array required).
2181
+
1942
2182
  ---
1943
2183
 
1944
2184
  ## Inventory (read-only balances, no adjustment write path)
@@ -189,7 +189,7 @@ Fixed asset register with straight-line depreciation. Register assets from invoi
189
189
 
190
190
  Fixed assets lock their linked line items: cannot edit account, amounts, or exchange rates on a line item with an active fixed asset. Must delete the asset before modifying the line item. Fixed asset journals can be grouped in capsules for CIP, renovations, and disposals.
191
191
 
192
- **API**: CRUD `GET/POST/PUT/DELETE /fixed-assets`, `POST /fixed-assets/search`, `POST /mark-as-sold/fixed-assets`, `POST /undo-disposal/fixed-assets/:id`, `POST /discard-fixed-assets/:id`, `POST /transfer-fixed-assets`, `POST /fixed-assets-types/search`
192
+ **API**: CRUD `GET/POST/PUT/DELETE /fixed-assets`, `POST /fixed-assets/search`, `POST /mark-as-sold/fixed-assets`, `POST /undo-disposal/fixed-assets/:id`, `POST /discard-fixed-assets/:id`, `POST /transfer-fixed-assets`, `POST /fixed-assets/preview-custom-schedule` and `POST /fixed-assets/calculate-disposal` (both read-only), `POST /fixed-assets-types/search`
193
193
 
194
194
  ---
195
195
 
@@ -3,7 +3,7 @@
3
3
  > **The endpoints clio wraps (the REST surface is larger).** This file catalogues roughly 200
4
4
  > paths, organized by resource, including undocumented endpoints, magic AI features, admin
5
5
  > APIs, and advanced search/filter syntax. The committed OpenAPI spec (`spec/openapi.yaml`)
6
- > carries 518 spec paths and 657 spec operations and is the authoritative list; check it before concluding
6
+ > carries 568 spec paths and 710 spec operations and is the authoritative list; check it before concluding
7
7
  > an endpoint does not exist. For request/response examples of core endpoints, see
8
8
  > endpoints.md.
9
9
  >
@@ -403,6 +403,7 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
403
403
  | POST | `/generate-reports/equity-movement` |
404
404
  | POST | `/generate-reports/fixed-assets-summary` |
405
405
  | POST | `/generate-reports/fixed-assets-recon-summary` |
406
+ | POST | `/generate-reports/loans-summary`, `/loans-roll-forward`, `/loans-related-party`, `/loans-interest`, `/loans-maturity-analysis`, `/loans-recon-summary` |
406
407
  | POST | `/generate-reports/templated-*` | Templated versions of above |
407
408
  | GET | `/ledger/highlights` | GL summary metadata (counts, date range, currencies) |
408
409
  | POST | `/ledger/find-fix/transactions/preview` | Ledger Find & Fix: find records across types, plan a contact, date, capsule or tag change (rule 107a) |
@@ -426,6 +427,7 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
426
427
  | POST | `/data-exports/ap-details-report` |
427
428
  | POST | `/data-exports/bank-reconciliation-*` |
428
429
  | POST | `/data-exports/fixed-assets-*` |
430
+ | POST | `/data-exports/loans-register`, `/data-exports/loans-reconciliation-summary` |
429
431
  | POST | `/data-exports/sales-book` |
430
432
  | POST | `/data-exports/purchase-book` |
431
433
  | POST | `/data-exports/cash-receipt-book` |
@@ -493,6 +495,13 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
493
495
  | POST | `/undo-disposal/fixed-assets/:resourceId` | Undo disposal |
494
496
  | POST | `/discard-fixed-assets/:resourceId` | Discard |
495
497
  | POST | `/transfer-fixed-assets` | Transfer between entities |
498
+ | POST | `/close-out/fixed-assets/:resourceId` | Stop depreciating from a month-end, keep the asset (body `closeOutDate`); status `CLOSED_OUT` |
499
+ | POST | `/reopen/fixed-assets/:resourceId` | Undo a close-out; no body |
500
+ | GET | `/fixed-assets/totals` | Register totals as at `endDate` |
501
+ | GET | `/fixed-assets/disposal-totals` | Disposed-asset totals as at `endDate` |
502
+ | GET | `/fixed-assets/:resourceId/schedule` | Depreciation schedule (`viewDate`) |
503
+ | POST | `/fixed-assets/eligible-lines/search` | Unclaimed bill and journal lines on Fixed Asset accounts; `limit` counts documents |
504
+ | POST | `/fixed-assets/bulk-update` | Bulk update (max 500); **async**, returns `{ jobId }`. The route replaces each row in full; the clio tool and CLI merge each row over the stored asset first |
496
505
  | POST | `/fixed-assets/bulk-upsert` | Bulk create/update fixed assets (max 500); **async**, returns `{ jobId }`. Natural key: `reference`. Each row needs `registrationType` (NEW \| TRANSFER) + `typeCode`. |
497
506
 
498
507
  ### Fixed Asset Types
@@ -500,6 +509,63 @@ Body for all three: `{ items: [{btResourceId: "<uuid>", btType: "SALE|PURCHASE|S
500
509
  |--------|------|-------------|
501
510
  | POST | `/fixed-assets-types/search` | Search fixed asset types |
502
511
 
512
+ ### Deferrals (prepaid expenses and deferred revenue)
513
+ | Method | Path | Description |
514
+ |--------|------|-------------|
515
+ | POST | `/deferrals/search` | Search deferrals (`viewStatus`, `endDate` as-at, `query`) |
516
+ | GET | `/deferrals`, `/deferrals/:resourceId` | List, get |
517
+ | POST | `/deferrals` | Create; `saveAsDraft` defaults true; amount comes from the source lines |
518
+ | PUT | `/deferrals/:resourceId` | Partial update; `isDraftToActive` activates |
519
+ | DELETE | `/deferrals/:resourceId` | Delete any status |
520
+ | POST | `/close-out/deferrals/:resourceId` | Stop releasing after `closeOutDate`; posts nothing |
521
+ | POST | `/reopen/deferrals/:resourceId` | Undo a close-out; no body |
522
+ | GET | `/deferrals/totals` | Totals as at `endDate`; pass `category` |
523
+ | GET | `/deferrals/:resourceId/schedule` | Release rows (`viewDate`) |
524
+ | POST | `/deferrals/eligible-lines/search` | Unclaimed lines on deferral accounts; `limit` counts documents |
525
+ | POST | `/deferrals/preview-custom-schedule` | Check custom release ranges; saves nothing |
526
+ | POST | `/deferrals/bulk-upsert` | Bulk create (max 500); **async**, returns `{ jobId }` |
527
+ | POST | `/deferrals/bulk-update` | Bulk partial update (max 500); **async**, returns `{ jobId }` |
528
+ | POST | `/deferral-types/search`, `/deferral-accounts/search` | Types, deferral accounts |
529
+ | PUT | `/deferral-accounts` | Mark or unmark deferral accounts |
530
+ | POST | `/generate-reports/deferrals-summary`, `/generate-reports/deferrals-recon-summary` | Roll-forward, register vs ledger |
531
+ | POST | `/data-exports/deferrals-register`, `/data-exports/deferrals-reconciliation-summary` | Exports |
532
+
533
+ ### Leases (IFRS 16)
534
+ | Method | Path | Description |
535
+ |--------|------|-------------|
536
+ | POST | `/leases` | Create; `saveAsDraft` defaults true. `discountRate` is % per month |
537
+ | POST | `/leases/search` | Search; body `viewStatus` and `endDate` (as-at). `query` answers 400 |
538
+ | GET | `/leases/:resourceId` | Get one, figures as at today |
539
+ | PUT | `/leases/:resourceId` | Partial update; `reference` required; `isDraftToActive` |
540
+ | DELETE | `/leases/:resourceId` | Delete any status |
541
+ | GET | `/leases/:resourceId/schedule` | Schedule (`viewDate`) |
542
+ | GET | `/leases/totals` | Liability and right-of-use value as at `endDate`; no restoration provision |
543
+ | POST | `/leases/preview-rent-schedule` | Check rent ranges (`COMPLETE`/`INCOMPLETE`) |
544
+ | POST | `/leases/calculate-flat-rate` | Hire purchase flat rate to monthly `discountRate` |
545
+ | POST | `/leases/calculate-termination` | Termination preview |
546
+ | POST | `/leases/bulk-update` | Bulk partial update (max 500); **async**, returns `{ jobId }` |
547
+ | POST | `/close-out/leases/:resourceId` | Stop posting, keep balances (body `closeOutDate`) |
548
+ | POST | `/reopen/leases/:resourceId` | Undo a close-out; no body |
549
+ | POST | `/terminate/leases/:resourceId` | Take off the books at a month-end, posting the gain or loss |
550
+ | POST | `/undo-termination/leases/:resourceId` | Undo a termination; no body |
551
+ | POST | `/lease-types/search` | Lease types; `query` answers 400 |
552
+ ### Loans
553
+ | Method | Path | Description |
554
+ |--------|------|-------------|
555
+ | POST | `/loans` | Create (draft by default; `reference` required) |
556
+ | GET | `/loans`, `/loans/:resourceId` | List, get |
557
+ | POST | `/loans/search` | Search (`viewStatus`, `endDate`; no `query`) |
558
+ | PUT | `/loans/:resourceId` | Partial update; `isDraftToActive` |
559
+ | DELETE | `/loans/:resourceId` | Delete |
560
+ | GET | `/loans/totals` | Totals as at `endDate` |
561
+ | GET | `/loans/:resourceId/schedule`, `/events`, `/ledger` | Repayment schedule, events (latest first), on-demand ledger |
562
+ | POST | `/loans/preview-schedule` | Schedule from terms, saves nothing |
563
+ | POST | `/loans/bulk-upsert`, `/loans/bulk-update` | Bulk create ACTIVE / bulk update (max 500); **async**, `{ jobId }` |
564
+ | POST | `/close-out/loans/:resourceId`, `/reopen/loans/:resourceId` | Stop posting from a month-end, reverse |
565
+ | POST | `/loans/calculate-{drawdown,prepayment,rate-change,capitalization,payment-holiday,restructure,settlement,forgiveness,conversion,opening-balance}` | Event previews, save nothing |
566
+ | POST | `/record-drawdown/loans/:id`, `/prepay/loans/:id`, `/change-rate/loans/:id`, `/capitalize-interest/loans/:id`, `/payment-holiday/loans/:id`, `/restructure/loans/:id`, `/settle/loans/:id`, `/forgive/loans/:id`, `/convert-to-shares/loans/:id`, `/refinance/loans/:id`, `/reclassify-as-current/loans/:id`, `/undo-event/loans/:id` | Record an event |
567
+ | GET/POST | `/loan-types`, `/loan-types/search`, `/loan-types/:resourceId` | Loan types |
568
+
503
569
  ### Purchase Items
504
570
  | Method | Path | Description |
505
571
  |--------|------|-------------|
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-cli
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill when running Clio CLI commands, building shell scripts with
6
6
  Clio, debugging auth issues, understanding --json output, paginating results,
@@ -8,7 +8,7 @@ description: >-
8
8
  precedence, output formats, entity resolution, and common workflow patterns.
9
9
  Also use when the user asks how to use clio, what commands are available, or
10
10
  how to automate accounting tasks from the command line. Covers all
11
- 74 command groups and 396 tools, including employee-expense claims.
11
+ 77 command groups and 476 tools, including employee-expense claims.
12
12
  license: MIT
13
13
  compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
14
14
  ---
@@ -17,7 +17,7 @@ compatibility: Requires Node.js >= 18.0.0. Install via npm install -g jaz-clio.
17
17
 
18
18
  > **Audience note:** for power users and CI/automation. Load this skill only when you're scripting from a terminal, building shell pipelines, or debugging from `clio --json` output. For day-to-day accounting inside Claude Desktop / Cowork, the MCP tools cover the common flows without dropping to the CLI.
19
19
 
20
- You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 74 command groups, 13 calculators, 12 job playbooks (jaz-jobs skill), 396 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
20
+ You are working with **Clio** (`jaz-clio`), the CLI for the Jaz accounting platform. 77 command groups, 13 calculators, 12 job playbooks (jaz-jobs skill), 476 tools. Also fully compatible with Juan Accounting (same API, same endpoints).
21
21
 
22
22
  ## When to Use This Skill
23
23
 
@@ -1,6 +1,6 @@
1
1
  # Clio Command Catalog
2
2
 
3
- Complete reference for all 74 command groups. Organized by domain.
3
+ Complete reference for all 77 command groups. Organized by domain.
4
4
 
5
5
  ---
6
6
 
@@ -348,8 +348,60 @@ Dynamic strings in rules: `{{bankReference}}`, `{{bankPayee}}`, `{{bankDescripti
348
348
  | `sell <id>` | `--id`, `--depreciation-end-date`, `--sale-type`, `--gain-loss-account` |
349
349
  | `transfer <id>` | `--date`, `--type` |
350
350
  | `undo-disposal <id>` | Reverse a discard or sale |
351
+ | `preview-schedule` | `--input <file>`: check a custom depreciation schedule (read-only; save only when FULLY_SCHEDULED with no errors) |
352
+ | `calculate-disposal <id>` | `--depreciation-end-date`: accumulated depreciation at disposal (read-only; run before `sell` or `discard`) |
351
353
  | `bulk-upsert` | `--input <file>`, `--json`: ⚠️ Date field is `valueDate` (NOT `purchaseDate`: that's the GET response field; bulk request uses `valueDate`). `cost`/`purchaseAmount` synonyms accepted. `effectiveLife`/`usefulLifeMonths` synonyms accepted. Required: `reference`, `registrationType` ("NEW" or "TRANSFER"). Async → jobId |
352
354
 
355
+ ### `clio leases`: IFRS 16 leases and hire purchase
356
+ The register never posts rent: rent bills and payments are coded to the current lease liability account. `--discount-rate` is % per MONTH (6% a year is 0.5).
357
+
358
+ | Subcommand | Key flags |
359
+ |------------|-----------|
360
+ | `get <id>` | `--json` |
361
+ | `search` | `--name`, `--ref`, `--status`, `--type-code`, `--view-status`, `--end-date` (as-at), `--from`, `--to`, `--limit`. No natural-language search. |
362
+ | `create` | `--reference`, `--name`, `--type`, `--start`, `--term`, `--rent`, `--payment-timing`, `--discount-rate`, account flags, `--exempt`, `--finalize`, `--input` (stepped rent, prepaid rent, restoration, ownership). A draft unless `--finalize`. |
363
+ | `update <id>` | `--reference`, `--name`, `--notes`, `--activate`, `--input`. A schedule change on an ACTIVE lease rewrites every entry from the start date. |
364
+ | `delete <id>` | Removes every posted entry |
365
+ | `close-out <id>` | `--date`: stops posting, liability and right-of-use asset stay on the books |
366
+ | `reopen <id>` | Undo a close-out |
367
+ | `calculate-termination <id>` | `--date`: preview of the gain or loss (positive = gain) |
368
+ | `terminate <id>` | `--date`, `--gain-loss-account`: takes the lease off the books |
369
+ | `undo-termination <id>` | Undo a termination |
370
+ | `totals` | `--end-date`: liability (current and non-current) and right-of-use net book value |
371
+ | `schedule <id>` | `--view-date` |
372
+ | `types` | Lease types (`typeCode`) |
373
+ | `preview-rent` | `--input <file>`: checks rent ranges, saves nothing |
374
+ | `flat-rate` | `--rate`, `--financed`, `--term`, `--payment-timing`: hire purchase flat rate to monthly discount rate |
375
+ | `bulk-update` | `--input <file>`: partial rows, each needs `resourceId` and `reference`. Async → jobId |
376
+ ### `clio loans`: Loans (borrowings), term and on demand
377
+ The register never posts cash: record the drawdown and every installment yourself. `--rate` and `annualInterestRate` are percent per YEAR. Events go forward only and only the latest can be undone; `--preview` calculates and saves nothing.
378
+
379
+ | Subcommand | Key flags |
380
+ |------------|-----------|
381
+ | `search` | `--name`, `--ref`, `--status`, `--kind`, `--type-code`, `--view-status`, `--end-date`, `--limit`, `--all` (no free-text query) |
382
+ | `types` | `--type-name`, `--type-code` |
383
+ | `get <id>` | `--json` |
384
+ | `schedule <id>` | `--view-date` |
385
+ | `events <id>` | `--limit`, `--offset`, `--all`, `--max-rows` |
386
+ | `ledger <id>` | `--end-date`, `--limit`, `--offset` |
387
+ | `totals` | `--end-date`: what we owe, current and non-current |
388
+ | `preview-schedule` | `--input <file>`: schedule from terms, saves nothing |
389
+ | `create` | `--input <file>`, `--activate` (draft by default) |
390
+ | `update <id>` | `--name`, `--notes`, `--activate`, `--input` |
391
+ | `delete <id>` / `reopen <id>` | |
392
+ | `close-out <id>` | `--date`: stop posting from a month-end (not an exit) |
393
+ | `opening-balance <id>` | `--event-type`, `--date`: suggested balance to pass on an event after a missed payment |
394
+ | `drawdown <id>` | `--date`, `--amount`, `--keep`, `--opening-balance`, `--preview` |
395
+ | `prepay <id>` | `--date`, `--amount`, `--keep` (required), `--preview` |
396
+ | `change-rate <id>` | `--date`, `--rate`, `--keep` (required), `--preview` |
397
+ | `capitalize <id>` / `payment-holiday <id>` / `restructure <id>` | `--date` or `--from-period --to-period --treatment`, `--preview` |
398
+ | `settle <id>` | `--date`, `--penalty`, `--preview` (the payoff) |
399
+ | `forgive <id>` / `convert <id>` | `--date`, `--amount` / `--fair-value --share-capital-account`, `--preview` |
400
+ | `refinance <id>` | `--input` (refinanceDate + newLoan), `--date` |
401
+ | `reclassify-current <id>` | `--date`, `--waiver-date` |
402
+ | `undo <id>` | `--event`: reverse the latest event |
403
+ | `bulk-upsert` / `bulk-update` | `--input <file>`: max 500, async → jobId |
404
+
353
405
  ### `clio reconciliations` (alias: `recon`): Bank reconciliation actions (8 tools)
354
406
  2 async + 6 sync. Sync endpoints are NOT idempotent: re-running creates duplicate journals.
355
407
 
@@ -482,6 +534,28 @@ The query comes from a positional argument, `--input <file>`, or stdin (`cat q.s
482
534
 
483
535
  `schema <table>` scopes the catalog to one table plus the joins touching it, and recomputes its counts. Table and column names come from here, syntax rules from `syntax` (both served by one endpoint).
484
536
 
537
+ ### `clio deferrals`: Prepaid expenses and deferred revenue
538
+ | Subcommand | Key flags |
539
+ |------------|-----------|
540
+ | `get <id>` | `--json` |
541
+ | `search` | `--ref`, `--status`, `--category`, `--view-status`, `--end-date` (as-at), `--limit` |
542
+ | `create` | `--ref`, `--line <id...>`, `--type`, `--name`, `--start`, `--months`, `--amortization-account`, `--activate` (default is a draft that posts nothing), `--input` |
543
+ | `update <id>` | `--ref`, `--name`, `--start`, `--months`, `--activate`, `--input` (partial) |
544
+ | `delete <id>` | Any status; removes every posted row |
545
+ | `close-out <id>` | `--date` (used as given). Posts nothing: the remaining balance stays on the deferral account |
546
+ | `reopen <id>` | Undo a close-out |
547
+ | `totals` | `--category` (required), `--end-date` |
548
+ | `schedule <id>` | `--view-date` |
549
+ | `eligible-lines` | `--ref`, `--category`, `--from`, `--to`: `--limit` counts documents |
550
+ | `types` | `--category` |
551
+ | `accounts` | `--search-terms` |
552
+ | `mark-accounts` | `--account <id...>`, `--unmark`: changes org setup |
553
+ | `preview-schedule` | `--amount`, `--start`, `--months`, `--schedule <json>` |
554
+ | `bulk-upsert` | `--input <file>`: creates only, always ACTIVE, `YYYY-MM-DD` |
555
+ | `bulk-update` | `--input <file>`: partial rows, `resourceId` + `reference` required |
556
+
557
+ Reports: `clio reports generate deferrals-summary` and `deferrals-reconciliation-summary`.
558
+
485
559
  ### `clio inventory` (alias: `inv`): Inventory tracking
486
560
  | Subcommand | Key flags |
487
561
  |------------|-----------|
@@ -527,7 +601,7 @@ Dynamic strings in schedulers: `{{Day}}`, `{{Date}}`, `{{Date+X}}`, `{{DateRange
527
601
  clio reports generate <type> [flags]
528
602
  ```
529
603
 
530
- Types: `trial-balance`, `balance-sheet`, `profit-loss`, `cashflow`, `aged-receivables`, `aged-payables`, `cash-balance`, `general-ledger`, `vat-ledger`, `equity-movement`, `bank-balance-summary`, `bank-reconciliation-summary`, `bank-reconciliation-details`, `fixed-assets-summary`, `fixed-assets-reconciliation-summary`, `aged-receivables-summary`, `aged-payables-summary`, `ledger-highlights`
604
+ Types: `trial-balance`, `balance-sheet`, `profit-loss`, `cashflow`, `aged-receivables`, `aged-payables`, `cash-balance`, `general-ledger`, `vat-ledger`, `equity-movement`, `bank-balance-summary`, `bank-reconciliation-summary`, `bank-reconciliation-details`, `fixed-assets-summary`, `fixed-assets-reconciliation-summary`, `deferrals-summary`, `deferrals-reconciliation-summary`, `aged-receivables-summary`, `aged-payables-summary`, `ledger-highlights`, `loans-summary`, `loans-roll-forward`, `loans-related-party`, `loans-interest`, `loans-maturity-analysis`, `loans-reconciliation-summary`
531
605
 
532
606
  | Flag | Purpose |
533
607
  |------|---------|
@@ -725,7 +799,7 @@ Valid entity types: INVOICE, BILL, CUSTOMER_CREDIT_NOTE, SUPPLIER_CREDIT_NOTE, S
725
799
  Universal async tracker: any operation returning a jobId (contacts bulk-upsert, items bulk-upsert, bank import, magic processing) can be polled here.
726
800
 
727
801
  ### `clio mcp`: MCP stdio server
728
- Starts an MCP server for Claude Code / AI tool integration. Exposes all 396 operations.
802
+ Starts an MCP server for Claude Code / AI tool integration. Exposes all 476 operations.
729
803
 
730
804
  ### `clio init`: Skill installer
731
805
  Installs AI agent skills into your project.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill when migrating accounting data into Jaz, importing from Xero,
6
6
  QuickBooks, Sage, MYOB, or Excel exports. Covers the full conversion pipeline:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-kit
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill when an accountant, bookkeeper, or owner is running real books
6
6
  in Jaz across one or more organizations from the terminal: setting up a
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-pseudo-sql
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill when answering ad-hoc data questions that aren't covered by
6
6
  download_export (canonical reports: anomaly, audit, aging, P&L, BS, GL,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 9.4.7
3
+ version: 9.5.0
4
4
  description: >-
5
5
  Use this skill for recurring accounting workflows: month/quarter/year-end
6
6
  close, bank reconciliation, GST/VAT filing, payment runs, credit control,
@@ -29,7 +29,7 @@ You orchestrate the **real platform tools directly**, following the phase sequen
29
29
 
30
30
  ### Scheduled and calculated entries
31
31
 
32
- When a step needs a calculated schedule, do it in three steps (there is no one-call recipe execution):
32
+ Leases, hire purchases, loans, prepaid expenses and deferred revenue kept on the books live in their registers (`leases`, `loans`, `loan_events`, `deferrals`), which post their own periodic entries: a close step only verifies and finalizes what they posted. If a register refuses (403), tell the user and offer the calculated schedule with manual journals; do not use it unasked. For everything else, and for items kept manually, when a step needs a calculated schedule, do it in three steps (there is no one-call recipe execution):
33
33
 
34
34
  1. **Calculate:** `calculate` with `type` = `loan` | `lease` | `depreciation` | `prepaid-expense` | `deferred-revenue` | `ecl` | `provision` | `fixed-deposit` | `asset-disposal` | `accrued-expense` | `leave-accrual` | `dividend` (CLI: `clio calc <type> ... --json`). Offline; returns the schedule and, with a start date, dated steps with journal lines. Posts nothing.
35
35
  2. **Group:** `list_capsule_types`, then `create_capsule` with the matching `capsuleTypeResourceId` and a `title`.
@@ -50,7 +50,7 @@ Standard assertions:
50
50
 
51
51
  ## Calculated schedules: calculate, capsule, post
52
52
 
53
- There is no one-call "recipe" execution. Any job step that needs a schedule (loan, lease, prepaid, deferred revenue, accrual, ECL, provision, dividend, disposal) is three steps you perform yourself:
53
+ Loans, leases, prepaid expenses and deferred revenue are kept in their registers (`loans`, `leases`, `deferrals`), which post their own entries; use the three steps below for those only when the register is not available to the organization and the user asks for journals. There is no one-call "recipe" execution. Any other job step that needs a schedule (accrual, ECL, provision, dividend, disposal) is three steps you perform yourself:
54
54
 
55
55
  ```
56
56
  calculate(type: 'prepaid-expense', amount: 12000, periods: 12, startDate: '2025-01-01')