@spotsccc/finance-bundle 0.1.0 → 0.2.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/.mcp.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "mcpServers": {
3
- "assistant-db": {
3
+ "finance-mcp": {
4
4
  "command": "npx",
5
5
  "args": ["-y", "@spotsccc/finance-mcp"],
6
6
  "env": {
package/package.json CHANGED
@@ -1,7 +1,16 @@
1
1
  {
2
2
  "name": "@spotsccc/finance-bundle",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "OpenClaw finance skill bundle — personal finance tracking via MCP server",
5
- "files": [".mcp.json", "skills", "schema.sql"],
6
- "keywords": ["openclaw", "mcp", "finance", "skill"]
5
+ "files": [
6
+ ".mcp.json",
7
+ "skills",
8
+ "schema.sql"
9
+ ],
10
+ "keywords": [
11
+ "openclaw",
12
+ "mcp",
13
+ "finance",
14
+ "skill"
15
+ ]
7
16
  }
@@ -27,16 +27,19 @@ Record and query personal financial data stored in PostgreSQL via the `assistant
27
27
  ## Transaction Types
28
28
 
29
29
  ### 1. Expense (Трата)
30
+
30
31
  - Use `create_transaction` with `type: "expense"`
31
32
  - Amount is always positive — the system negates it automatically
32
33
  - Requires: description, amount, walletId, categoryId
33
34
 
34
35
  ### 2. Income (Пополнение)
36
+
35
37
  - Use `create_transaction` with `type: "income"`
36
38
  - Amount is positive
37
- - Requires: description, amount, walletId, categoryId
39
+ - Requires: description, amount, walletId
38
40
 
39
41
  ### 3. Transfer (Перевод)
42
+
40
43
  - Use `create_transaction` with `type: "transfer"`, `walletId` (source), `toWalletId` (destination)
41
44
  - The system creates two linked transactions automatically
42
45
  - Category is optional for transfers
@@ -46,6 +49,7 @@ Record and query personal financial data stored in PostgreSQL via the `assistant
46
49
  ### Step 1: Parse the Request
47
50
 
48
51
  Extract from the user's message:
52
+
49
53
  - **Amount** — number (always positive)
50
54
  - **Description** — what was bought / reason for transaction
51
55
  - **Wallet** — which wallet to use
@@ -55,6 +59,7 @@ Extract from the user's message:
55
59
  ### Step 2: Resolve References
56
60
 
57
61
  Before creating a transaction:
62
+
58
63
  1. Call `get_wallets` to find the correct wallet ID
59
64
  2. Call `get_categories` to find the correct category ID
60
65
  3. If category doesn't exist, ask the user or create it with `create_category`
@@ -62,6 +67,7 @@ Before creating a transaction:
62
67
  ### Step 3: Handle Ambiguity
63
68
 
64
69
  If any required field is unclear or missing, ask the user **one concise clarifying question**. Common cases:
70
+
65
71
  - Wallet not specified and user has multiple wallets
66
72
  - Category is ambiguous
67
73
  - Amount is missing
@@ -76,16 +82,19 @@ Call `create_transaction` with the resolved data.
76
82
  ### Step 5: Report Back
77
83
 
78
84
  After creating the transaction, call `get_wallet_balance` and reply with a **concise confirmation** including:
85
+
79
86
  - What was created (description, amount, wallet, category)
80
87
  - Updated wallet balance
81
88
 
82
89
  Example reply format for an expense:
90
+
83
91
  ```
84
92
  Записал: Булочка -200 ARS (Наличка ARS, Продукты)
85
93
  Баланс Наличка ARS: 15 300 $
86
94
  ```
87
95
 
88
96
  Example reply format for a transfer:
97
+
89
98
  ```
90
99
  Перевод: 100 USD Tinkoff → Наличка
91
100
  Баланс Tinkoff: 500 $
package/schema.sql DELETED
@@ -1,41 +0,0 @@
1
- -- Finance MCP Server — Database Schema
2
- -- PostgreSQL 14+
3
-
4
- CREATE TYPE transaction_type AS ENUM ('income', 'expense', 'transfer');
5
-
6
- CREATE TABLE currencies (
7
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
8
- code VARCHAR(10) UNIQUE NOT NULL,
9
- name VARCHAR(50) NOT NULL,
10
- symbol VARCHAR(5),
11
- created_at TIMESTAMP NOT NULL DEFAULT now()
12
- );
13
-
14
- CREATE TABLE categories (
15
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
16
- name VARCHAR(100) UNIQUE NOT NULL,
17
- created_at TIMESTAMP NOT NULL DEFAULT now()
18
- );
19
-
20
- CREATE TABLE wallets (
21
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
22
- name VARCHAR(100) NOT NULL,
23
- created_at TIMESTAMP NOT NULL DEFAULT now()
24
- );
25
-
26
- CREATE TABLE transactions (
27
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
28
- description VARCHAR(500) NOT NULL,
29
- type transaction_type NOT NULL,
30
- category_id UUID REFERENCES categories(id),
31
- created_at TIMESTAMP NOT NULL DEFAULT now()
32
- );
33
-
34
- CREATE TABLE transaction_entries (
35
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
36
- transaction_id UUID NOT NULL REFERENCES transactions(id) ON DELETE CASCADE,
37
- wallet_id UUID NOT NULL REFERENCES wallets(id),
38
- currency_id UUID NOT NULL REFERENCES currencies(id),
39
- amount NUMERIC(36, 18) NOT NULL,
40
- created_at TIMESTAMP NOT NULL DEFAULT now()
41
- );