@dizzlkheinz/ynab-mcpb 0.16.1 → 0.17.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/.env.example +33 -33
- package/.github/workflows/ci-tests.yml +45 -45
- package/.github/workflows/claude-code-review.yml +57 -57
- package/.github/workflows/claude.yml +50 -50
- package/.github/workflows/full-integration.yml +22 -22
- package/.github/workflows/publish.yml +11 -2
- package/CLAUDE.md +33 -47
- package/README.md +8 -10
- package/dist/bundle/index.cjs +54 -54
- package/dist/server/YNABMCPServer.d.ts +120 -54
- package/dist/server/YNABMCPServer.js +28 -381
- package/dist/server/config.d.ts +2 -0
- package/dist/server/config.js +1 -0
- package/dist/server/securityMiddleware.d.ts +37 -8
- package/dist/tools/accountTools.d.ts +2 -0
- package/dist/tools/accountTools.js +45 -0
- package/dist/tools/adapters.d.ts +12 -0
- package/dist/tools/adapters.js +25 -0
- package/dist/tools/budgetTools.d.ts +2 -0
- package/dist/tools/budgetTools.js +30 -0
- package/dist/tools/categoryTools.d.ts +2 -0
- package/dist/tools/categoryTools.js +45 -0
- package/dist/tools/monthTools.d.ts +2 -0
- package/dist/tools/monthTools.js +32 -0
- package/dist/tools/payeeTools.d.ts +2 -0
- package/dist/tools/payeeTools.js +32 -0
- package/dist/tools/reconciliation/index.d.ts +2 -0
- package/dist/tools/reconciliation/index.js +33 -0
- package/dist/tools/schemas/common.d.ts +3 -0
- package/dist/tools/schemas/common.js +3 -0
- package/dist/tools/schemas/outputs/comparisonOutputs.d.ts +1 -1
- package/dist/tools/schemas/outputs/index.d.ts +2 -2
- package/dist/tools/schemas/outputs/index.js +2 -2
- package/dist/tools/schemas/outputs/utilityOutputs.d.ts +0 -15
- package/dist/tools/schemas/outputs/utilityOutputs.js +0 -9
- package/dist/tools/transactionTools.d.ts +2 -0
- package/dist/tools/transactionTools.js +124 -0
- package/dist/tools/utilityTools.d.ts +2 -7
- package/dist/tools/utilityTools.js +19 -38
- package/dist/types/index.d.ts +1 -0
- package/dist/types/toolRegistration.d.ts +27 -0
- package/dist/types/toolRegistration.js +1 -0
- package/docs/maintainers/npm-publishing.md +27 -0
- package/docs/reference/API.md +15 -70
- package/docs/technical/reconciliation-system-architecture.md +2251 -2251
- package/package.json +6 -6
- package/scripts/analyze-bundle.mjs +41 -41
- package/scripts/generate-mcpb.ps1 +95 -95
- package/scripts/run-domain-integration-tests.js +4 -1
- package/scripts/watch-and-restart.ps1 +49 -49
- package/src/__tests__/comprehensive.integration.test.ts +0 -28
- package/src/__tests__/performance.test.ts +4 -12
- package/src/__tests__/setup.ts +45 -14
- package/src/__tests__/workflows.e2e.test.ts +1 -51
- package/src/server/YNABMCPServer.ts +33 -519
- package/src/server/__tests__/YNABMCPServer.test.ts +0 -1
- package/src/server/__tests__/toolRegistration.test.ts +236 -0
- package/src/server/config.ts +1 -0
- package/src/tools/__tests__/adapters.test.ts +113 -0
- package/src/tools/__tests__/transactionTools.integration.test.ts +63 -3
- package/src/tools/__tests__/utilityTools.integration.test.ts +1 -85
- package/src/tools/__tests__/utilityTools.test.ts +1 -123
- package/src/tools/accountTools.ts +53 -0
- package/src/tools/adapters.ts +74 -0
- package/src/tools/budgetTools.ts +37 -0
- package/src/tools/categoryTools.ts +53 -0
- package/src/tools/monthTools.ts +39 -0
- package/src/tools/payeeTools.ts +39 -0
- package/src/tools/reconciliation/index.ts +45 -0
- package/src/tools/schemas/common.ts +18 -0
- package/src/tools/schemas/outputs/index.ts +0 -3
- package/src/tools/schemas/outputs/utilityOutputs.ts +2 -43
- package/src/tools/toolCategories.ts +0 -1
- package/src/tools/transactionTools.ts +140 -0
- package/src/tools/utilityTools.ts +24 -55
- package/src/types/index.ts +3 -0
- package/src/types/toolRegistration.ts +88 -0
- package/vitest.config.ts +2 -1
- package/.chunkhound.json +0 -11
- package/.code/agents/01a13ef4-3f23-4f52-b33b-3585b73cfa60/error.txt +0 -3
- package/.code/agents/084fd32f-e298-4728-9103-a78d7dc39613/error.txt +0 -3
- package/.code/agents/0fed51e1-a943-4b97-a2a8-a6f0f27c844d/status.txt +0 -1
- package/.code/agents/1059b6bd-5ccd-4d83-a12c-7c9d89137399/error.txt +0 -5
- package/.code/agents/110/exec-call_F9BDNG7JfxKkq7Vc8ESAvdft.txt +0 -1569
- package/.code/agents/11ebcef3-b13f-4e44-ad80-d94a866804b7/error.txt +0 -3
- package/.code/agents/1398/exec-call_CjItcWMU1G6JoPshX62QvpaR.txt +0 -2832
- package/.code/agents/1398/exec-call_SUVq2ivmONQ5LMCmd7ngmOqr.txt +0 -2709
- package/.code/agents/1398/exec-call_SdNY4NOffdcC5pRYjVXHjPCK.txt +0 -2832
- package/.code/agents/1398/exec-call_qblJo9et1gsFFB63TtLOiji2.txt +0 -2832
- package/.code/agents/1398/exec-call_zaRrzlGz7GJcNzVfkAmML7Zg.txt +0 -2709
- package/.code/agents/171834fd-5905-42fc-bbcc-2c755145b0fc/status.txt +0 -1
- package/.code/agents/1724/exec-call_HvHQe0w5CCG3T7Q3ULT6MO3g.txt +0 -5217
- package/.code/agents/1724/exec-call_QwUNESVzfxxk78K1frh1Vahb.txt +0 -2594
- package/.code/agents/1724/exec-call_aJ1Xwz71XmIpD4SBxSHERzLe.txt +0 -2594
- package/.code/agents/1d7d7ab7-7473-4b69-8b97-6e914f56056a/result.txt +0 -231
- package/.code/agents/210/exec-call_0tQCsKNJ1WTuIchb8wlcFJpW.txt +0 -2590
- package/.code/agents/210/exec-call_8ZlY9cUc8Ft1twi4ch8UJ6IN.txt +0 -5195
- package/.code/agents/2188/exec-call_5HqayBxIteJtoI8oPTiLWgvJ.txt +0 -286
- package/.code/agents/2188/exec-call_XRbBKBq3adZe6dcppAvQtM7G.txt +0 -218
- package/.code/agents/2188/exec-call_ehA0SjpYtrUi6GJXmibLjp4i.txt +0 -180
- package/.code/agents/21902821-ecaf-4759-bb9d-222b90921af5/error.txt +0 -3
- package/.code/agents/232073be-aa0e-46da-b478-5b64dbf03cf5/status.txt +0 -1
- package/.code/agents/234ff534-2336-4771-a8d9-aa04421a63be/result.txt +0 -747
- package/.code/agents/253e2695-dc36-4022-b436-27655e0fc6c7/status.txt +0 -1
- package/.code/agents/2583/exec-call_M59I4eDjpjlBIWBiSxyS0YlJ.txt +0 -2594
- package/.code/agents/2583/exec-call_usLRGh7OhVHtsRBL4iUwRhjq.txt +0 -2594
- package/.code/agents/292aa3ff-dbab-470f-97c9-e7e8fd65e0db/result.txt +0 -144
- package/.code/agents/3134/exec-call_IgCAMGx19lWfuo8zfYIt5FFC.txt +0 -416
- package/.code/agents/3134/exec-call_IxvLR2Oo7kba2QTsI1gHVko8.txt +0 -2590
- package/.code/agents/3134/exec-call_jYvc8hksZChSiysbzKjl2ZbB.txt +0 -2590
- package/.code/agents/329/exec-call_4QdP3SfSO7HGPCwVcqZIth6s.txt +0 -2590
- package/.code/agents/472/exec-call_4AxzEEcWwkKhpqRB3bE8Ha4L.txt +0 -790
- package/.code/agents/472/exec-call_CB3LPYQA8QIZRi8I6kj4J17A.txt +0 -766
- package/.code/agents/472/exec-call_YeoUWvaFoktay2nqVUsa9KKX.txt +0 -790
- package/.code/agents/472/exec-call_jPWgKVquBBXTg0T3Lks5ZfkK.txt +0 -2594
- package/.code/agents/472/exec-call_qBkvunpGBDEHph2jPmTwtcsb.txt +0 -1000
- package/.code/agents/472/exec-call_v0ffRV1p0kTckBmJPzzHAEy0.txt +0 -3489
- package/.code/agents/472/exec-call_xAX5FXqWIlk02d9WubHbHWh8.txt +0 -766
- package/.code/agents/5346/exec-call_9q0muXUuLaucwEqI51Pt7idT.txt +0 -2594
- package/.code/agents/5346/exec-call_B2el3B79rVkq9LhWTI2VYlz7.txt +0 -2456
- package/.code/agents/5346/exec-call_BfX08f02qkZI9uJD5dvCvuoj.txt +0 -2594
- package/.code/agents/543328d0-61d6-4fd1-a723-bb168656e2e2/error.txt +0 -18
- package/.code/agents/5580c02c-1383-4d18-9cbd-cc8a06e3408d/result.txt +0 -48
- package/.code/agents/60ce1a22-5126-44b2-b977-1d5b56142a7b/status.txt +0 -1
- package/.code/agents/6215d9db-7fa9-4429-aeec-3835c3212291/error.txt +0 -1
- package/.code/agents/6743db55-30e5-4b4e-9366-a8214fc7f714/error.txt +0 -1
- package/.code/agents/6bf9591b-b9c9-422c-b0a5-e968c7d8422a/status.txt +0 -1
- package/.code/agents/7/exec-call_eww3GfdEiJZx61sJEQ9wNmt3.txt +0 -1271
- package/.code/agents/70/exec-call_owUtDMYiVgqDf8vsz1i32PFf.txt +0 -1570
- package/.code/agents/8/exec-call_UtrjAcLbhYLatxR4O97fZgnm.txt +0 -2590
- package/.code/agents/82490bc9-f34e-4b1b-8a8e-bccc2e6254f5/error.txt +0 -3
- package/.code/agents/841/exec-call_7nTNhSBCNjTDUIJv7py6CepO.txt +0 -3299
- package/.code/agents/841/exec-call_TLI0yUdUijuUAvI4o3DXEvHO.txt +0 -3299
- package/.code/agents/9/exec-call_XaABQT1hIlRpnKZ2uyBMWsTC.txt +0 -1882
- package/.code/agents/941/exec-call_GuGHRx7NNXWIDAnxUG2NEWPa.txt +0 -2594
- package/.code/agents/95d9fbab-19a2-48af-83f9-c792566a347f/error.txt +0 -1
- package/.code/agents/b0098cb8-cb32-4ada-9bc4-37c587518896/result.txt +0 -170
- package/.code/agents/b4fe59a4-81df-42e2-a112-0153e504faca/error.txt +0 -1
- package/.code/agents/bf4ce152-f623-49d7-aa52-c18631625c3c/error.txt +0 -3
- package/.code/agents/d7d1db75-d7eb-468e-adea-4ef4d916d187/status.txt +0 -1
- package/.code/agents/e2baa9c8-bac3-49e3-a39d-024333e6a990/status.txt +0 -1
- package/.code/agents/e350b8c3-8483-408c-b2bb-94515f492a11/error.txt +0 -3
- package/.code/agents/e63f9919-719f-4ad0-bccf-01b1a596e1e9/status.txt +0 -1
- package/.code/agents/e71695a8-3044-478d-8f12-ed13d02884c7/status.txt +0 -1
- package/.code/agents/f95b7464-3e25-4897-b153-c8dfd63fd605/error.txt +0 -5
- package/.code/agents/fa3c5ddf-cdf7-47a2-930a-b806c6363689/status.txt +0 -1
- package/.github/workflows/pr-description-check.yml +0 -88
- package/AGENTS.md +0 -36
- package/NUL +0 -1
- package/docs/README.md +0 -72
- package/docs/getting-started/CONFIGURATION.md +0 -175
- package/docs/getting-started/INSTALLATION.md +0 -333
- package/docs/getting-started/QUICKSTART.md +0 -282
- package/docs/guides/ARCHITECTURE.md +0 -533
- package/docs/guides/DEPLOYMENT.md +0 -189
- package/docs/guides/INTEGRATION_TESTING.md +0 -730
- package/docs/guides/TESTING.md +0 -591
- package/docs/reconciliation-flow.md +0 -83
- package/docs/reference/EXAMPLES.md +0 -946
- package/docs/reference/TOOLS.md +0 -348
- package/docs/reference/TROUBLESHOOTING.md +0 -481
- package/package.json.tmp +0 -105
- package/temp-recon.ts +0 -126
- package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_09-04-53.json +0 -23
- package/test-exports/ynab_account_e9ddc2a6_minimal_1items_2025-11-19_10-37-42.json +0 -23
- package/test-exports/ynab_account_e9ddc2a6_minimal_4items_2025-11-19_09-02-09.json +0 -44
- package/test-exports/ynab_account_e9ddc2a6_minimal_6items_2025-11-19_10-37-52.json +0 -58
- package/test-exports/ynab_since_2025-10-16_account_53298e13_238items_2025-11-28_13-46-20.json +0 -3662
- package/test-exports/ynab_since_2025-11-01_account_4c18e9f0_minimal_14items_2025-11-16_10-07-10.json +0 -115
package/docs/reference/TOOLS.md
DELETED
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
# YNAB MCP Server - Tools Quick Reference
|
|
2
|
-
|
|
3
|
-
Quick reference guide for all available tools. For detailed documentation, see the [complete API Reference](API.md).
|
|
4
|
-
|
|
5
|
-
## Tool Categories
|
|
6
|
-
|
|
7
|
-
- [Budget Management](#budget-management) (4 tools)
|
|
8
|
-
- [Account Management](#account-management) (3 tools)
|
|
9
|
-
- [Transaction Management](#transaction-management) (11 tools)
|
|
10
|
-
- [Category Management](#category-management) (3 tools)
|
|
11
|
-
- [Payee Management](#payee-management) (2 tools)
|
|
12
|
-
- [Monthly Data](#monthly-data) (2 tools)
|
|
13
|
-
- [Utilities](#utilities) (2 tools)
|
|
14
|
-
- [Diagnostics](#diagnostics) (3 tools)
|
|
15
|
-
|
|
16
|
-
**Total: 30 tools**
|
|
17
|
-
|
|
18
|
-
## Structured Output Support
|
|
19
|
-
|
|
20
|
-
All 30 tools now include **Zod-based output schemas** for type-safe response validation, improving AI model parsing and integration reliability. Output schemas are automatically validated by the tool registry before returning responses to clients.
|
|
21
|
-
|
|
22
|
-
### Output Schema Benefits
|
|
23
|
-
|
|
24
|
-
1. **Type-safe responses** - TypeScript type inference with `z.infer<typeof Schema>`
|
|
25
|
-
2. **Runtime validation** - Prevents malformed data from reaching clients
|
|
26
|
-
3. **Self-documenting API** - Schema definitions serve as contracts for tool outputs
|
|
27
|
-
4. **Improved AI parsing** - Structured data helps AI models understand responses
|
|
28
|
-
|
|
29
|
-
### Usage Example
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
import { ListBudgetsOutputSchema } from './src/tools/schemas/outputs/index.js';
|
|
33
|
-
|
|
34
|
-
// Type inference from schema
|
|
35
|
-
type ListBudgetsOutput = z.infer<typeof ListBudgetsOutputSchema>;
|
|
36
|
-
|
|
37
|
-
// Runtime validation
|
|
38
|
-
const result = await callTool('list_budgets', {});
|
|
39
|
-
const validation = ListBudgetsOutputSchema.safeParse(result);
|
|
40
|
-
|
|
41
|
-
if (validation.success) {
|
|
42
|
-
// Validated data with type safety
|
|
43
|
-
const budgets = validation.data.budgets;
|
|
44
|
-
const cached = validation.data.cached;
|
|
45
|
-
} else {
|
|
46
|
-
// Handle validation errors
|
|
47
|
-
console.error('Schema validation failed:', validation.error);
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Schema Organization
|
|
52
|
-
|
|
53
|
-
Output schemas are organized by tool domain in `src/tools/schemas/outputs/`:
|
|
54
|
-
|
|
55
|
-
- `budgetOutputs.ts` - Budget management tool outputs
|
|
56
|
-
- `accountOutputs.ts` - Account management tool outputs
|
|
57
|
-
- `transactionOutputs.ts` - Transaction tool outputs
|
|
58
|
-
- `categoryOutputs.ts` - Category tool outputs
|
|
59
|
-
- `payeeOutputs.ts` - Payee tool outputs
|
|
60
|
-
- `monthOutputs.ts` - Monthly data tool outputs
|
|
61
|
-
- `utilityOutputs.ts` - Utility tool outputs
|
|
62
|
-
- `transactionMutationOutputs.ts` - Transaction creation/update outputs
|
|
63
|
-
- `reconciliationOutputs.ts` - Account reconciliation outputs
|
|
64
|
-
- `comparisonOutputs.ts` - Transaction comparison and export outputs
|
|
65
|
-
|
|
66
|
-
All schemas are centrally exported from `src/tools/schemas/outputs/index.ts`.
|
|
67
|
-
|
|
68
|
-
### Automatic Validation
|
|
69
|
-
|
|
70
|
-
The tool registry (lines 401-483 in `src/server/toolRegistry.ts`) automatically validates handler responses against declared schemas. Validation errors are returned as standard error responses, ensuring clients always receive schema-compliant data or clear error messages.
|
|
71
|
-
|
|
72
|
-
**Note**: Output schemas are optional but recommended. Tools without schemas will continue to work as before, but won't benefit from automatic validation and type safety.
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Budget Management
|
|
77
|
-
|
|
78
|
-
| Tool | Purpose | Key Parameters |
|
|
79
|
-
|------|---------|----------------|
|
|
80
|
-
| `list_budgets` | List all budgets | None |
|
|
81
|
-
| `get_budget` | Get budget details | `budget_id` |
|
|
82
|
-
| `set_default_budget` | Set default budget | `budget_id` |
|
|
83
|
-
| `get_default_budget` | Get current default | None |
|
|
84
|
-
|
|
85
|
-
**Common Use**: Always call `set_default_budget` first to enable automatic budget resolution in other tools.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Account Management
|
|
90
|
-
|
|
91
|
-
| Tool | Purpose | Key Parameters |
|
|
92
|
-
|------|---------|----------------|
|
|
93
|
-
| `list_accounts` | List all accounts | `budget_id`* |
|
|
94
|
-
| `get_account` | Get account details | `budget_id`*, `account_id` |
|
|
95
|
-
| `create_account` | Create new account | `budget_id`*, `name`, `type`, `balance`? |
|
|
96
|
-
|
|
97
|
-
**Account Types**: `checking`, `savings`, `creditCard`, `cash`, `lineOfCredit`, `otherAsset`, `otherLiability`
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Transaction Management
|
|
102
|
-
|
|
103
|
-
| Tool | Purpose | Key Parameters |
|
|
104
|
-
|------|---------|----------------|
|
|
105
|
-
| `list_transactions` | List transactions | `budget_id`*, `account_id`?, `since_date`? |
|
|
106
|
-
| `export_transactions` | Export to JSON file | `budget_id`*, `account_id`?, `since_date`? |
|
|
107
|
-
| `compare_transactions` | Compare CSV with YNAB | `budget_id`*, `csv_content`, `account_id`? |
|
|
108
|
-
| `reconcile_account` | Reconcile with CSV | `budget_id`*, `account_id`, `csv_content`, `statement_balance`? |
|
|
109
|
-
| `get_transaction` | Get transaction details | `budget_id`*, `transaction_id` |
|
|
110
|
-
| `create_transaction` | Create transaction | `budget_id`*, `account_id`, `amount`, `date`, ... |
|
|
111
|
-
| `create_receipt_split_transaction` | Create split from receipt | `budget_id`*, `account_id`, `receipt_items`, `tax`, ... |
|
|
112
|
-
| `update_transaction` | Update transaction | `budget_id`*, `transaction_id`, ... |
|
|
113
|
-
| `delete_transaction` | Delete transaction | `budget_id`*, `transaction_id` |
|
|
114
|
-
|
|
115
|
-
**Note**: Amounts are in milliunits for create/update operations (1 dollar = 1000 milliunits)
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Category Management
|
|
120
|
-
|
|
121
|
-
| Tool | Purpose | Key Parameters |
|
|
122
|
-
|------|---------|----------------|
|
|
123
|
-
| `list_categories` | List all categories | `budget_id`* |
|
|
124
|
-
| `get_category` | Get category details | `budget_id`*, `category_id` |
|
|
125
|
-
| `update_category` | Update category budget | `budget_id`*, `month`, `category_id`, `budgeted` |
|
|
126
|
-
|
|
127
|
-
**Note**: Categories are organized in category groups. Use `list_categories` to see the hierarchy.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Payee Management
|
|
132
|
-
|
|
133
|
-
| Tool | Purpose | Key Parameters |
|
|
134
|
-
|------|---------|----------------|
|
|
135
|
-
| `list_payees` | List all payees | `budget_id`* |
|
|
136
|
-
| `get_payee` | Get payee details | `budget_id`*, `payee_id` |
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
## Monthly Data
|
|
141
|
-
|
|
142
|
-
| Tool | Purpose | Key Parameters |
|
|
143
|
-
|------|---------|----------------|
|
|
144
|
-
| `get_month` | Get monthly budget data | `budget_id`*, `month` |
|
|
145
|
-
| `list_months` | List all months summary | `budget_id`* |
|
|
146
|
-
|
|
147
|
-
**Month Format**: `YYYY-MM-01` (always use first day of month)
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Utilities
|
|
152
|
-
|
|
153
|
-
| Tool | Purpose | Key Parameters |
|
|
154
|
-
|------|---------|----------------|
|
|
155
|
-
| `get_user` | Get user information | None |
|
|
156
|
-
| `convert_amount` | Convert dollars ↔ milliunits | `amount`, `to_milliunits` |
|
|
157
|
-
|
|
158
|
-
**Conversion**:
|
|
159
|
-
- Dollars to milliunits: `multiply by 1000`
|
|
160
|
-
- Milliunits to dollars: `divide by 1000`
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
## Diagnostics
|
|
165
|
-
|
|
166
|
-
| Tool | Purpose | Key Parameters |
|
|
167
|
-
|------|---------|----------------|
|
|
168
|
-
| `diagnostic_info` | Get system diagnostics | None |
|
|
169
|
-
| `clear_cache` | Clear the cache | None |
|
|
170
|
-
| `set_output_format` | Configure output format | `minify`, `spaces`? |
|
|
171
|
-
|
|
172
|
-
**Diagnostic Info Includes**:
|
|
173
|
-
- Server version and uptime
|
|
174
|
-
- Cache statistics (hit rate, entries)
|
|
175
|
-
- Memory usage
|
|
176
|
-
- Environment configuration
|
|
177
|
-
- Authentication status
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## Parameter Conventions
|
|
182
|
-
|
|
183
|
-
### Required vs Optional
|
|
184
|
-
|
|
185
|
-
- **Required parameters**: Must be provided
|
|
186
|
-
- **Optional parameters**: Marked with `?` can be omitted
|
|
187
|
-
- **Auto-resolved parameters**: Marked with `*` are auto-filled if default budget is set
|
|
188
|
-
|
|
189
|
-
### Common Parameters
|
|
190
|
-
|
|
191
|
-
| Parameter | Type | Description |
|
|
192
|
-
|-----------|------|-------------|
|
|
193
|
-
| `budget_id` | string | Budget ID (auto-resolved if default set) |
|
|
194
|
-
| `account_id` | string | Account ID |
|
|
195
|
-
| `transaction_id` | string | Transaction ID |
|
|
196
|
-
| `category_id` | string | Category ID |
|
|
197
|
-
| `amount` | number | Amount in milliunits |
|
|
198
|
-
| `date` | string | Date in YYYY-MM-DD format |
|
|
199
|
-
| `since_date` | string | Filter date in YYYY-MM-DD format |
|
|
200
|
-
|
|
201
|
-
### Amount Handling
|
|
202
|
-
|
|
203
|
-
**Input (create/update)**:
|
|
204
|
-
- Use milliunits: `$25.50` → `25500`
|
|
205
|
-
- Negative for outflows: `$-50.00` → `-50000`
|
|
206
|
-
- Positive for inflows: `$100.00` → `100000`
|
|
207
|
-
|
|
208
|
-
**Output (list/get)**:
|
|
209
|
-
- Automatically converted to dollars
|
|
210
|
-
- Example: `25500` milliunits → `$25.50`
|
|
211
|
-
|
|
212
|
-
### Date Formats
|
|
213
|
-
|
|
214
|
-
All dates must use ISO 8601 format: `YYYY-MM-DD`
|
|
215
|
-
|
|
216
|
-
✅ Valid: `2024-01-15`, `2024-12-31`
|
|
217
|
-
❌ Invalid: `01/15/2024`, `15-01-2024`, `2024-1-15`
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Quick Start Workflow
|
|
222
|
-
|
|
223
|
-
### 1. Initial Setup
|
|
224
|
-
|
|
225
|
-
```
|
|
226
|
-
1. list_budgets → Get budget IDs
|
|
227
|
-
2. set_default_budget → Set your budget
|
|
228
|
-
3. list_accounts → View accounts
|
|
229
|
-
4. list_categories → View categories
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### 2. View Data
|
|
233
|
-
|
|
234
|
-
```
|
|
235
|
-
1. list_transactions → Recent transactions
|
|
236
|
-
2. get_month → Monthly budget data
|
|
237
|
-
3. list_payees → Available payees
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
### 3. Create Transaction
|
|
241
|
-
|
|
242
|
-
```
|
|
243
|
-
1. convert_amount → Convert dollars to milliunits
|
|
244
|
-
2. create_transaction → Create the transaction
|
|
245
|
-
3. get_transaction → Verify created transaction
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
### 4. Monitor & Debug
|
|
249
|
-
|
|
250
|
-
```
|
|
251
|
-
1. diagnostic_info → Check system health
|
|
252
|
-
2. clear_cache → Clear if data seems stale
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Error Responses
|
|
258
|
-
|
|
259
|
-
All tools return consistent error formats:
|
|
260
|
-
|
|
261
|
-
```json
|
|
262
|
-
{
|
|
263
|
-
"success": false,
|
|
264
|
-
"error": {
|
|
265
|
-
"code": "ERROR_CODE",
|
|
266
|
-
"message": "Human-readable error message",
|
|
267
|
-
"details": {
|
|
268
|
-
"additional": "context"
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
**Common Error Codes**:
|
|
275
|
-
- `AUTHENTICATION_ERROR` - Invalid or expired token
|
|
276
|
-
- `AUTHORIZATION_ERROR` - Insufficient permissions
|
|
277
|
-
- `VALIDATION_ERROR` - Invalid parameters
|
|
278
|
-
- `RESOURCE_NOT_FOUND` - Budget/account/transaction not found
|
|
279
|
-
- `RATE_LIMIT_EXCEEDED` - Too many requests
|
|
280
|
-
- `OPERATION_FAILED` - General failure
|
|
281
|
-
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## Tool Selection Guide
|
|
285
|
-
|
|
286
|
-
### I want to...
|
|
287
|
-
|
|
288
|
-
**View my budgets**
|
|
289
|
-
→ `list_budgets`, then `set_default_budget`
|
|
290
|
-
|
|
291
|
-
**View account balances**
|
|
292
|
-
→ `list_accounts`
|
|
293
|
-
|
|
294
|
-
**View recent transactions**
|
|
295
|
-
→ `list_transactions` with `since_date`
|
|
296
|
-
|
|
297
|
-
**Create a transaction**
|
|
298
|
-
→ `create_transaction` (convert amount first)
|
|
299
|
-
|
|
300
|
-
**Create split transaction from receipt**
|
|
301
|
-
→ `create_receipt_split_transaction`
|
|
302
|
-
|
|
303
|
-
**Import bank transactions**
|
|
304
|
-
→ `compare_transactions` or `reconcile_account`
|
|
305
|
-
|
|
306
|
-
**View spending by category**
|
|
307
|
-
→ `get_month` with target month
|
|
308
|
-
|
|
309
|
-
**Check system health**
|
|
310
|
-
→ `diagnostic_info`
|
|
311
|
-
|
|
312
|
-
**Troubleshoot cache issues**
|
|
313
|
-
→ `diagnostic_info` then `clear_cache` if needed
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Performance Tips
|
|
318
|
-
|
|
319
|
-
1. **Set Default Budget**: Always call `set_default_budget` first to:
|
|
320
|
-
- Enable automatic budget ID resolution
|
|
321
|
-
- Trigger cache warming for faster subsequent operations
|
|
322
|
-
|
|
323
|
-
2. **Leverage Caching**: Repeated calls to these tools are cached:
|
|
324
|
-
- `list_accounts` - 30 min TTL
|
|
325
|
-
- `list_categories` - 30 min TTL
|
|
326
|
-
- `list_payees` - 30 min TTL
|
|
327
|
-
- `get_month` - 5 min TTL
|
|
328
|
-
|
|
329
|
-
3. **Use Filters**: Narrow results with filters:
|
|
330
|
-
- `list_transactions`: Use `since_date`, `account_id`
|
|
331
|
-
- Reduces response size and improves performance
|
|
332
|
-
|
|
333
|
-
4. **Batch Operations**: For multiple transactions:
|
|
334
|
-
- Use `export_transactions` for bulk reads
|
|
335
|
-
- Process in batches of 5-10 for creates
|
|
336
|
-
|
|
337
|
-
---
|
|
338
|
-
|
|
339
|
-
## Additional Resources
|
|
340
|
-
|
|
341
|
-
- **[Complete API Reference](API.md)** - Detailed documentation with examples
|
|
342
|
-
- **[Development Guide](../guides/DEVELOPMENT.md)** - Common patterns and best practices
|
|
343
|
-
- **[Troubleshooting](TROUBLESHOOTING.md)** - Common issues and solutions
|
|
344
|
-
- **[Examples](EXAMPLES.md)** - Practical usage examples
|
|
345
|
-
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
**Quick Links**: [API Reference](API.md) | [Development Guide](../guides/DEVELOPMENT.md) | [Troubleshooting](TROUBLESHOOTING.md)
|