jaz-clio 4.30.11 → 4.30.13

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
@@ -235,7 +235,7 @@ Every command supports `--json` for structured output — ideal for piping to ot
235
235
 
236
236
  ## MCP Server
237
237
 
238
- Expose all 207 CLI tools to AI coding and coworking agents via the Model Context Protocol (MCP). The server runs locally on your machine — no cloud, no ports. API calls go directly from your machine to the Jaz API.
238
+ Expose all 210 CLI tools to AI coding and coworking agents via the Model Context Protocol (MCP). The server runs locally on your machine — no cloud, no ports. API calls go directly from your machine to the Jaz API.
239
239
 
240
240
  **Claude Code:**
241
241
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 4.30.11
3
+ version: 4.30.13
4
4
  description: Complete reference for the Jaz REST API — the accounting platform backend. Use this skill whenever building, modifying, debugging, or extending any code that calls the API — including API clients, integrations, data seeding, test data, or new endpoint work. Contains every field name, response shape, error, gotcha, and edge case discovered through live production testing.
5
5
  license: MIT
6
6
  compatibility: Requires Jaz API key (x-jk-api-key header). Works with Claude Code, Google Antigravity, OpenAI Codex, GitHub Copilot, Cursor, and any agent that reads markdown.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 4.30.11
3
+ version: 4.30.13
4
4
  description: Accounting data conversion skill — migrates customer data from Xero, QuickBooks, Sage, MYOB, and Excel exports to Jaz. Covers config, quick, and full conversion workflows, Excel parsing, CoA/contact/tax/items mapping, clearing accounts, TTB, and TB verification.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 4.30.11
3
+ version: 4.30.13
4
4
  description: 12 accounting jobs for SMB bookkeepers and accountants — month-end, quarter-end, and year-end close playbooks plus 9 ad-hoc operational jobs (bank recon, document collection, GST/VAT filing, payment runs, credit control, supplier recon, audit prep, fixed asset review, statutory filing). Jobs can have paired tools as nested subcommands (e.g., `clio jobs bank-recon match`, `clio jobs document-collection ingest`, `clio jobs statutory-filing sg-cs`). Paired with an interactive CLI blueprint generator (clio jobs).
5
5
  license: MIT
6
6
  compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill. For individual transaction patterns, load the jaz-recipes skill.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-recipes
3
- version: 4.30.11
3
+ version: 4.30.13
4
4
  description: 16 IFRS-compliant recipes for complex multi-step accounting in Jaz — prepaid amortization, deferred revenue, loan schedules, IFRS 16 leases, hire purchase, fixed deposits, asset disposal, FX revaluation, ECL provisioning, IAS 37 provisions, dividends, intercompany, and capital WIP. Each recipe includes journal entries, capsule structure, and verification steps. Paired with 13 financial calculators that produce execution-ready blueprints with workings.
5
5
  license: MIT
6
6
  compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill alongside this one.
@@ -26,9 +26,14 @@ export const TOOL_NAMESPACES = [
26
26
  groups: ['journals'],
27
27
  },
28
28
  {
29
- name: 'cashflows',
30
- description: 'Cash-in receipts, cash-out disbursements, cash transfers between own accounts, petty cash. WHEN TO USE: external cash received → cash-in. External cash paid → cash-out. Moving funds between own accounts cash transfer.',
31
- groups: ['cash_entries', 'cash_transfers'],
29
+ name: 'cash_entries',
30
+ description: 'Cash-in receipts and cash-out disbursements for external cash movements. WHEN TO USE: money received from customers/external → cash-in. Money paid to suppliers/external → cash-out. For internal account-to-account transfers, use cash_transfers namespace.',
31
+ groups: ['cash_entries'],
32
+ },
33
+ {
34
+ name: 'cash_transfers',
35
+ description: 'Cash transfers between your own bank/cash accounts and cashflow transaction search. WHEN TO USE: moving funds between own accounts (main bank → petty cash, USD → SGD). For external receipts/payments, use cash_entries namespace.',
36
+ groups: ['cash_transfers'],
32
37
  },
33
38
  // ── Banking ─────────────────────────────────────────────────
34
39
  {
@@ -22,7 +22,7 @@ import { planRecipe, extractBlueprint } from '../recipe/plan.js';
22
22
  import { executeRecipe } from '../recipe/engine.js';
23
23
  import { resolveRecipeAccounts, resolveRecipeContact, resolveRecipeBankAccount } from '../intelligence/recipe-resolver.js';
24
24
  import { getBankAccount, searchBankRecords } from '../api/bank.js';
25
- import { searchCashflowTransactions } from '../api/cashflow.js';
25
+ import { deleteCashflowJournal, searchCashflowTransactions } from '../api/cashflow.js';
26
26
  import { listBookmarks, getBookmark, createBookmarks, updateBookmark } from '../api/bookmarks.js';
27
27
  import { listOrgUsers, searchOrgUsers, inviteOrgUser, updateOrgUser, removeOrgUser } from '../api/org-users.js';
28
28
  import { listPayments, searchPayments } from '../api/payments.js';
@@ -653,6 +653,18 @@ export const TOOL_DEFINITIONS = [
653
653
  execute: async (ctx, input) => {
654
654
  const { resourceId: rid, ...overrides } = input;
655
655
  const merged = await fetchAndMerge(ctx.client, 'invoice', rid, overrides);
656
+ // Dedup guard: if reference already exists on another invoice, auto-suffix to avoid 422
657
+ if (merged.reference) {
658
+ const ref = merged.reference;
659
+ const existing = await searchInvoices(ctx.client, {
660
+ filter: { reference: { eq: ref } }, limit: 1, offset: 0,
661
+ sort: { sortBy: ['valueDate'], order: 'DESC' },
662
+ });
663
+ const dupes = (existing.data ?? []).filter((inv) => inv.resourceId !== rid);
664
+ if (dupes.length > 0) {
665
+ merged.reference = `${ref}-${Date.now() % 10000}`;
666
+ }
667
+ }
656
668
  return finalizeInvoice(ctx.client, rid, merged);
657
669
  },
658
670
  },
@@ -1793,8 +1805,8 @@ Steps: 1) search_customer_credit_notes with status UNAPPLIED for the same contac
1793
1805
  WHEN TO USE: customer payments received, refunds from suppliers, insurance payouts, external deposits.
1794
1806
  WHEN NOT TO USE: moving money between your own bank/cash accounts — use create_cash_transfer instead.
1795
1807
  - accountResourceId MUST be a Bank Accounts type account — use list_bank_accounts or search_accounts with accountType "Bank Accounts" to find the correct one. Non-bank accounts are rejected.
1796
- - journalEntries are the offsetting entries (e.g., revenue account). Each needs accountResourceId, type (DEBIT/CREDIT), and amount.
1797
- - The API enforces account separation: cash-in accounts cannot be used for cash-out.`,
1808
+ - journalEntries are the offsetting entries. Each needs accountResourceId, type (DEBIT/CREDIT), and amount. IMPORTANT: offset accounts must be regular P&L or balance sheet accounts (expense, revenue, asset, liability) — NOT bank/cash accounts or controlled accounts (AR/AP). Example: Service Revenue, Interest Income, Other Income.
1809
+ - The API enforces account separation: cash-in bank account cannot appear in journalEntries.`,
1798
1810
  params: {
1799
1811
  reference: { type: 'string', description: 'Reference number' },
1800
1812
  valueDate: { type: 'string', description: 'Date (YYYY-MM-DD)' },
@@ -1822,8 +1834,8 @@ WHEN NOT TO USE: moving money between your own bank/cash accounts — use create
1822
1834
  WHEN TO USE: expenses paid, supplier payments, reimbursements, withdrawals to external parties.
1823
1835
  WHEN NOT TO USE: moving money between your own bank/cash accounts — use create_cash_transfer instead.
1824
1836
  - accountResourceId MUST be a Bank Accounts type account — use list_bank_accounts or search_accounts with accountType "Bank Accounts" to find the correct one. Non-bank accounts are rejected.
1825
- - journalEntries are the offsetting entries (e.g., expense account). Each needs accountResourceId, type (DEBIT/CREDIT), and amount.
1826
- - The API enforces account separation: cash-out accounts cannot be used for cash-in.`,
1837
+ - journalEntries are the offsetting entries. Each needs accountResourceId, type (DEBIT/CREDIT), and amount. IMPORTANT: offset accounts must be regular P&L or balance sheet accounts (expense, revenue, asset, liability) — NOT bank/cash accounts or controlled accounts (AR/AP). Example: Utilities Expense, Office Supplies, Service Revenue.
1838
+ - The API enforces account separation: cash-out bank account cannot appear in journalEntries.`,
1827
1839
  params: {
1828
1840
  reference: { type: 'string', description: 'Reference number' },
1829
1841
  valueDate: { type: 'string', description: 'Date (YYYY-MM-DD)' },
@@ -1872,7 +1884,7 @@ WHEN NOT TO USE: moving money between your own bank/cash accounts — use create
1872
1884
  readOnly: false,
1873
1885
  execute: async (ctx, input) => {
1874
1886
  const { resourceId: rid, ...data } = input;
1875
- return updateCashIn(ctx.client, rid, { ...data, resourceId: rid });
1887
+ return updateCashIn(ctx.client, rid, data);
1876
1888
  },
1877
1889
  },
1878
1890
  {
@@ -1903,7 +1915,7 @@ WHEN NOT TO USE: moving money between your own bank/cash accounts — use create
1903
1915
  readOnly: false,
1904
1916
  execute: async (ctx, input) => {
1905
1917
  const { resourceId: rid, ...data } = input;
1906
- return updateCashOut(ctx.client, rid, { ...data, resourceId: rid });
1918
+ return updateCashOut(ctx.client, rid, data);
1907
1919
  },
1908
1920
  },
1909
1921
  // ── Cash Transfers ─────────────────────────────────────────────
@@ -1949,6 +1961,9 @@ WHEN NOT TO USE: receiving money from external parties (use create_cash_in) or p
1949
1961
  return createCashTransfer(ctx.client, data);
1950
1962
  },
1951
1963
  },
1964
+ deleteTool('delete_cash_in', 'Delete (void) a cash-in entry. Uses parentEntityResourceId from create response.', 'cash_entries', (client, id) => deleteCashflowJournal(client, id)),
1965
+ deleteTool('delete_cash_out', 'Delete (void) a cash-out entry. Uses parentEntityResourceId from create response.', 'cash_entries', (client, id) => deleteCashflowJournal(client, id)),
1966
+ deleteTool('delete_cash_transfer', 'Delete (void) a cash transfer. Uses parentEntityResourceId from create response.', 'cash_transfers', (client, id) => deleteCashflowJournal(client, id)),
1952
1967
  // ── Scheduled Transactions ─────────────────────────────────────
1953
1968
  listTool('list_scheduled_invoices', 'List scheduled (recurring) invoices. Paginated.', 'schedulers', (client, off, lim) => listScheduledInvoices(client, { limit: lim, offset: off })),
1954
1969
  listTool('list_scheduled_bills', 'List scheduled (recurring) bills. Paginated.', 'schedulers', (client, off, lim) => listScheduledBills(client, { limit: lim, offset: off })),
@@ -2237,7 +2252,8 @@ Available export types: trial-balance, balance-sheet, profit-and-loss, general-l
2237
2252
  // ── Recipes ───────────────────────────────────────────────────
2238
2253
  {
2239
2254
  name: 'plan_recipe',
2240
- description: `Plan a transaction recipe — run a financial calculator and show what accounts, contacts, and bank accounts are needed. This is READ-ONLY (no API calls, no transactions created). To actually create the transactions, call execute_recipe.
2255
+ description: `Plan a transaction recipe — run a financial calculator and show what accounts, contacts, and bank accounts are needed. This is READ-ONLY (no API calls, no transactions created).
2256
+ After planning, ALWAYS use execute_recipe to create all transactions in one call — do NOT manually create journals/invoices/bills.
2241
2257
  Supported recipes: ${RECIPE_TYPES.join(', ')}
2242
2258
  Returns: capsule type/name, required accounts, step breakdown (journal/bill/invoice/cash-in/cash-out), and full calculator results.
2243
2259
  Use this BEFORE execute_recipe to verify requirements. Parameters vary by recipe — see recipe skill docs for per-recipe params.
@@ -2295,8 +2311,8 @@ CRITICAL: ALWAYS call this tool for ANY calculation involving: depreciation, amo
2295
2311
  },
2296
2312
  {
2297
2313
  name: 'execute_recipe',
2298
- description: `Execute a transaction recipe end-to-end — run calculator, create capsule, post all entries.
2299
- Replaces ~20 manual tool calls with 1 call. Use plan_recipe first to verify requirements.
2314
+ description: `Execute a transaction recipe end-to-end — run calculator, create capsule, post all entries in one call.
2315
+ PREFERRED over manual transaction creation — replaces ~20 manual tool calls. After plan_recipe, ALWAYS use this tool (not create_journal/create_invoice/create_cash_out).
2300
2316
  Supported recipes: ${RECIPE_TYPES.join(', ')}
2301
2317
  Requires startDate (to generate blueprint with dated steps).
2302
2318
  Auto-resolves accounts from chart of accounts. Provide bankAccountName for recipes with cash-in/cash-out steps, contactName for recipes with invoice/bill steps.`,
@@ -3065,14 +3081,15 @@ CRITICAL:
3065
3081
  {
3066
3082
  name: 'create_bank_rule',
3067
3083
  description: `Create a bank reconciliation rule. Rules auto-match bank records to transactions during reconciliation.
3068
- - actionType: "RECONCILE_WITH_DIRECT_CASH_ENTRY" (most common)
3084
+ - actionType: "RECONCILE_WITH_DIRECT_CASH_ENTRY" (most common — creates cash-in/cash-out on match)
3069
3085
  - appliesToReconciliationAccountResourceId: the bank account this rule applies to
3070
- - configuration: allocation settings (fixed amounts, percentages, accounts, tax)`,
3086
+ - configuration MUST include: allocationType ("PERCENTAGE" or "FIXED"), allocationDetails array with organizationAccountResourceId + percentage (or fixedAmount) + optional taxProfileResourceId
3087
+ Example configuration: { "allocationType": "PERCENTAGE", "allocationDetails": [{ "organizationAccountResourceId": "<revenue-account-id>", "percentage": 100 }] }`,
3071
3088
  params: {
3072
- name: { type: 'string', description: 'Rule name (e.g., "PayNow Sales")' },
3073
- actionType: { type: 'string', description: 'Action type (e.g., "RECONCILE_WITH_DIRECT_CASH_ENTRY")' },
3089
+ name: { type: 'string', description: 'Rule name (e.g., "PayNow Sales", "STRIPE Payouts")' },
3090
+ actionType: { type: 'string', description: 'Action type: "RECONCILE_WITH_DIRECT_CASH_ENTRY" (creates cash entry on match)' },
3074
3091
  appliesToReconciliationAccountResourceId: { type: 'string', description: 'Bank account resourceId this rule applies to' },
3075
- configuration: { type: 'object', description: 'Rule configuration (allocation type, accounts, percentages, tax settings)' },
3092
+ configuration: { type: 'object', description: 'Required structure: { allocationType: "PERCENTAGE"|"FIXED", allocationDetails: [{ organizationAccountResourceId: "<account-id>", percentage: 100, taxProfileResourceId?: "<tax-id>" }] }' },
3076
3093
  },
3077
3094
  required: ['name', 'actionType', 'appliesToReconciliationAccountResourceId', 'configuration'],
3078
3095
  group: 'bank_rules',
@@ -3320,7 +3337,7 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
3320
3337
  description: 'Line items (name, unitPrice, quantity only — account/tax set at top level)',
3321
3338
  },
3322
3339
  },
3323
- required: ['interval', 'startDate', 'contactResourceId', 'lineItems', 'accountResourceId'],
3340
+ required: ['interval', 'startDate', 'contactResourceId', 'lineItems', 'accountResourceId', 'valueDate', 'dueDate'],
3324
3341
  group: 'subscriptions',
3325
3342
  readOnly: false,
3326
3343
  execute: async (ctx, input) => {
@@ -3347,10 +3364,10 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
3347
3364
  },
3348
3365
  {
3349
3366
  name: 'update_subscription',
3350
- description: 'Update an existing subscription (interval, end date, or transaction template).',
3367
+ description: 'Update an existing subscription (interval, end date, or transaction template). NOTE: accountResourceId and taxProfileResourceId on line items are immutable after creation — to change them, cancel and recreate.',
3351
3368
  params: {
3352
3369
  resourceId: { type: 'string', description: 'Subscription resourceId' },
3353
- interval: { type: 'string', enum: ['WEEKLY', 'MONTHLY', 'YEARLY'] },
3370
+ interval: { type: 'string', enum: ['WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY'] },
3354
3371
  endDate: { type: 'string', description: 'New end date (YYYY-MM-DD)' },
3355
3372
  data: { type: 'object', description: 'Updated transaction template' },
3356
3373
  },
@@ -3370,6 +3387,7 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
3370
3387
  resourceId: { type: 'string', description: 'Subscription resourceId' },
3371
3388
  cancelDateType: { type: 'string', enum: ['END_OF_CURRENT_PERIOD', 'END_OF_LAST_PERIOD', 'CUSTOM_DATE'], description: 'When to end (default: END_OF_CURRENT_PERIOD)' },
3372
3389
  endDate: { type: 'string', description: 'Custom cancel date YYYY-MM-DD (only with CUSTOM_DATE)' },
3390
+ proratedAdjustmentLineText: { type: 'string', description: 'Label for proration line item (default: "Prorated adjustment")' },
3373
3391
  },
3374
3392
  required: ['resourceId'],
3375
3393
  group: 'subscriptions',
@@ -3377,6 +3395,7 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
3377
3395
  execute: async (ctx, input) => cancelSubscription(ctx.client, input.resourceId, {
3378
3396
  cancelDateType: input.cancelDateType,
3379
3397
  endDate: input.endDate,
3398
+ proratedAdjustmentLineText: input.proratedAdjustmentLineText,
3380
3399
  }),
3381
3400
  },
3382
3401
  {
@@ -3484,11 +3503,11 @@ Use for: software licenses, retainer services, recurring SaaS billing. Invoices
3484
3503
  },
3485
3504
  {
3486
3505
  name: 'generate_fa_summary',
3487
- description: 'Generate fixed assets summary report grouped by type, contact, or currency.',
3506
+ description: 'Generate fixed assets summary report grouped by account, type, category, or status.',
3488
3507
  params: {
3489
3508
  primarySnapshotStartDate: { type: 'string', description: 'Period start date (YYYY-MM-DD)' },
3490
3509
  primarySnapshotEndDate: { type: 'string', description: 'Period end date (YYYY-MM-DD)' },
3491
- groupBy: { type: 'string', enum: ['CONTACT', 'CONTACT_GROUP', 'DUE_MONTH', 'RELATIONSHIP', 'CURRENCY'], description: 'Grouping dimension' },
3510
+ groupBy: { type: 'string', enum: ['ACCOUNT', 'TYPE', 'CATEGORY', 'STATUS'], description: 'Grouping dimension' },
3492
3511
  currencyCode: { type: 'string', description: 'Currency code' },
3493
3512
  },
3494
3513
  required: ['primarySnapshotStartDate', 'primarySnapshotEndDate', 'groupBy'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaz-clio",
3
- "version": "4.30.11",
3
+ "version": "4.30.13",
4
4
  "description": "Clio — Command Line Interface Orchestrator for Jaz AI.",
5
5
  "type": "module",
6
6
  "bin": {