@spotsccc/finance-bundle 0.1.0 → 0.3.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,15 @@
1
1
  {
2
2
  "name": "@spotsccc/finance-bundle",
3
- "version": "0.1.0",
3
+ "version": "0.3.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
+ ],
9
+ "keywords": [
10
+ "openclaw",
11
+ "mcp",
12
+ "finance",
13
+ "skill"
14
+ ]
7
15
  }
@@ -9,7 +9,9 @@ description: >
9
9
  allowed-tools:
10
10
  - Read
11
11
  - Grep
12
- - assistant-db__create_transaction
12
+ - finance_mcp__create_income
13
+ - finance-mcp__create_expense
14
+ - finance-mcp__create_transfer
13
15
  - assistant-db__list_transactions
14
16
  - assistant-db__delete_transaction
15
17
  - assistant-db__get_wallets
@@ -27,16 +29,19 @@ Record and query personal financial data stored in PostgreSQL via the `assistant
27
29
  ## Transaction Types
28
30
 
29
31
  ### 1. Expense (Трата)
32
+
30
33
  - Use `create_transaction` with `type: "expense"`
31
34
  - Amount is always positive — the system negates it automatically
32
35
  - Requires: description, amount, walletId, categoryId
33
36
 
34
37
  ### 2. Income (Пополнение)
38
+
35
39
  - Use `create_transaction` with `type: "income"`
36
40
  - Amount is positive
37
- - Requires: description, amount, walletId, categoryId
41
+ - Requires: description, amount, walletId
38
42
 
39
43
  ### 3. Transfer (Перевод)
44
+
40
45
  - Use `create_transaction` with `type: "transfer"`, `walletId` (source), `toWalletId` (destination)
41
46
  - The system creates two linked transactions automatically
42
47
  - Category is optional for transfers
@@ -46,6 +51,7 @@ Record and query personal financial data stored in PostgreSQL via the `assistant
46
51
  ### Step 1: Parse the Request
47
52
 
48
53
  Extract from the user's message:
54
+
49
55
  - **Amount** — number (always positive)
50
56
  - **Description** — what was bought / reason for transaction
51
57
  - **Wallet** — which wallet to use
@@ -55,6 +61,7 @@ Extract from the user's message:
55
61
  ### Step 2: Resolve References
56
62
 
57
63
  Before creating a transaction:
64
+
58
65
  1. Call `get_wallets` to find the correct wallet ID
59
66
  2. Call `get_categories` to find the correct category ID
60
67
  3. If category doesn't exist, ask the user or create it with `create_category`
@@ -62,6 +69,7 @@ Before creating a transaction:
62
69
  ### Step 3: Handle Ambiguity
63
70
 
64
71
  If any required field is unclear or missing, ask the user **one concise clarifying question**. Common cases:
72
+
65
73
  - Wallet not specified and user has multiple wallets
66
74
  - Category is ambiguous
67
75
  - Amount is missing
@@ -76,16 +84,19 @@ Call `create_transaction` with the resolved data.
76
84
  ### Step 5: Report Back
77
85
 
78
86
  After creating the transaction, call `get_wallet_balance` and reply with a **concise confirmation** including:
87
+
79
88
  - What was created (description, amount, wallet, category)
80
89
  - Updated wallet balance
81
90
 
82
91
  Example reply format for an expense:
92
+
83
93
  ```
84
94
  Записал: Булочка -200 ARS (Наличка ARS, Продукты)
85
95
  Баланс Наличка ARS: 15 300 $
86
96
  ```
87
97
 
88
98
  Example reply format for a transfer:
99
+
89
100
  ```
90
101
  Перевод: 100 USD Tinkoff → Наличка
91
102
  Баланс 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
- );