@codemill-solutions/yuki-mcp 1.0.1 → 1.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/README.md CHANGED
@@ -89,13 +89,14 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
89
89
 
90
90
  ---
91
91
 
92
- ## Available tools
92
+ ## Available tools (29)
93
93
 
94
94
  ### Administrations
95
95
 
96
96
  | Tool | Description |
97
97
  |------|-------------|
98
98
  | `get_administrations` | List all administrations (companies) for this API key. **Run this first** to find the correct `administrationId`. |
99
+ | `get_administration_id` | Look up an administration's GUID by its exact name. Useful when you know the name but not the GUID. |
99
100
 
100
101
  ### Relations
101
102
 
@@ -130,7 +131,21 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
130
131
 
131
132
  | Tool | Key parameters | Description |
132
133
  |------|----------------|-------------|
133
- | `get_gl_accounts` | `date?` | Retrieve all GL accounts with their balance at a given date. Use this to find bank account codes before calling `get_transactions`. |
134
+ | `get_gl_accounts` | `date?` | Retrieve all GL accounts with their balance at a given date (commercial view). Use this to find account codes before calling `get_transactions`. |
135
+ | `get_gl_accounts_fiscal` | `date?` | Same as `get_gl_accounts` but including fiscal corrections. Use for balance sheets and P&L views that must match Yuki's fiscal reports. |
136
+ | `get_net_revenue` | `startDate`, `endDate`, `fiscal?` | Retrieve net revenue (netto-omzet) for a date range. Set `fiscal=true` to include fiscal corrections. |
137
+
138
+ ### Accounting info
139
+
140
+ Richer read-only views from the `AccountingInfo.asmx` service — not available through the standard `Accounting.asmx`.
141
+
142
+ | Tool | Key parameters | Description |
143
+ |------|----------------|-------------|
144
+ | `get_gl_account_scheme` | — | Retrieve the complete GL account scheme (rekeningschema): all codes with type, subtype, description, and active/inactive status. Use to validate GL codes or build account pickers. |
145
+ | `get_period_table` | `yearId` | Retrieve the fiscal period table for a year: period numbers, names, and date ranges. Use to translate transaction dates into human-readable period names for reports. |
146
+ | `get_gl_transactions_detailed` | `startDate`, `endDate`, `glAccountCode?`, `financialMode?` | Detailed transaction listing with document type, archive folder, fiscal period ID, project code, and mutation user. More complete than `get_transactions`. Leave `glAccountCode` empty for all accounts. |
147
+ | `get_transaction_document` | `transactionId` | Download the source PDF for a booked transaction as base64. Use the `id` or `hID` from `get_gl_transactions_detailed`. |
148
+ | `get_start_balances` | `yearId`, `financialMode?` | Retrieve opening balances (beginbalansen) per GL account for a fiscal year. |
134
149
 
135
150
  ### Documents
136
151
 
@@ -139,6 +154,18 @@ Add to your MCP host configuration (e.g. `claude_desktop_config.json`):
139
154
  | `upload_document` | `fileName`, `dataBase64`, `folder?`, `amount?` | Upload a PDF to the Yuki archive by passing its content as a base64 string. Use `get_document_folders` first to find the right folder ID. |
140
155
  | `upload_document_from_path` | `filePath`, `fileName?`, `folder?`, `amount?` | Upload a PDF from a local file path. Reads and encodes the file internally — preferred over `upload_document` when the file is available on disk. Validates that the file exists and is a valid PDF before uploading. |
141
156
  | `get_document_folders` | — | List all archive folders available in the administration. |
157
+ | `list_documents` | `folderId` | List documents in a specific archive folder. Returns document IDs, file names, dates, and amounts. |
158
+ | `search_documents` | `searchText` | Full-text search across all archived documents (file names, amounts, OCR content). |
159
+ | `get_document` | `documentId` | Retrieve metadata for a single archived document by its ID (name, folder, date, amount, status). |
160
+ | `download_document` | `documentId` | Download an archived document as a base64-encoded string. |
161
+ | `get_cost_categories` | — | List available GL cost categories for use as the `costCategory` parameter in upload tools. |
162
+
163
+ ### Backoffice
164
+
165
+ | Tool | Key parameters | Description |
166
+ |------|----------------|-------------|
167
+ | `get_workflow` | `administrationId?` | Retrieve backoffice workflow items — documents that could not be processed automatically and are awaiting review by the accountant. |
168
+ | `get_outstanding_questions` | `administrationId?` | Retrieve outstanding questions raised by the accountant that require a response before the related documents can be processed. |
142
169
 
143
170
  ---
144
171
 
@@ -181,19 +208,25 @@ Available scenarios: `get-administrations`, `search-relations`, `outstanding-inv
181
208
 
182
209
  ```
183
210
  src/
184
- ├── index.ts # Entry point — loads env, registers tools, starts stdio transport
185
- ├── yuki-client.ts # SOAP client: envelope builder, axios HTTP, fast-xml-parser, XmlValue
211
+ ├── index.ts # Entry point — loads env, registers tools, starts stdio transport
212
+ ├── yuki-client.ts # SOAP client: envelope builder, axios HTTP, fast-xml-parser, XmlValue
186
213
  └── tools/
187
- ├── administrations.ts # get_administrations
188
- ├── relations.ts # search_relations, upsert_contact
189
- ├── invoices.ts # get_sales_invoices, get_purchase_invoices,
190
- # process_sales_invoice, process_purchase_invoice
191
- ├── transactions.ts # get_transactions, get_transaction_details, process_journal
192
- ├── accounting.ts # get_gl_accounts
193
- └── documents.ts # upload_document, upload_document_from_path, get_document_folders
214
+ ├── administrations.ts # get_administrations, get_administration_id
215
+ ├── relations.ts # search_relations, upsert_contact
216
+ ├── invoices.ts # get_sales_invoices, get_purchase_invoices,
217
+ # process_sales_invoice, process_purchase_invoice
218
+ ├── transactions.ts # get_transactions, get_transaction_details, process_journal
219
+ ├── accounting.ts # get_gl_accounts, get_gl_accounts_fiscal, get_net_revenue
220
+ ├── accounting-info.ts # get_gl_account_scheme, get_period_table,
221
+ │ # get_gl_transactions_detailed, get_transaction_document,
222
+ │ # get_start_balances
223
+ ├── documents.ts # upload_document, upload_document_from_path,
224
+ │ # get_document_folders, list_documents, search_documents,
225
+ │ # get_document, download_document, get_cost_categories
226
+ └── backoffice.ts # get_workflow, get_outstanding_questions
194
227
 
195
228
  scripts/
196
- └── test-agent.ts # Agent test harness (Claude + MCP client loop)
229
+ └── test-agent.ts # Agent test harness (Claude + MCP client loop)
197
230
  ```
198
231
 
199
232
  ### Auth flow
@@ -205,7 +238,7 @@ Yuki uses a two-step authentication pattern:
205
238
 
206
239
  `YukiClient.getSessionID()` handles this transparently and caches the session for the lifetime of the process.
207
240
 
208
- > **Note:** Parameter casing differs across Yuki's services — `sessionId` (lowercase d) on `Sales.asmx` and `Purchase.asmx`; `sessionID` (uppercase D) on `Accounting.asmx`, `Contact.asmx`, and `Archive.asmx`. This is handled per-tool.
241
+ > **Note:** Parameter casing differs across Yuki's services — `sessionId` (lowercase d) on `Sales.asmx` and `Purchase.asmx`; `sessionID` (uppercase D) on `Accounting.asmx`, `AccountingInfo.asmx`, `Contact.asmx`, and `Archive.asmx`. This is handled per-tool.
209
242
 
210
243
  ### XML documents
211
244
 
@@ -215,7 +248,7 @@ Write tools (`process_sales_invoice`, `process_purchase_invoice`, `process_journ
215
248
 
216
249
  ## Rate limits
217
250
 
218
- Yuki enforces **1,000 API requests per day**. Each tool call is 1 request. The session ID is cached so `Authenticate` is only called once per server process, not once per tool call.
251
+ Yuki enforces **1,000 API requests per day** (upgradeable to 5,000–10,000). Each tool call is 1 request. The session ID is cached so `Authenticate` is only called once per server process, not once per tool call.
219
252
 
220
253
  Design agent workflows to fetch broad lists once and reference them from the agent's context window rather than re-fetching on every step.
221
254
 
@@ -235,6 +268,25 @@ Design agent workflows to fetch broad lists once and reference them from the age
235
268
 
236
269
  ---
237
270
 
271
+ ## About CodeMill Solutions
272
+
273
+ [CodeMill Solutions](https://codemill.dev/en/) is a Dutch software company based in the Netherlands. We build smart, scalable, and customized solutions that help organizations grow, optimize processes, and realize their digital ambitions.
274
+
275
+ Our services include:
276
+
277
+ - **Custom applications** — portals, dashboards, business software, and fully tailored platforms that truly add value.
278
+ - **API integrations** — connecting your application with other systems and external platforms via smart API connections.
279
+ - **Mobile apps** — iOS and Android apps as a logical extension of your web application(s).
280
+
281
+ `yuki-mcp` is one of our open-source integrations, making Yuki's accounting platform accessible to AI agents through the Model Context Protocol.
282
+
283
+ 📧 [info@codemill.dev](mailto:info@codemill.dev)
284
+ 🌐 [codemill.dev](https://codemill.dev/en/)
285
+ 💼 [LinkedIn](https://www.linkedin.com/company/codemill-solutions/)
286
+ 🐙 [GitHub](https://github.com/CodeMill-Solutions)
287
+
288
+ ---
289
+
238
290
  ## License
239
291
 
240
292
  MIT — see [LICENSE](./LICENSE).
package/dist/index.js CHANGED
@@ -3,16 +3,19 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { YukiClient } from './yuki-client.js';
5
5
  // Read tools
6
- import { registerAdministrationTools } from './tools/administrations.js';
6
+ import { registerAdministrationTools, registerAdministrationLookupTools } from './tools/administrations.js';
7
7
  import { registerRelationTools } from './tools/relations.js';
8
8
  import { registerInvoiceTools } from './tools/invoices.js';
9
9
  import { registerTransactionTools } from './tools/transactions.js';
10
- import { registerAccountingTools } from './tools/accounting.js';
10
+ import { registerAccountingTools, registerAccountingExtendedTools } from './tools/accounting.js';
11
+ import { registerAccountingInfoTools } from './tools/accounting-info.js';
11
12
  // Write tools
12
13
  import { registerInvoiceWriteTools } from './tools/invoices.js';
13
14
  import { registerJournalWriteTools } from './tools/transactions.js';
14
15
  import { registerContactWriteTools } from './tools/relations.js';
15
16
  import { registerDocumentTools } from './tools/documents.js';
17
+ // Backoffice tools
18
+ import { registerBackofficeTools } from './tools/backoffice.js';
16
19
  // ── Environment validation ────────────────────────────────────────────────────
17
20
  const apiKey = process.env['YUKI_API_KEY'];
18
21
  const domainId = process.env['YUKI_DOMAIN_ID'] ?? '';
@@ -27,23 +30,28 @@ const yukiClient = new YukiClient(apiKey, domainId);
27
30
  // ── MCP server ────────────────────────────────────────────────────────────────
28
31
  const server = new McpServer({
29
32
  name: 'yuki-mcp',
30
- version: '1.0.0',
33
+ version: '1.2.0',
31
34
  });
32
35
  // ── Read tools ────────────────────────────────────────────────────────────────
33
36
  registerAdministrationTools(server, yukiClient);
37
+ registerAdministrationLookupTools(server, yukiClient);
34
38
  registerRelationTools(server, yukiClient);
35
39
  registerInvoiceTools(server, yukiClient);
36
40
  registerTransactionTools(server, yukiClient);
37
41
  registerAccountingTools(server, yukiClient);
42
+ registerAccountingExtendedTools(server, yukiClient);
43
+ registerAccountingInfoTools(server, yukiClient);
38
44
  // ── Write tools ───────────────────────────────────────────────────────────────
39
45
  registerInvoiceWriteTools(server, yukiClient);
40
46
  registerJournalWriteTools(server, yukiClient);
41
47
  registerContactWriteTools(server, yukiClient);
42
48
  registerDocumentTools(server, yukiClient);
49
+ // ── Backoffice tools ──────────────────────────────────────────────────────────
50
+ registerBackofficeTools(server, yukiClient);
43
51
  // ── Start ─────────────────────────────────────────────────────────────────────
44
52
  const transport = new StdioServerTransport();
45
53
  await server.connect(transport);
46
54
  // Log startup info to stderr only (stdout is reserved for JSON-RPC)
47
- process.stderr.write(`[yuki-mcp] Server started — 14 tools registered. ` +
55
+ process.stderr.write(`[yuki-mcp] Server started — 29 tools registered. ` +
48
56
  `Domain ID: ${domainId || '(none — run get_administrations to discover)'}\n`);
49
57
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,aAAa;AACb,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,cAAc;AACd,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,iFAAiF;A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E,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { YukiClient } from '../yuki-client.js';
3
+ /**
4
+ * Register tools for the Yuki AccountingInfo service.
5
+ *
6
+ * AccountingInfo.asmx provides richer read-only views of accounting data
7
+ * that are not available through the main Accounting.asmx service:
8
+ *
9
+ * - Full GL account scheme (codes, types, subtypes, active/inactive)
10
+ * - Fiscal period table (period names and date ranges per year)
11
+ * - Detailed transaction listing (includes document type, folder, period, project)
12
+ * - Transaction document download (retrieve the source PDF as base64)
13
+ * - Opening balances per GL account per fiscal year
14
+ *
15
+ * Yuki service: AccountingInfo.asmx
16
+ * Note: uses sessionID / administrationID (uppercase D), same as Accounting.asmx.
17
+ */
18
+ export declare function registerAccountingInfoTools(server: McpServer, client: YukiClient): void;
19
+ //# sourceMappingURL=accounting-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounting-info.d.ts","sourceRoot":"","sources":["../../src/tools/accounting-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAsXvF"}
@@ -0,0 +1,366 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Register tools for the Yuki AccountingInfo service.
4
+ *
5
+ * AccountingInfo.asmx provides richer read-only views of accounting data
6
+ * that are not available through the main Accounting.asmx service:
7
+ *
8
+ * - Full GL account scheme (codes, types, subtypes, active/inactive)
9
+ * - Fiscal period table (period names and date ranges per year)
10
+ * - Detailed transaction listing (includes document type, folder, period, project)
11
+ * - Transaction document download (retrieve the source PDF as base64)
12
+ * - Opening balances per GL account per fiscal year
13
+ *
14
+ * Yuki service: AccountingInfo.asmx
15
+ * Note: uses sessionID / administrationID (uppercase D), same as Accounting.asmx.
16
+ */
17
+ export function registerAccountingInfoTools(server, client) {
18
+ // ── get_gl_account_scheme ────────────────────────────────────────────────────
19
+ /**
20
+ * get_gl_account_scheme
21
+ *
22
+ * Retrieve the complete GL account scheme (rekeningschema) for an
23
+ * administration: all account codes with their type, subtype, and
24
+ * active/inactive status.
25
+ *
26
+ * Use this instead of get_gl_accounts when you need the full account
27
+ * definition (type, subtype, enabled flag) rather than current balances.
28
+ * Useful for building GL account pickers, validating codes before booking,
29
+ * or understanding the chart-of-accounts structure.
30
+ *
31
+ * Rate cost: 1 request.
32
+ */
33
+ server.registerTool('get_gl_account_scheme', {
34
+ description: 'Retrieve the complete GL account scheme (rekeningschema) for an administration. ' +
35
+ 'Returns every account code with its type, subtype, description, and active/inactive status. ' +
36
+ 'Use this to validate GL codes before booking or to build account pickers. ' +
37
+ 'For current balances use get_gl_accounts instead.',
38
+ inputSchema: {
39
+ administrationId: z
40
+ .string()
41
+ .optional()
42
+ .describe('Administration ID (GUID). Defaults to YUKI_DOMAIN_ID env var.'),
43
+ },
44
+ }, async ({ administrationId }) => {
45
+ try {
46
+ const adminId = administrationId ?? client.defaultDomainId;
47
+ if (!adminId)
48
+ throw new Error('administrationId is required (or set YUKI_DOMAIN_ID env var)');
49
+ const sessionID = await client.getSessionID();
50
+ const result = await client.callSoap({
51
+ service: 'AccountingInfo.asmx',
52
+ method: 'GetGLAccountScheme',
53
+ params: { sessionID, administrationID: adminId },
54
+ });
55
+ const accounts = normalizeList(result, ['GLAccounts', 'Accounts'], ['GLAccount', 'Account', 'Row']);
56
+ return {
57
+ content: [
58
+ {
59
+ type: 'text',
60
+ text: JSON.stringify({ success: true, count: accounts.length, accounts }, null, 2),
61
+ },
62
+ ],
63
+ };
64
+ }
65
+ catch (err) {
66
+ return errorResponse(err);
67
+ }
68
+ });
69
+ // ── get_period_table ─────────────────────────────────────────────────────────
70
+ /**
71
+ * get_period_table
72
+ *
73
+ * Retrieve the fiscal period table for a given year: period names, numbers,
74
+ * and the date range each period covers.
75
+ *
76
+ * This is essential for Theun's depreciation and salary reports, which need
77
+ * to display "the last period in which a booking was made" in human-readable
78
+ * form (e.g. "Periode 3 · maart 2025") rather than a raw date.
79
+ *
80
+ * Use the returned period names to annotate gl_balances and
81
+ * workflow_snapshots in the monorepo dashboard.
82
+ *
83
+ * Rate cost: 1 request.
84
+ */
85
+ server.registerTool('get_period_table', {
86
+ description: 'Retrieve the fiscal period table (periodeoverzicht) for a given fiscal year. ' +
87
+ 'Returns period numbers, names, and start/end dates. ' +
88
+ 'Use this to translate a transaction date into a period name for reports ' +
89
+ '(e.g. "tot welke periode zijn afschrijvingen verwerkt").',
90
+ inputSchema: {
91
+ yearId: z
92
+ .number()
93
+ .int()
94
+ .describe('Fiscal year as a 4-digit integer (e.g. 2025).'),
95
+ administrationId: z
96
+ .string()
97
+ .optional()
98
+ .describe('Administration ID (GUID). Defaults to YUKI_DOMAIN_ID env var.'),
99
+ },
100
+ }, async ({ yearId, administrationId }) => {
101
+ try {
102
+ const adminId = administrationId ?? client.defaultDomainId;
103
+ if (!adminId)
104
+ throw new Error('administrationId is required (or set YUKI_DOMAIN_ID env var)');
105
+ const sessionID = await client.getSessionID();
106
+ const result = await client.callSoap({
107
+ service: 'AccountingInfo.asmx',
108
+ method: 'GetPeriodDateTable',
109
+ params: { sessionID, administrationID: adminId, yearID: yearId },
110
+ });
111
+ const periods = normalizeList(result, ['Periods', 'AdministrationPeriods'], ['Period', 'AdministrationPeriod', 'Row']);
112
+ return {
113
+ content: [
114
+ {
115
+ type: 'text',
116
+ text: JSON.stringify({ success: true, yearId, count: periods.length, periods }, null, 2),
117
+ },
118
+ ],
119
+ };
120
+ }
121
+ catch (err) {
122
+ return errorResponse(err);
123
+ }
124
+ });
125
+ // ── get_gl_transactions_detailed ────────────────────────────────────────────
126
+ /**
127
+ * get_gl_transactions_detailed
128
+ *
129
+ * Retrieve a detailed transaction listing for a GL account (or all accounts)
130
+ * within a date range. Returns richer data than get_transactions:
131
+ * document type, archive folder, fiscal period ID, project code,
132
+ * mutation user, and company name.
133
+ *
134
+ * Use this when you need to determine *when* a specific type of booking
135
+ * (e.g. depreciation, salary journal) was last made on an account, or
136
+ * when you need to link a transaction back to its source document.
137
+ *
138
+ * financialMode: '1' = fiscal (default, matches Yuki's fiscal year),
139
+ * '0' = commercial (calendar year).
140
+ *
141
+ * Rate cost: 1 request.
142
+ */
143
+ server.registerTool('get_gl_transactions_detailed', {
144
+ description: 'Retrieve detailed transaction data for a GL account within a date range. ' +
145
+ 'Returns richer fields than get_transactions: document type, archive folder, ' +
146
+ 'fiscal period ID, project code, and mutation user. ' +
147
+ 'Leave glAccountCode empty to fetch all accounts. ' +
148
+ 'Use this to find the last period in which a depreciation or salary booking was made.',
149
+ inputSchema: {
150
+ startDate: z.string().describe('Start date in YYYY-MM-DD format (inclusive)'),
151
+ endDate: z.string().describe('End date in YYYY-MM-DD format (inclusive)'),
152
+ glAccountCode: z
153
+ .string()
154
+ .optional()
155
+ .describe('GL account code to filter (e.g. "0300" for depreciation). Leave empty for all accounts.'),
156
+ financialMode: z
157
+ .enum(['0', '1'])
158
+ .optional()
159
+ .default('1')
160
+ .describe("Financial mode: '1' = fiscal (default), '0' = commercial."),
161
+ administrationId: z
162
+ .string()
163
+ .optional()
164
+ .describe('Administration ID (GUID). Defaults to YUKI_DOMAIN_ID env var.'),
165
+ },
166
+ }, async ({ startDate, endDate, glAccountCode, financialMode, administrationId }) => {
167
+ try {
168
+ const adminId = administrationId ?? client.defaultDomainId;
169
+ if (!adminId)
170
+ throw new Error('administrationId is required (or set YUKI_DOMAIN_ID env var)');
171
+ const sessionID = await client.getSessionID();
172
+ const result = await client.callSoap({
173
+ service: 'AccountingInfo.asmx',
174
+ method: 'GetTransactionDetails',
175
+ params: {
176
+ sessionID,
177
+ administrationID: adminId,
178
+ GLAccountCode: glAccountCode ?? '',
179
+ StartDate: startDate,
180
+ EndDate: endDate,
181
+ financialMode: financialMode ?? '1',
182
+ },
183
+ });
184
+ const transactions = normalizeList(result, ['TransactionInfos', 'Transactions'], ['TransactionInfo', 'Transaction', 'Row']);
185
+ return {
186
+ content: [
187
+ {
188
+ type: 'text',
189
+ text: JSON.stringify({
190
+ success: true,
191
+ count: transactions.length,
192
+ period: { startDate, endDate },
193
+ glAccountCode: glAccountCode ?? '(all)',
194
+ financialMode,
195
+ transactions,
196
+ }, null, 2),
197
+ },
198
+ ],
199
+ };
200
+ }
201
+ catch (err) {
202
+ return errorResponse(err);
203
+ }
204
+ });
205
+ // ── get_transaction_document ─────────────────────────────────────────────────
206
+ /**
207
+ * get_transaction_document
208
+ *
209
+ * Download the source document (PDF) associated with a transaction in Yuki,
210
+ * returned as a base64-encoded string.
211
+ *
212
+ * Use the transactionId from a get_gl_transactions_detailed response (the `id`
213
+ * or `hID` field). Useful for retrieving the original invoice PDF from a
214
+ * booked transaction for verification or re-archival.
215
+ *
216
+ * Rate cost: 1 request.
217
+ */
218
+ server.registerTool('get_transaction_document', {
219
+ description: 'Download the source document (PDF) for a booked transaction, returned as base64. ' +
220
+ 'Use the transaction ID from get_gl_transactions_detailed. ' +
221
+ 'Returns fileName and base64-encoded fileData.',
222
+ inputSchema: {
223
+ transactionId: z
224
+ .string()
225
+ .describe('Transaction ID (from the id or hID field in get_gl_transactions_detailed).'),
226
+ administrationId: z
227
+ .string()
228
+ .optional()
229
+ .describe('Administration ID (GUID). Defaults to YUKI_DOMAIN_ID env var.'),
230
+ },
231
+ }, async ({ transactionId, administrationId }) => {
232
+ try {
233
+ const adminId = administrationId ?? client.defaultDomainId;
234
+ if (!adminId)
235
+ throw new Error('administrationId is required (or set YUKI_DOMAIN_ID env var)');
236
+ const sessionID = await client.getSessionID();
237
+ const result = await client.callSoap({
238
+ service: 'AccountingInfo.asmx',
239
+ method: 'GetTransactionDocument',
240
+ params: { sessionID, administrationID: adminId, transactionID: transactionId },
241
+ });
242
+ // Result shape: { fileName: string, filedata: string (base64) }
243
+ const doc = result;
244
+ const fileName = doc['fileName'] ?? doc['FileName'] ?? null;
245
+ const fileData = doc['filedata'] ?? doc['fileData'] ?? doc['FileData'] ?? null;
246
+ return {
247
+ content: [
248
+ {
249
+ type: 'text',
250
+ text: JSON.stringify({
251
+ success: true,
252
+ transactionId,
253
+ fileName,
254
+ fileDataBase64: fileData,
255
+ }, null, 2),
256
+ },
257
+ ],
258
+ };
259
+ }
260
+ catch (err) {
261
+ return errorResponse(err);
262
+ }
263
+ });
264
+ // ── get_start_balances ───────────────────────────────────────────────────────
265
+ /**
266
+ * get_start_balances
267
+ *
268
+ * Retrieve the opening balances (beginbalansen) per GL account for a
269
+ * specific fiscal year.
270
+ *
271
+ * Use this when building year-over-year comparisons or verifying that
272
+ * opening entries match the closing balances of the prior year.
273
+ *
274
+ * financialMode: '1' = fiscal (default), '0' = commercial.
275
+ *
276
+ * Rate cost: 1 request.
277
+ */
278
+ server.registerTool('get_start_balances', {
279
+ description: 'Retrieve opening balances (beginbalansen) per GL account for a fiscal year. ' +
280
+ 'Returns accountID, accountDescription, and startBalance for each GL account. ' +
281
+ 'Use this for year-over-year balance verification.',
282
+ inputSchema: {
283
+ yearId: z
284
+ .number()
285
+ .int()
286
+ .describe('Fiscal year as a 4-digit integer (e.g. 2025).'),
287
+ financialMode: z
288
+ .enum(['0', '1'])
289
+ .optional()
290
+ .default('1')
291
+ .describe("Financial mode: '1' = fiscal (default), '0' = commercial."),
292
+ administrationId: z
293
+ .string()
294
+ .optional()
295
+ .describe('Administration ID (GUID). Defaults to YUKI_DOMAIN_ID env var.'),
296
+ },
297
+ }, async ({ yearId, financialMode, administrationId }) => {
298
+ try {
299
+ const adminId = administrationId ?? client.defaultDomainId;
300
+ if (!adminId)
301
+ throw new Error('administrationId is required (or set YUKI_DOMAIN_ID env var)');
302
+ const sessionID = await client.getSessionID();
303
+ const result = await client.callSoap({
304
+ service: 'AccountingInfo.asmx',
305
+ method: 'GetStartBalanceByGLAccount',
306
+ params: {
307
+ sessionID,
308
+ administrationID: adminId,
309
+ yearID: yearId,
310
+ financialMode: financialMode ?? '1',
311
+ },
312
+ });
313
+ const balances = normalizeList(result, ['StartBalances', 'AccountStartBalances'], ['StartBalance', 'AccountStartBalance', 'Row']);
314
+ return {
315
+ content: [
316
+ {
317
+ type: 'text',
318
+ text: JSON.stringify({ success: true, yearId, financialMode, count: balances.length, balances }, null, 2),
319
+ },
320
+ ],
321
+ };
322
+ }
323
+ catch (err) {
324
+ return errorResponse(err);
325
+ }
326
+ });
327
+ }
328
+ // ── Shared helpers ─────────────────────────────────────────────────────────────
329
+ /** Generic list normaliser: tries wrapper tags then item tags, falls back to raw. */
330
+ function normalizeList(result, wrappers, itemTags) {
331
+ if (!result)
332
+ return [];
333
+ if (Array.isArray(result))
334
+ return result;
335
+ const rec = result;
336
+ for (const wrapper of wrappers) {
337
+ const c = rec[wrapper];
338
+ if (!c)
339
+ continue;
340
+ if (Array.isArray(c))
341
+ return c;
342
+ const inner = c;
343
+ for (const tag of itemTags) {
344
+ if (Array.isArray(inner[tag]))
345
+ return inner[tag];
346
+ if (inner[tag])
347
+ return [inner[tag]];
348
+ }
349
+ }
350
+ for (const tag of itemTags) {
351
+ if (Array.isArray(rec[tag]))
352
+ return rec[tag];
353
+ if (rec[tag])
354
+ return [rec[tag]];
355
+ }
356
+ return [result];
357
+ }
358
+ /** Uniform error response shape. */
359
+ function errorResponse(err) {
360
+ const message = err instanceof Error ? err.message : String(err);
361
+ return {
362
+ content: [{ type: 'text', text: JSON.stringify({ success: false, error: message }, null, 2) }],
363
+ isError: true,
364
+ };
365
+ }
366
+ //# sourceMappingURL=accounting-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounting-info.js","sourceRoot":"","sources":["../../src/tools/accounting-info.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAkB;IAC/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AG,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,CAAC;AAClB,CAAC;AAED,oCAAoC;AACpC,SAAS,aAAa,CAAC,GAAY;IACjC,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QACvG,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
@@ -10,4 +10,10 @@ import { YukiClient } from '../yuki-client.js';
10
10
  * Method: GLAccountBalance(sessionID, administrationID, transactionDate)
11
11
  */
12
12
  export declare function registerAccountingTools(server: McpServer, client: YukiClient): void;
13
+ /**
14
+ * Register additional accounting tools (fiscal variants and revenue).
15
+ * Called separately from registerAccountingTools so each can be exported
16
+ * and imported individually if needed.
17
+ */
18
+ export declare function registerAccountingExtendedTools(server: McpServer, client: YukiClient): void;
13
19
  //# sourceMappingURL=accounting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"accounting.d.ts","sourceRoot":"","sources":["../../src/tools/accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAoFnF"}
1
+ {"version":3,"file":"accounting.d.ts","sourceRoot":"","sources":["../../src/tools/accounting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAoFnF;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CA2I3F"}