quantix-mcp 0.5.0 → 0.5.3
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 +12 -1
- package/dist/tools/subscriptions.d.ts.map +1 -1
- package/dist/tools/subscriptions.js +46 -1
- package/dist/tools/subscriptions.js.map +1 -1
- package/dist/tools/transactions.d.ts.map +1 -1
- package/dist/tools/transactions.js +5 -5
- package/dist/tools/transactions.js.map +1 -1
- package/dist/types/schemas.d.ts +17 -0
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +21 -4
- package/dist/types/schemas.js.map +1 -1
- package/package.json +9 -4
- package/.claude/commands/opsx/apply.md +0 -152
- package/.claude/commands/opsx/archive.md +0 -157
- package/.claude/commands/opsx/bulk-archive.md +0 -242
- package/.claude/commands/opsx/continue.md +0 -114
- package/.claude/commands/opsx/explore.md +0 -174
- package/.claude/commands/opsx/ff.md +0 -94
- package/.claude/commands/opsx/new.md +0 -69
- package/.claude/commands/opsx/onboard.md +0 -525
- package/.claude/commands/opsx/sync.md +0 -134
- package/.claude/commands/opsx/verify.md +0 -164
- package/.claude/settings.local.json +0 -9
- package/.claude/skills/openspec-apply-change/SKILL.md +0 -156
- package/.claude/skills/openspec-archive-change/SKILL.md +0 -114
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +0 -246
- package/.claude/skills/openspec-continue-change/SKILL.md +0 -118
- package/.claude/skills/openspec-explore/SKILL.md +0 -290
- package/.claude/skills/openspec-ff-change/SKILL.md +0 -101
- package/.claude/skills/openspec-new-change/SKILL.md +0 -74
- package/.claude/skills/openspec-onboard/SKILL.md +0 -529
- package/.claude/skills/openspec-sync-specs/SKILL.md +0 -138
- package/.claude/skills/openspec-verify-change/SKILL.md +0 -168
- package/.dockerignore +0 -8
- package/.gemini/commands/opsx/apply.toml +0 -149
- package/.gemini/commands/opsx/archive.toml +0 -154
- package/.gemini/commands/opsx/bulk-archive.toml +0 -239
- package/.gemini/commands/opsx/continue.toml +0 -111
- package/.gemini/commands/opsx/explore.toml +0 -171
- package/.gemini/commands/opsx/ff.toml +0 -91
- package/.gemini/commands/opsx/new.toml +0 -66
- package/.gemini/commands/opsx/onboard.toml +0 -522
- package/.gemini/commands/opsx/sync.toml +0 -131
- package/.gemini/commands/opsx/verify.toml +0 -161
- package/.gemini/skills/openspec-apply-change/SKILL.md +0 -156
- package/.gemini/skills/openspec-archive-change/SKILL.md +0 -114
- package/.gemini/skills/openspec-bulk-archive-change/SKILL.md +0 -246
- package/.gemini/skills/openspec-continue-change/SKILL.md +0 -118
- package/.gemini/skills/openspec-explore/SKILL.md +0 -290
- package/.gemini/skills/openspec-ff-change/SKILL.md +0 -101
- package/.gemini/skills/openspec-new-change/SKILL.md +0 -74
- package/.gemini/skills/openspec-onboard/SKILL.md +0 -529
- package/.gemini/skills/openspec-sync-specs/SKILL.md +0 -138
- package/.gemini/skills/openspec-verify-change/SKILL.md +0 -168
- package/.github/agents/copilot-instructions.md +0 -32
- package/.github/agents/speckit.analyze.agent.md +0 -184
- package/.github/agents/speckit.checklist.agent.md +0 -294
- package/.github/agents/speckit.clarify.agent.md +0 -181
- package/.github/agents/speckit.constitution.agent.md +0 -82
- package/.github/agents/speckit.implement.agent.md +0 -135
- package/.github/agents/speckit.plan.agent.md +0 -89
- package/.github/agents/speckit.specify.agent.md +0 -258
- package/.github/agents/speckit.tasks.agent.md +0 -137
- package/.github/agents/speckit.taskstoissues.agent.md +0 -30
- package/.github/copilot-instructions.md +0 -17
- package/.github/prompts/speckit.analyze.prompt.md +0 -3
- package/.github/prompts/speckit.checklist.prompt.md +0 -3
- package/.github/prompts/speckit.clarify.prompt.md +0 -3
- package/.github/prompts/speckit.constitution.prompt.md +0 -3
- package/.github/prompts/speckit.implement.prompt.md +0 -3
- package/.github/prompts/speckit.plan.prompt.md +0 -3
- package/.github/prompts/speckit.specify.prompt.md +0 -3
- package/.github/prompts/speckit.tasks.prompt.md +0 -3
- package/.github/prompts/speckit.taskstoissues.prompt.md +0 -3
- package/.github/workflows/publish.yaml +0 -29
- package/.opencode/command/speckit.analyze.md +0 -184
- package/.opencode/command/speckit.checklist.md +0 -294
- package/.opencode/command/speckit.clarify.md +0 -181
- package/.opencode/command/speckit.constitution.md +0 -84
- package/.opencode/command/speckit.implement.md +0 -135
- package/.opencode/command/speckit.plan.md +0 -89
- package/.opencode/command/speckit.specify.md +0 -258
- package/.opencode/command/speckit.tasks.md +0 -137
- package/.opencode/command/speckit.taskstoissues.md +0 -30
- package/.qwen/commands/opsx-apply.toml +0 -149
- package/.qwen/commands/opsx-archive.toml +0 -154
- package/.qwen/commands/opsx-bulk-archive.toml +0 -239
- package/.qwen/commands/opsx-continue.toml +0 -111
- package/.qwen/commands/opsx-explore.toml +0 -171
- package/.qwen/commands/opsx-ff.toml +0 -91
- package/.qwen/commands/opsx-new.toml +0 -66
- package/.qwen/commands/opsx-onboard.toml +0 -522
- package/.qwen/commands/opsx-sync.toml +0 -131
- package/.qwen/commands/opsx-verify.toml +0 -161
- package/.qwen/skills/openspec-apply-change/SKILL.md +0 -156
- package/.qwen/skills/openspec-archive-change/SKILL.md +0 -114
- package/.qwen/skills/openspec-bulk-archive-change/SKILL.md +0 -246
- package/.qwen/skills/openspec-continue-change/SKILL.md +0 -118
- package/.qwen/skills/openspec-explore/SKILL.md +0 -290
- package/.qwen/skills/openspec-ff-change/SKILL.md +0 -101
- package/.qwen/skills/openspec-new-change/SKILL.md +0 -74
- package/.qwen/skills/openspec-onboard/SKILL.md +0 -529
- package/.qwen/skills/openspec-sync-specs/SKILL.md +0 -138
- package/.qwen/skills/openspec-verify-change/SKILL.md +0 -168
- package/.specify/memory/constitution.md +0 -58
- package/.specify/scripts/powershell/check-prerequisites.ps1 +0 -148
- package/.specify/scripts/powershell/common.ps1 +0 -137
- package/.specify/scripts/powershell/create-new-feature.ps1 +0 -283
- package/.specify/scripts/powershell/setup-plan.ps1 +0 -61
- package/.specify/scripts/powershell/update-agent-context.ps1 +0 -448
- package/.specify/templates/agent-file-template.md +0 -28
- package/.specify/templates/checklist-template.md +0 -40
- package/.specify/templates/constitution-template.md +0 -50
- package/.specify/templates/plan-template.md +0 -104
- package/.specify/templates/spec-template.md +0 -115
- package/.specify/templates/tasks-template.md +0 -251
- package/.vscode/launch.json +0 -14
- package/.vscode/settings.json +0 -14
- package/.vscode/tasks.json +0 -15
- package/AGENTS.md +0 -117
- package/CLAUDE.md +0 -70
- package/Dockerfile +0 -30
- package/GEMINI.md +0 -117
- package/QWEN.md +0 -117
- package/docker-compose.yml +0 -17
- package/openapi.yaml +0 -3127
- package/openspec/README.md +0 -33
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/.openspec.yaml +0 -2
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/design.md +0 -60
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/proposal.md +0 -25
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/specs/credit-card-transactions/spec.md +0 -46
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/specs/transactions/spec.md +0 -42
- package/openspec/changes/archive/2026-04-03-separate-credit-card-transaction-tools/tasks.md +0 -22
- package/openspec/config.yaml +0 -20
- package/openspec/specs/accounts/spec.md +0 -86
- package/openspec/specs/categories/spec.md +0 -78
- package/openspec/specs/credit-card-transactions/spec.md +0 -64
- package/openspec/specs/credit-cards/spec.md +0 -109
- package/openspec/specs/data/spec.md +0 -49
- package/openspec/specs/settings/spec.md +0 -48
- package/openspec/specs/subscriptions/spec.md +0 -85
- package/openspec/specs/summary/spec.md +0 -49
- package/openspec/specs/transactions/spec.md +0 -113
- package/openspec/specs/transfers/spec.md +0 -74
- package/specs/001-mcp-api-integration/checklists/requirements.md +0 -34
- package/specs/001-mcp-api-integration/contracts/openapi.yaml +0 -636
- package/specs/001-mcp-api-integration/data-model.md +0 -106
- package/specs/001-mcp-api-integration/plan.md +0 -73
- package/specs/001-mcp-api-integration/quickstart.md +0 -74
- package/specs/001-mcp-api-integration/research.md +0 -58
- package/specs/001-mcp-api-integration/spec.md +0 -119
- package/specs/001-mcp-api-integration/tasks.md +0 -64
- package/src/config.ts +0 -39
- package/src/index.ts +0 -116
- package/src/services/apiClient.ts +0 -55
- package/src/services/requestContext.ts +0 -11
- package/src/tools/accounts.ts +0 -122
- package/src/tools/categories.ts +0 -102
- package/src/tools/credit-cards.ts +0 -203
- package/src/tools/data.ts +0 -45
- package/src/tools/settings.ts +0 -64
- package/src/tools/subscriptions.ts +0 -159
- package/src/tools/summary.ts +0 -29
- package/src/tools/transactions.ts +0 -200
- package/src/tools/transfers.ts +0 -122
- package/src/types/schemas.ts +0 -333
- package/src/utils/toolHelpers.ts +0 -11
- package/tests/benchmark.test.d.ts +0 -2
- package/tests/benchmark.test.d.ts.map +0 -1
- package/tests/benchmark.test.js +0 -33
- package/tests/benchmark.test.js.map +0 -1
- package/tests/benchmark.test.ts +0 -38
- package/tests/server.test.d.ts +0 -2
- package/tests/server.test.d.ts.map +0 -1
- package/tests/server.test.js +0 -13
- package/tests/server.test.js.map +0 -1
- package/tests/server.test.ts +0 -14
- package/tests/setup.d.ts +0 -4
- package/tests/setup.d.ts.map +0 -1
- package/tests/setup.js +0 -17
- package/tests/setup.js.map +0 -1
- package/tests/setup.ts +0 -20
- package/tests/tools/accounts.test.ts +0 -159
- package/tests/tools/categories.test.d.ts +0 -2
- package/tests/tools/categories.test.d.ts.map +0 -1
- package/tests/tools/categories.test.js +0 -63
- package/tests/tools/categories.test.js.map +0 -1
- package/tests/tools/categories.test.ts +0 -120
- package/tests/tools/credit-cards.test.d.ts +0 -2
- package/tests/tools/credit-cards.test.d.ts.map +0 -1
- package/tests/tools/credit-cards.test.js +0 -71
- package/tests/tools/credit-cards.test.js.map +0 -1
- package/tests/tools/credit-cards.test.ts +0 -131
- package/tests/tools/data.test.ts +0 -100
- package/tests/tools/settings.test.ts +0 -116
- package/tests/tools/subscriptions.test.ts +0 -173
- package/tests/tools/summary.test.d.ts +0 -2
- package/tests/tools/summary.test.d.ts.map +0 -1
- package/tests/tools/summary.test.js +0 -36
- package/tests/tools/summary.test.js.map +0 -1
- package/tests/tools/summary.test.ts +0 -63
- package/tests/tools/transactions.test.d.ts +0 -2
- package/tests/tools/transactions.test.d.ts.map +0 -1
- package/tests/tools/transactions.test.js +0 -67
- package/tests/tools/transactions.test.js.map +0 -1
- package/tests/tools/transactions.test.ts +0 -133
- package/tests/tools/transfers.test.ts +0 -141
- package/tsconfig.json +0 -52
- package/vitest.config.d.ts +0 -3
- package/vitest.config.d.ts.map +0 -1
- package/vitest.config.js +0 -14
- package/vitest.config.js.map +0 -1
- package/vitest.config.ts +0 -14
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { CreateSubscriptionInput, UpdateSubscriptionInput } from '../types/schemas.js';
|
|
4
|
-
import { apiClient } from '../services/apiClient.js';
|
|
5
|
-
import { handleToolError } from '../utils/toolHelpers.js';
|
|
6
|
-
|
|
7
|
-
export function registerSubscriptionTools(server: McpServer) {
|
|
8
|
-
server.registerTool(
|
|
9
|
-
'create_subscription',
|
|
10
|
-
{
|
|
11
|
-
title: 'Create Subscription',
|
|
12
|
-
description: 'Create a new subscription (recurring payment on a credit card)',
|
|
13
|
-
inputSchema: CreateSubscriptionInput
|
|
14
|
-
},
|
|
15
|
-
async (args) => {
|
|
16
|
-
try {
|
|
17
|
-
const subscription = await apiClient.post('/subscriptions', args);
|
|
18
|
-
return {
|
|
19
|
-
content: [{ type: 'text', text: `Subscription created: ${JSON.stringify(subscription, null, 2)}` }]
|
|
20
|
-
};
|
|
21
|
-
} catch (error) {
|
|
22
|
-
return handleToolError(error);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
server.registerTool(
|
|
28
|
-
'get_subscriptions',
|
|
29
|
-
{
|
|
30
|
-
title: 'Get Subscriptions',
|
|
31
|
-
description: 'List all subscriptions',
|
|
32
|
-
inputSchema: z.object({})
|
|
33
|
-
},
|
|
34
|
-
async () => {
|
|
35
|
-
try {
|
|
36
|
-
const subscriptions = await apiClient.get('/subscriptions');
|
|
37
|
-
return {
|
|
38
|
-
content: [{ type: 'text', text: `Subscriptions: ${JSON.stringify(subscriptions, null, 2)}` }]
|
|
39
|
-
};
|
|
40
|
-
} catch (error) {
|
|
41
|
-
return handleToolError(error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
server.registerTool(
|
|
47
|
-
'get_active_subscriptions',
|
|
48
|
-
{
|
|
49
|
-
title: 'Get Active Subscriptions',
|
|
50
|
-
description: 'List all active subscriptions',
|
|
51
|
-
inputSchema: z.object({})
|
|
52
|
-
},
|
|
53
|
-
async () => {
|
|
54
|
-
try {
|
|
55
|
-
const subscriptions = await apiClient.get('/subscriptions/active');
|
|
56
|
-
return {
|
|
57
|
-
content: [{ type: 'text', text: `Active subscriptions: ${JSON.stringify(subscriptions, null, 2)}` }]
|
|
58
|
-
};
|
|
59
|
-
} catch (error) {
|
|
60
|
-
return handleToolError(error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
server.registerTool(
|
|
66
|
-
'get_subscription',
|
|
67
|
-
{
|
|
68
|
-
title: 'Get Subscription',
|
|
69
|
-
description: 'Get a subscription by ID',
|
|
70
|
-
inputSchema: z.object({ id: z.string() })
|
|
71
|
-
},
|
|
72
|
-
async ({ id }) => {
|
|
73
|
-
try {
|
|
74
|
-
const subscription = await apiClient.get(`/subscriptions/${id}`);
|
|
75
|
-
return {
|
|
76
|
-
content: [{ type: 'text', text: `Subscription: ${JSON.stringify(subscription, null, 2)}` }]
|
|
77
|
-
};
|
|
78
|
-
} catch (error) {
|
|
79
|
-
return handleToolError(error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
server.registerTool(
|
|
85
|
-
'update_subscription',
|
|
86
|
-
{
|
|
87
|
-
title: 'Update Subscription',
|
|
88
|
-
description: 'Update a subscription',
|
|
89
|
-
inputSchema: UpdateSubscriptionInput
|
|
90
|
-
},
|
|
91
|
-
async ({ id, ...data }) => {
|
|
92
|
-
try {
|
|
93
|
-
const subscription = await apiClient.patch(`/subscriptions/${id}`, data);
|
|
94
|
-
return {
|
|
95
|
-
content: [{ type: 'text', text: `Subscription updated: ${JSON.stringify(subscription, null, 2)}` }]
|
|
96
|
-
};
|
|
97
|
-
} catch (error) {
|
|
98
|
-
return handleToolError(error);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
server.registerTool(
|
|
104
|
-
'deactivate_subscription',
|
|
105
|
-
{
|
|
106
|
-
title: 'Deactivate Subscription',
|
|
107
|
-
description: 'Deactivate a subscription (soft delete)',
|
|
108
|
-
inputSchema: z.object({ id: z.string() })
|
|
109
|
-
},
|
|
110
|
-
async ({ id }) => {
|
|
111
|
-
try {
|
|
112
|
-
const result = await apiClient.delete(`/subscriptions/${id}`);
|
|
113
|
-
return {
|
|
114
|
-
content: [{ type: 'text', text: `Subscription deactivated: ${JSON.stringify(result, null, 2)}` }]
|
|
115
|
-
};
|
|
116
|
-
} catch (error) {
|
|
117
|
-
return handleToolError(error);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
server.registerTool(
|
|
123
|
-
'delete_subscription_permanent',
|
|
124
|
-
{
|
|
125
|
-
title: 'Delete Subscription Permanently',
|
|
126
|
-
description: 'Permanently delete a subscription',
|
|
127
|
-
inputSchema: z.object({ id: z.string() })
|
|
128
|
-
},
|
|
129
|
-
async ({ id }) => {
|
|
130
|
-
try {
|
|
131
|
-
const result = await apiClient.delete(`/subscriptions/${id}/permanent`);
|
|
132
|
-
return {
|
|
133
|
-
content: [{ type: 'text', text: `Subscription permanently deleted: ${JSON.stringify(result, null, 2)}` }]
|
|
134
|
-
};
|
|
135
|
-
} catch (error) {
|
|
136
|
-
return handleToolError(error);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
server.registerTool(
|
|
142
|
-
'reactivate_subscription',
|
|
143
|
-
{
|
|
144
|
-
title: 'Reactivate Subscription',
|
|
145
|
-
description: 'Reactivate a deactivated subscription',
|
|
146
|
-
inputSchema: z.object({ id: z.string() })
|
|
147
|
-
},
|
|
148
|
-
async ({ id }) => {
|
|
149
|
-
try {
|
|
150
|
-
const subscription = await apiClient.patch(`/subscriptions/${id}/reactivate`, {});
|
|
151
|
-
return {
|
|
152
|
-
content: [{ type: 'text', text: `Subscription reactivated: ${JSON.stringify(subscription, null, 2)}` }]
|
|
153
|
-
};
|
|
154
|
-
} catch (error) {
|
|
155
|
-
return handleToolError(error);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
}
|
package/src/tools/summary.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { GetSummaryInput } from '../types/schemas.js';
|
|
3
|
-
import { apiClient } from '../services/apiClient.js';
|
|
4
|
-
import { handleToolError } from '../utils/toolHelpers.js';
|
|
5
|
-
|
|
6
|
-
export function registerSummaryTools(server: McpServer) {
|
|
7
|
-
server.registerTool(
|
|
8
|
-
'get_summary',
|
|
9
|
-
{
|
|
10
|
-
title: 'Get Financial Summary',
|
|
11
|
-
description: 'Get financial summary (income, expenses, balance, credit cards, category breakdowns). Provide either month (YYYY-MM) or startDate+endDate (YYYY-MM-DD).',
|
|
12
|
-
inputSchema: GetSummaryInput
|
|
13
|
-
},
|
|
14
|
-
async ({ month, startDate, endDate }) => {
|
|
15
|
-
try {
|
|
16
|
-
const params = new URLSearchParams();
|
|
17
|
-
if (month) params.append('month', month);
|
|
18
|
-
if (startDate) params.append('startDate', startDate);
|
|
19
|
-
if (endDate) params.append('endDate', endDate);
|
|
20
|
-
const summary = await apiClient.get(`/summary?${params.toString()}`);
|
|
21
|
-
return {
|
|
22
|
-
content: [{ type: 'text', text: `Summary: ${JSON.stringify(summary, null, 2)}` }]
|
|
23
|
-
};
|
|
24
|
-
} catch (error) {
|
|
25
|
-
return handleToolError(error);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
CreateTransactionInput,
|
|
5
|
-
GetTransactionsInput,
|
|
6
|
-
UpdateTransactionInput,
|
|
7
|
-
CreateCreditCardTransactionInput,
|
|
8
|
-
UpdateCreditCardTransactionInput
|
|
9
|
-
} from '../types/schemas.js';
|
|
10
|
-
import { apiClient } from '../services/apiClient.js';
|
|
11
|
-
import { handleToolError } from '../utils/toolHelpers.js';
|
|
12
|
-
|
|
13
|
-
export function registerTransactionTools(server: McpServer) {
|
|
14
|
-
server.registerTool(
|
|
15
|
-
'create_transaction',
|
|
16
|
-
{
|
|
17
|
-
title: 'Create Transaction',
|
|
18
|
-
description: 'Record a new income or expense using direct payment methods (CASH, PIX, or DEBIT only). For credit card purchases, use create_credit_transaction instead.',
|
|
19
|
-
inputSchema: CreateTransactionInput
|
|
20
|
-
},
|
|
21
|
-
async (args) => {
|
|
22
|
-
try {
|
|
23
|
-
const transaction = await apiClient.post('/transactions', args);
|
|
24
|
-
return {
|
|
25
|
-
content: [{ type: 'text', text: `Transaction created: ${JSON.stringify(transaction, null, 2)}` }]
|
|
26
|
-
};
|
|
27
|
-
} catch (error) {
|
|
28
|
-
return handleToolError(error);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
server.registerTool(
|
|
34
|
-
'get_transactions',
|
|
35
|
-
{
|
|
36
|
-
title: 'Get Transactions',
|
|
37
|
-
description: 'List transactions with optional filters (month, date range, account, category, credit card, type, paid status)',
|
|
38
|
-
inputSchema: GetTransactionsInput
|
|
39
|
-
},
|
|
40
|
-
async (args) => {
|
|
41
|
-
try {
|
|
42
|
-
const params = new URLSearchParams();
|
|
43
|
-
if (args.month) params.append('month', args.month);
|
|
44
|
-
if (args.accountId) params.append('accountId', args.accountId);
|
|
45
|
-
if (args.categoryId) params.append('categoryId', args.categoryId);
|
|
46
|
-
if (args.creditCardId) params.append('creditCardId', args.creditCardId);
|
|
47
|
-
if (args.type) params.append('type', args.type);
|
|
48
|
-
if (args.startDate) params.append('startDate', args.startDate);
|
|
49
|
-
if (args.endDate) params.append('endDate', args.endDate);
|
|
50
|
-
if (args.paid !== undefined) params.append('paid', String(args.paid));
|
|
51
|
-
const qs = params.toString();
|
|
52
|
-
const url = qs ? `/transactions?${qs}` : '/transactions';
|
|
53
|
-
const transactions = await apiClient.get(url);
|
|
54
|
-
return {
|
|
55
|
-
content: [{ type: 'text', text: `Transactions: ${JSON.stringify(transactions, null, 2)}` }]
|
|
56
|
-
};
|
|
57
|
-
} catch (error) {
|
|
58
|
-
return handleToolError(error);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
server.registerTool(
|
|
64
|
-
'get_transaction',
|
|
65
|
-
{
|
|
66
|
-
title: 'Get Transaction',
|
|
67
|
-
description: 'Get a transaction by ID',
|
|
68
|
-
inputSchema: z.object({ id: z.string().describe("Transaction ID") })
|
|
69
|
-
},
|
|
70
|
-
async ({ id }) => {
|
|
71
|
-
try {
|
|
72
|
-
const transaction = await apiClient.get(`/transactions/${id}`);
|
|
73
|
-
return {
|
|
74
|
-
content: [{ type: 'text', text: `Transaction: ${JSON.stringify(transaction, null, 2)}` }]
|
|
75
|
-
};
|
|
76
|
-
} catch (error) {
|
|
77
|
-
return handleToolError(error);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
server.registerTool(
|
|
83
|
-
'update_transaction',
|
|
84
|
-
{
|
|
85
|
-
title: 'Update Transaction',
|
|
86
|
-
description: 'Update a transaction using direct payment methods (CASH, PIX, or DEBIT only). For credit card transactions, use update_credit_transaction instead.',
|
|
87
|
-
inputSchema: UpdateTransactionInput
|
|
88
|
-
},
|
|
89
|
-
async ({ id, mode, ...data }) => {
|
|
90
|
-
try {
|
|
91
|
-
const url = mode ? `/transactions/${id}?mode=${mode}` : `/transactions/${id}`;
|
|
92
|
-
const transaction = await apiClient.patch(url, data);
|
|
93
|
-
return {
|
|
94
|
-
content: [{ type: 'text', text: `Transaction updated: ${JSON.stringify(transaction, null, 2)}` }]
|
|
95
|
-
};
|
|
96
|
-
} catch (error) {
|
|
97
|
-
return handleToolError(error);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
server.registerTool(
|
|
103
|
-
'pay_transaction',
|
|
104
|
-
{
|
|
105
|
-
title: 'Pay Transaction',
|
|
106
|
-
description: 'Mark a transaction as paid/received',
|
|
107
|
-
inputSchema: z.object({ id: z.string().describe("Transaction ID") })
|
|
108
|
-
},
|
|
109
|
-
async ({ id }) => {
|
|
110
|
-
try {
|
|
111
|
-
const transaction = await apiClient.patch(`/transactions/${id}/pay`);
|
|
112
|
-
return {
|
|
113
|
-
content: [{ type: 'text', text: `Transaction marked as paid: ${JSON.stringify(transaction, null, 2)}` }]
|
|
114
|
-
};
|
|
115
|
-
} catch (error) {
|
|
116
|
-
return handleToolError(error);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
server.registerTool(
|
|
122
|
-
'unpay_transaction',
|
|
123
|
-
{
|
|
124
|
-
title: 'Unpay Transaction',
|
|
125
|
-
description: 'Mark a transaction as unpaid',
|
|
126
|
-
inputSchema: z.object({ id: z.string().describe("Transaction ID") })
|
|
127
|
-
},
|
|
128
|
-
async ({ id }) => {
|
|
129
|
-
try {
|
|
130
|
-
const transaction = await apiClient.patch(`/transactions/${id}/unpay`);
|
|
131
|
-
return {
|
|
132
|
-
content: [{ type: 'text', text: `Transaction marked as unpaid: ${JSON.stringify(transaction, null, 2)}` }]
|
|
133
|
-
};
|
|
134
|
-
} catch (error) {
|
|
135
|
-
return handleToolError(error);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
server.registerTool(
|
|
141
|
-
'delete_transaction',
|
|
142
|
-
{
|
|
143
|
-
title: 'Delete Transaction',
|
|
144
|
-
description: 'Delete a transaction by ID',
|
|
145
|
-
inputSchema: z.object({
|
|
146
|
-
id: z.string().describe("Transaction ID"),
|
|
147
|
-
mode: z.enum(["SINGLE", "PENDING", "ALL"]).default("SINGLE").optional()
|
|
148
|
-
})
|
|
149
|
-
},
|
|
150
|
-
async ({ id, mode }) => {
|
|
151
|
-
try {
|
|
152
|
-
const url = mode ? `/transactions/${id}?mode=${mode}` : `/transactions/${id}`;
|
|
153
|
-
await apiClient.delete(url);
|
|
154
|
-
return {
|
|
155
|
-
content: [{ type: 'text', text: `Transaction ${id} deleted.` }]
|
|
156
|
-
};
|
|
157
|
-
} catch (error) {
|
|
158
|
-
return handleToolError(error);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
|
|
163
|
-
server.registerTool(
|
|
164
|
-
'create_credit_transaction',
|
|
165
|
-
{
|
|
166
|
-
title: 'Create Credit Card Transaction',
|
|
167
|
-
description: 'Record a new credit card purchase. The due date is automatically calculated based on the purchase date and the card closing day. Use targetDueMonth to specify a particular billing month.',
|
|
168
|
-
inputSchema: CreateCreditCardTransactionInput
|
|
169
|
-
},
|
|
170
|
-
async (args) => {
|
|
171
|
-
try {
|
|
172
|
-
const transaction = await apiClient.post('/transactions/credit', args);
|
|
173
|
-
return {
|
|
174
|
-
content: [{ type: 'text', text: `Credit card transaction created: ${JSON.stringify(transaction, null, 2)}` }]
|
|
175
|
-
};
|
|
176
|
-
} catch (error) {
|
|
177
|
-
return handleToolError(error);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
|
|
182
|
-
server.registerTool(
|
|
183
|
-
'update_credit_transaction',
|
|
184
|
-
{
|
|
185
|
-
title: 'Update Credit Card Transaction',
|
|
186
|
-
description: 'Update a credit card transaction. If purchaseDate or targetDueMonth is changed, the due date is recalculated.',
|
|
187
|
-
inputSchema: UpdateCreditCardTransactionInput
|
|
188
|
-
},
|
|
189
|
-
async ({ id, ...data }) => {
|
|
190
|
-
try {
|
|
191
|
-
const transaction = await apiClient.patch(`/transactions/credit/${id}`, data);
|
|
192
|
-
return {
|
|
193
|
-
content: [{ type: 'text', text: `Credit card transaction updated: ${JSON.stringify(transaction, null, 2)}` }]
|
|
194
|
-
};
|
|
195
|
-
} catch (error) {
|
|
196
|
-
return handleToolError(error);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
}
|
package/src/tools/transfers.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
// MCP tools for /transfers endpoints
|
|
2
|
-
// Auto-generated, Feb 2026
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import { apiClient } from '../services/apiClient.js';
|
|
6
|
-
import { TransferSchema, CreateTransferRequestSchema, UpdateTransferRequestSchema } from '../types/schemas.js';
|
|
7
|
-
import { handleToolError } from '../utils/toolHelpers.js';
|
|
8
|
-
|
|
9
|
-
export function registerTransferTools(server: McpServer) {
|
|
10
|
-
// Create transfer
|
|
11
|
-
server.registerTool(
|
|
12
|
-
'create_transfer',
|
|
13
|
-
{
|
|
14
|
-
title: 'Create Transfer',
|
|
15
|
-
description: 'Create a new transfer between accounts',
|
|
16
|
-
inputSchema: CreateTransferRequestSchema
|
|
17
|
-
},
|
|
18
|
-
async (input: z.infer<typeof CreateTransferRequestSchema>) => {
|
|
19
|
-
try {
|
|
20
|
-
const transfer = await apiClient.post('/transfers', input);
|
|
21
|
-
return {
|
|
22
|
-
content: [{ type: 'text', text: `Transfer created: ${JSON.stringify(transfer, null, 2)}` }]
|
|
23
|
-
};
|
|
24
|
-
} catch (error) {
|
|
25
|
-
return handleToolError(error);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
// List transfers
|
|
31
|
-
server.registerTool(
|
|
32
|
-
'get_transfers',
|
|
33
|
-
{
|
|
34
|
-
title: 'Get Transfers',
|
|
35
|
-
description: 'List transfers with optional filters',
|
|
36
|
-
inputSchema: z.object({
|
|
37
|
-
accountId: z.string().optional(),
|
|
38
|
-
month: z.string().regex(/^\d{4}-\d{2}$/).optional(),
|
|
39
|
-
startDate: z.string().optional(),
|
|
40
|
-
endDate: z.string().optional(),
|
|
41
|
-
})
|
|
42
|
-
},
|
|
43
|
-
async (input: { accountId?: string | undefined; month?: string | undefined; startDate?: string | undefined; endDate?: string | undefined }) => {
|
|
44
|
-
try {
|
|
45
|
-
const params = new URLSearchParams();
|
|
46
|
-
if (input.accountId) params.append('accountId', input.accountId);
|
|
47
|
-
if (input.month) params.append('month', input.month);
|
|
48
|
-
if (input.startDate) params.append('startDate', input.startDate);
|
|
49
|
-
if (input.endDate) params.append('endDate', input.endDate);
|
|
50
|
-
const qs = params.toString();
|
|
51
|
-
const url = qs ? `/transfers?${qs}` : '/transfers';
|
|
52
|
-
const transfers = await apiClient.get(url);
|
|
53
|
-
return {
|
|
54
|
-
content: [{ type: 'text', text: `Transfers: ${JSON.stringify(transfers, null, 2)}` }]
|
|
55
|
-
};
|
|
56
|
-
} catch (error) {
|
|
57
|
-
return handleToolError(error);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
// Get transfer by ID
|
|
63
|
-
server.registerTool(
|
|
64
|
-
'get_transfer',
|
|
65
|
-
{
|
|
66
|
-
title: 'Get Transfer',
|
|
67
|
-
description: 'Get a transfer by ID',
|
|
68
|
-
inputSchema: z.object({ id: z.string() })
|
|
69
|
-
},
|
|
70
|
-
async (input: { id: string }) => {
|
|
71
|
-
try {
|
|
72
|
-
const transfer = await apiClient.get(`/transfers/${input.id}`);
|
|
73
|
-
return {
|
|
74
|
-
content: [{ type: 'text', text: `Transfer: ${JSON.stringify(transfer, null, 2)}` }]
|
|
75
|
-
};
|
|
76
|
-
} catch (error) {
|
|
77
|
-
return handleToolError(error);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
// Update transfer
|
|
83
|
-
server.registerTool(
|
|
84
|
-
'update_transfer',
|
|
85
|
-
{
|
|
86
|
-
title: 'Update Transfer',
|
|
87
|
-
description: 'Update a transfer',
|
|
88
|
-
inputSchema: z.object({ id: z.string() }).merge(UpdateTransferRequestSchema)
|
|
89
|
-
},
|
|
90
|
-
async (input: { id: string } & z.infer<typeof UpdateTransferRequestSchema>) => {
|
|
91
|
-
try {
|
|
92
|
-
const { id, ...body } = input;
|
|
93
|
-
const transfer = await apiClient.patch(`/transfers/${id}`, body);
|
|
94
|
-
return {
|
|
95
|
-
content: [{ type: 'text', text: `Transfer updated: ${JSON.stringify(transfer, null, 2)}` }]
|
|
96
|
-
};
|
|
97
|
-
} catch (error) {
|
|
98
|
-
return handleToolError(error);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
// Delete transfer
|
|
104
|
-
server.registerTool(
|
|
105
|
-
'delete_transfer',
|
|
106
|
-
{
|
|
107
|
-
title: 'Delete Transfer',
|
|
108
|
-
description: 'Delete a transfer',
|
|
109
|
-
inputSchema: z.object({ id: z.string() })
|
|
110
|
-
},
|
|
111
|
-
async (input: { id: string }) => {
|
|
112
|
-
try {
|
|
113
|
-
await apiClient.delete(`/transfers/${input.id}`);
|
|
114
|
-
return {
|
|
115
|
-
content: [{ type: 'text', text: `Transfer deleted: ${input.id}` }]
|
|
116
|
-
};
|
|
117
|
-
} catch (error) {
|
|
118
|
-
return handleToolError(error);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
}
|