jaz-clio 5.12.2 → 5.13.1
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 +4 -4
- package/assets/skills/api/SKILL.md +1 -1
- package/assets/skills/api/references/orders.md +29 -12
- package/assets/skills/cli/SKILL.md +1 -1
- package/assets/skills/conversion/SKILL.md +1 -1
- package/assets/skills/jaz-pseudo-sql/SKILL.md +1 -1
- package/assets/skills/jobs/SKILL.md +1 -1
- package/assets/skills/practice/SKILL.md +1 -1
- package/assets/skills/transaction-recipes/SKILL.md +1 -1
- package/assets/templates/platform-rules/jaz-agent-rules.md +1 -1
- package/cli.mjs +517 -517
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
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-
|
|
6
|
+
<img src="https://img.shields.io/badge/tools-301-blue?style=for-the-badge" alt="301 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
|
+
301 tools. 13 financial calculators. 12 job playbooks. 130 API rules. 16 IFRS recipes.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npm install -g jaz-clio
|
|
@@ -19,7 +19,7 @@ Requires **Node.js 18+** ([nodejs.org](https://nodejs.org)). Also fully compatib
|
|
|
19
19
|
|
|
20
20
|
- [Three Ways In](#three-ways-in) — CLI, MCP, Skills
|
|
21
21
|
- [CLI](#cli) — 55 command groups
|
|
22
|
-
- [MCP Server](#mcp-server) —
|
|
22
|
+
- [MCP Server](#mcp-server) — 301 tools for AI agents
|
|
23
23
|
- [Skills](#skills) — Teach any AI the Jaz API
|
|
24
24
|
- [Setup](#setup) — Auth, multi-org, automation
|
|
25
25
|
|
|
@@ -54,7 +54,7 @@ clio practice create-engagement acme-pte-ltd --type monthly-close --period 2026-
|
|
|
54
54
|
|
|
55
55
|
## MCP Server
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
301 CLI tools, available to any AI agent that speaks MCP. Runs locally — no cloud, no ports. Includes the v5.2.0 `practice_*` tools (init, onboard_client, list_clients, load_client, create_engagement, load_engagement) so an agent in Claude Desktop or Claude Code can scaffold and load client workspaces conversationally.
|
|
58
58
|
|
|
59
59
|
**Claude Code:**
|
|
60
60
|
```bash
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Pre-invoice / pre-bill documents in the sales and purchase pipelines.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
Sales: Sale Quote ──(accept)──► Sale Order ──► Invoice
|
|
7
|
-
Purchases: Purchase Request ──(accept)──► Purchase Order ──► Bill
|
|
6
|
+
Sales: Sale Quote ──(accept)──► Sale Order ──(convert-to-invoice)──► Invoice
|
|
7
|
+
Purchases: Purchase Request ──(accept)──► Purchase Order ──(convert-to-bill)──► Bill
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
Two MCP namespaces wrap these: **`sale_orders`** (Sale Quotes + Sale Orders) and **`purchase_orders`** (Purchase Requests + Purchase Orders). Each tool takes a `documentType` discriminator. The full long-tail (list, bulk-*, fast-fix, line-item bulk-upsert) lives in the CLI (`clio sale-orders …`, `clio purchase-orders …`).
|
|
10
|
+
Two MCP namespaces wrap these: **`sale_orders`** (Sale Quotes + Sale Orders) and **`purchase_orders`** (Purchase Requests + Purchase Orders). Each tool takes a `documentType` discriminator. The full long-tail (list, bulk-*, fast-fix, line-item bulk-upsert) lives in the CLI (`clio sale-orders …`, `clio purchase-orders …`). Attachments on any order document go through the generic `get_attachments` / `add_attachment` / `delete_attachment` tools (`transactionType: sale-quotes | sale-orders | purchase-requests | purchase-orders`).
|
|
11
11
|
|
|
12
12
|
## Document types & lifecycle
|
|
13
13
|
|
|
@@ -23,9 +23,9 @@ Two MCP namespaces wrap these: **`sale_orders`** (Sale Quotes + Sale Orders) and
|
|
|
23
23
|
- **Sale Orders have no draft state** — `saveAsDraft` is ignored; created directly as `CREATED`.
|
|
24
24
|
- Statuses verified live: SQ create → `DRAFT` (or `CREATED` with `saveAsDraft:false`); SQ accept (from CREATED) → `ACCEPTED`; SO create → `CREATED`; SO confirm → `CONFIRMED`; PR create → `DRAFT` (or `ACTIVE` with `saveAsDraft:false`); PR accept (from ACTIVE) → `ACCEPTED`; PO `saveAsDraft:false` → `ACTIVE`; PO confirm → `CONFIRMED`.
|
|
25
25
|
|
|
26
|
-
## Linking (
|
|
26
|
+
## Linking (quote → order, request → PO)
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Quote→Order / Request→PO linking is a **create-time reference field**:
|
|
29
29
|
|
|
30
30
|
- **Quote → Order**: pass `saleQuoteResourceId` on `create_sale_order` (documentType `SALE_ORDER`).
|
|
31
31
|
- **Request → PO**: pass `purchaseRequestResourceId` on `create_purchase_order` (documentType `PURCHASE_ORDER`).
|
|
@@ -34,9 +34,18 @@ There is **no convert endpoint** (`/convert-to-invoice` → 404). Linking is a *
|
|
|
34
34
|
|
|
35
35
|
Once an order is created from an issued quote, the parent quote's `orderState` advances to `FULLY_ORDERED` (verified live). `orderState` (`NOT_ORDERED` / `PARTIALLY_ORDERED` / `FULLY_ORDERED`) is a **response field**, not a search filter.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
## Conversion: Order → Invoice / Order → Bill
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Both directions are now first-class endpoints:
|
|
40
|
+
|
|
41
|
+
- **`convert_sale_order_to_invoice`** (documentType `SALE_QUOTE` | `SALE_ORDER`) → creates a new Invoice from the source.
|
|
42
|
+
- **`convert_purchase_order_to_bill`** (documentType `PURCHASE_REQUEST` | `PURCHASE_ORDER`) → creates a new Bill from the source.
|
|
43
|
+
|
|
44
|
+
Body: `valueDate` + `dueDate` + `reference` required; if `reference` is omitted the tool sends a unique placeholder — pass your own to follow your org's numbering sequence. Optional `terms`, `notes` (sales → `invoiceNotes`), `internalNotes`, `tag`, `saveAsDraft` (defaults false → the new document is ACTIVE).
|
|
45
|
+
|
|
46
|
+
- **NON-IDEMPOTENT.** Each call creates ANOTHER invoice/bill. On a timeout or uncertain result, do NOT blind-retry — search for one already linked to this order (via the linkage fields below) first.
|
|
47
|
+
- **Source must not be VOID.** The convert tools pre-flight this and return a `repair` hint instead of a bare 422.
|
|
48
|
+
- The reverse link is also exposed as create-time fields: `create_invoice` accepts `saleOrderResourceId` / `saleQuoteResourceId`; `create_bill` accepts `purchaseOrderResourceId` / `purchaseRequestResourceId`. Use these when you build the invoice/bill yourself instead of converting.
|
|
40
49
|
|
|
41
50
|
## Fields (create)
|
|
42
51
|
|
|
@@ -53,16 +62,20 @@ Required: `valueDate`. Recommended: `reference` (auto-generated, timestamped, if
|
|
|
53
62
|
|
|
54
63
|
## MCP tools
|
|
55
64
|
|
|
56
|
-
`sale_orders`: `create_sale_order`, `get_sale_order`, `search_sale_orders`, `update_sale_order`, `transition_sale_order` (action: ACCEPT | CONFIRM | VOID | DELETE)
|
|
57
|
-
`purchase_orders`: `create_purchase_order`, `get_purchase_order`, `search_purchase_orders`, `update_purchase_order`, `transition_purchase_order`.
|
|
65
|
+
`sale_orders`: `create_sale_order`, `get_sale_order`, `search_sale_orders`, `search_sale_order_line_items`, `update_sale_order`, `transition_sale_order` (action: ACCEPT | CONFIRM | VOID | DELETE), `convert_sale_order_to_invoice`.
|
|
66
|
+
`purchase_orders`: `create_purchase_order`, `get_purchase_order`, `search_purchase_orders`, `search_purchase_order_line_items`, `update_purchase_order`, `transition_purchase_order`, `convert_purchase_order_to_bill`.
|
|
67
|
+
|
|
68
|
+
PDF downloads for the documents these convert into: `download_bill_pdf` (`bills`), `download_supplier_credit_note_pdf` (`supplier_credit_notes`) — alongside the existing `download_invoice_pdf` / `download_credit_note_pdf`.
|
|
58
69
|
|
|
59
70
|
## CLI (full surface incl. long-tail)
|
|
60
71
|
|
|
61
72
|
```
|
|
62
|
-
clio sale-orders list|get|search|create|update|accept|confirm|void|delete|fast-fix \
|
|
73
|
+
clio sale-orders list|get|search|search-line-items|create|update|accept|confirm|convert-to-invoice|void|delete|fast-fix \
|
|
63
74
|
|bulk-void|bulk-accept|bulk-confirm|bulk-delete|bulk-upsert-line-items (-t quote|order)
|
|
64
|
-
clio purchase-orders list|get|search|create|update|accept|confirm|void|delete|fast-fix \
|
|
75
|
+
clio purchase-orders list|get|search|search-line-items|create|update|accept|confirm|convert-to-bill|void|delete|fast-fix \
|
|
65
76
|
|bulk-void|bulk-accept|bulk-confirm|bulk-delete|bulk-upsert-line-items (-t request|order)
|
|
77
|
+
clio bills download <id> # bill PDF
|
|
78
|
+
clio supplier-credit-notes download <id> # supplier CN PDF
|
|
66
79
|
```
|
|
67
80
|
|
|
68
81
|
## Worked example — issued quote → accept → linked order → confirmed
|
|
@@ -79,12 +92,16 @@ clio sale-orders create -t order --quote <quoteId> --contact <id> --lines '[…]
|
|
|
79
92
|
clio sale-orders confirm <orderId> --json
|
|
80
93
|
# 5. The parent quote now shows orderState = FULLY_ORDERED
|
|
81
94
|
clio sale-orders get <quoteId> -t quote --json | jq .orderState
|
|
95
|
+
# 6. Convert the confirmed order into an invoice (creates a NEW invoice)
|
|
96
|
+
clio sale-orders convert-to-invoice <orderId> -t order --date 2026-05-30 --due 2026-06-29 --json
|
|
82
97
|
```
|
|
83
98
|
|
|
84
|
-
Purchase side is symmetric: `create -t request --finalize` (→ ACTIVE) → (optional) `accept` → `create -t order --request <id> --finalize` → `confirm
|
|
99
|
+
Purchase side is symmetric: `create -t request --finalize` (→ ACTIVE) → (optional) `accept` → `create -t order --request <id> --finalize` → `confirm` → `convert-to-bill <orderId> -t order --date … --due …`.
|
|
85
100
|
|
|
86
101
|
## Search
|
|
87
102
|
|
|
88
103
|
`search_sale_orders` / `search_purchase_orders` take `documentType` plus the standard filter set (reference, status, contact, contactResourceId, currencyCode, date range, amount range, tag). The `status` enum is the per-side union (sales: DRAFT/CREATED/ACCEPTED/CONFIRMED/VOID; purchases: DRAFT/ACTIVE/ACCEPTED/CONFIRMED/VOID). For advanced/nested queries (e.g. filter by `saleQuoteResourceId`), pass the raw `filter` object. See `search-reference.md` §24–25 and `search-enums.md` §25–26.
|
|
89
104
|
|
|
90
105
|
Search behaves exactly like the other entities: `sortBy` is an array, `order` is `ASC`/`DESC`, and an `offset` must be paired with a sort. Duplicate `sortBy` values are rejected (`422 — must contain unique values`).
|
|
106
|
+
|
|
107
|
+
**Line-item-level search** — `search_sale_order_line_items` / `search_purchase_order_line_items` (CLI: `search-line-items -t …`) search the individual lines rather than the document headers. Filter by line text (`name`), parent order (`orderId` → `btResourceId`), contact, account, tax profile, amount range, open state (`isOpen`), and date. Use this for questions like "every order line still open for contact X over $500". A default sort is always applied, so paginating with `offset` is safe.
|
|
@@ -6,7 +6,7 @@ Source of truth lives in the installed skills (`.claude/skills/jaz-*/SKILL.md` o
|
|
|
6
6
|
|
|
7
7
|
## Discovery
|
|
8
8
|
|
|
9
|
-
The Jaz MCP server exposes
|
|
9
|
+
The Jaz MCP server exposes 301 tools across 37 namespaces via 3 meta-tools. **Use the meta-tool flow — never enumerate tools blindly.**
|
|
10
10
|
|
|
11
11
|
1. `search_tools(query)` → top-N tool names + namespaces.
|
|
12
12
|
2. `describe_tools(names)` → full parameter schemas.
|