@frihet/mcp-server 1.2.4 → 1.3.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/README.md +37 -0
- package/dist/client-interface.d.ts +12 -1
- package/dist/client-interface.d.ts.map +1 -1
- package/dist/client.d.ts +12 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +41 -14
- package/dist/client.js.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +46 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +90 -0
- package/dist/logger.js.map +1 -0
- package/dist/metrics.d.ts +28 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +81 -0
- package/dist/metrics.js.map +1 -0
- package/dist/tools/clients.d.ts.map +1 -1
- package/dist/tools/clients.js +40 -62
- package/dist/tools/clients.js.map +1 -1
- package/dist/tools/expenses.d.ts.map +1 -1
- package/dist/tools/expenses.js +51 -64
- package/dist/tools/expenses.js.map +1 -1
- package/dist/tools/invoices.d.ts.map +1 -1
- package/dist/tools/invoices.js +100 -93
- package/dist/tools/invoices.js.map +1 -1
- package/dist/tools/products.d.ts.map +1 -1
- package/dist/tools/products.js +42 -72
- package/dist/tools/products.js.map +1 -1
- package/dist/tools/quotes.d.ts.map +1 -1
- package/dist/tools/quotes.js +61 -70
- package/dist/tools/quotes.js.map +1 -1
- package/dist/tools/shared.d.ts +26 -4
- package/dist/tools/shared.d.ts.map +1 -1
- package/dist/tools/shared.js +57 -8
- package/dist/tools/shared.js.map +1 -1
- package/dist/tools/webhooks.d.ts.map +1 -1
- package/dist/tools/webhooks.js +44 -65
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/tools/invoices.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Invoice tools for the Frihet MCP server.
|
|
3
3
|
*/
|
|
4
4
|
import { z } from "zod/v4";
|
|
5
|
-
import {
|
|
5
|
+
import { withToolLogging, formatPaginatedResponse, formatRecord, listContent, getContent, mutateContent, READ_ONLY_ANNOTATIONS, CREATE_ANNOTATIONS, UPDATE_ANNOTATIONS, DELETE_ANNOTATIONS, paginatedOutput, deleteResultOutput, invoiceItemOutput } from "./shared.js";
|
|
6
6
|
const invoiceItemSchema = z.object({
|
|
7
7
|
description: z.string().describe("Description of the line item / Descripcion del concepto"),
|
|
8
8
|
quantity: z.number().describe("Quantity / Cantidad"),
|
|
@@ -12,12 +12,26 @@ export function registerInvoiceTools(server, client) {
|
|
|
12
12
|
// -- list_invoices --
|
|
13
13
|
server.registerTool("list_invoices", {
|
|
14
14
|
title: "List Invoices",
|
|
15
|
-
description: "List all invoices with optional pagination. " +
|
|
16
|
-
"Returns a paginated list
|
|
17
|
-
"
|
|
18
|
-
"
|
|
15
|
+
description: "List all invoices with optional pagination and filters. " +
|
|
16
|
+
"Returns a paginated list sorted by issue date (newest first). " +
|
|
17
|
+
"Supports filtering by status (draft/sent/paid/overdue/cancelled) and date range. " +
|
|
18
|
+
"Example: status='paid', from='2026-01-01', to='2026-03-31', limit=20 " +
|
|
19
|
+
"/ Lista facturas con paginacion y filtros opcionales. " +
|
|
20
|
+
"Soporta filtrado por estado y rango de fechas.",
|
|
19
21
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
20
22
|
inputSchema: {
|
|
23
|
+
status: z
|
|
24
|
+
.enum(["draft", "sent", "paid", "overdue", "cancelled"])
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("Filter by invoice status / Filtrar por estado"),
|
|
27
|
+
from: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Start date filter in ISO 8601 (YYYY-MM-DD) / Fecha inicio"),
|
|
31
|
+
to: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("End date filter in ISO 8601 (YYYY-MM-DD) / Fecha fin"),
|
|
21
35
|
limit: z
|
|
22
36
|
.number()
|
|
23
37
|
.int()
|
|
@@ -33,18 +47,13 @@ export function registerInvoiceTools(server, client) {
|
|
|
33
47
|
.describe("Number of results to skip / Resultados a saltar"),
|
|
34
48
|
},
|
|
35
49
|
outputSchema: paginatedOutput(invoiceItemOutput),
|
|
36
|
-
}, async ({ limit, offset }) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
return handleToolError(error);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
50
|
+
}, async ({ status, from, to, limit, offset }) => withToolLogging("list_invoices", async () => {
|
|
51
|
+
const result = await client.listInvoices({ limit, offset, status, from, to });
|
|
52
|
+
return {
|
|
53
|
+
content: [listContent(formatPaginatedResponse("invoices", result))],
|
|
54
|
+
structuredContent: result,
|
|
55
|
+
};
|
|
56
|
+
}));
|
|
48
57
|
// -- get_invoice --
|
|
49
58
|
server.registerTool("get_invoice", {
|
|
50
59
|
title: "Get Invoice",
|
|
@@ -55,68 +64,64 @@ export function registerInvoiceTools(server, client) {
|
|
|
55
64
|
id: z.string().describe("Invoice ID / ID de la factura"),
|
|
56
65
|
},
|
|
57
66
|
outputSchema: invoiceItemOutput,
|
|
58
|
-
}, async ({ id }) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
return handleToolError(error);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
67
|
+
}, async ({ id }) => withToolLogging("get_invoice", async () => {
|
|
68
|
+
const result = await client.getInvoice(id);
|
|
69
|
+
return {
|
|
70
|
+
content: [getContent(formatRecord("Invoice", result))],
|
|
71
|
+
structuredContent: result,
|
|
72
|
+
};
|
|
73
|
+
}));
|
|
70
74
|
// -- create_invoice --
|
|
71
75
|
server.registerTool("create_invoice", {
|
|
72
76
|
title: "Create Invoice",
|
|
73
77
|
description: "Create a new invoice. Requires client name and at least one line item. " +
|
|
74
|
-
"The invoice number is auto-generated. " +
|
|
78
|
+
"The invoice number is auto-generated. Defaults to draft status and today's date. " +
|
|
79
|
+
"Example: clientName='Acme Corp', items=[{description:'Consulting', quantity:10, unitPrice:150}], taxRate=21 " +
|
|
75
80
|
"/ Crea una nueva factura. Requiere nombre del cliente y al menos un concepto. " +
|
|
76
|
-
"El numero
|
|
81
|
+
"El numero se genera automaticamente. Por defecto estado borrador y fecha de hoy.",
|
|
77
82
|
annotations: CREATE_ANNOTATIONS,
|
|
78
83
|
inputSchema: {
|
|
79
84
|
clientName: z.string().describe("Client/customer name / Nombre del cliente"),
|
|
80
85
|
items: z
|
|
81
86
|
.array(invoiceItemSchema)
|
|
82
87
|
.min(1)
|
|
83
|
-
.describe("Line items / Conceptos de la factura"),
|
|
84
|
-
|
|
85
|
-
.
|
|
88
|
+
.describe("Line items (each with description, quantity, unitPrice) / Conceptos de la factura"),
|
|
89
|
+
issueDate: z
|
|
90
|
+
.string()
|
|
86
91
|
.optional()
|
|
87
|
-
.describe("
|
|
92
|
+
.describe("Issue date in ISO 8601 format (YYYY-MM-DD), defaults to today / Fecha de emision"),
|
|
88
93
|
dueDate: z
|
|
89
94
|
.string()
|
|
90
95
|
.optional()
|
|
91
96
|
.describe("Due date in ISO 8601 format (YYYY-MM-DD) / Fecha de vencimiento"),
|
|
97
|
+
status: z
|
|
98
|
+
.enum(["draft", "sent", "paid", "overdue", "cancelled"])
|
|
99
|
+
.optional()
|
|
100
|
+
.describe("Invoice status (default: draft) / Estado de la factura"),
|
|
92
101
|
notes: z
|
|
93
102
|
.string()
|
|
94
103
|
.optional()
|
|
95
|
-
.describe("Additional notes / Notas adicionales"),
|
|
104
|
+
.describe("Additional notes shown on the invoice / Notas adicionales"),
|
|
96
105
|
taxRate: z
|
|
97
106
|
.number()
|
|
98
107
|
.min(0)
|
|
99
108
|
.max(100)
|
|
100
109
|
.optional()
|
|
101
|
-
.describe("Tax rate percentage (e.g. 21 for 21% IVA) / Porcentaje de impuesto"),
|
|
110
|
+
.describe("Tax rate percentage (e.g. 21 for 21% IVA, 7 for IGIC) / Porcentaje de impuesto"),
|
|
102
111
|
},
|
|
103
112
|
outputSchema: invoiceItemOutput,
|
|
104
|
-
}, async (input) => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
catch (error) {
|
|
113
|
-
return handleToolError(error);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
113
|
+
}, async (input) => withToolLogging("create_invoice", async () => {
|
|
114
|
+
const result = await client.createInvoice(input);
|
|
115
|
+
return {
|
|
116
|
+
content: [mutateContent(formatRecord("Invoice created", result))],
|
|
117
|
+
structuredContent: result,
|
|
118
|
+
};
|
|
119
|
+
}));
|
|
116
120
|
// -- update_invoice --
|
|
117
121
|
server.registerTool("update_invoice", {
|
|
118
122
|
title: "Update Invoice",
|
|
119
|
-
description: "Update an existing invoice. Only the provided fields will be changed. " +
|
|
123
|
+
description: "Update an existing invoice using PATCH semantics. Only the provided fields will be changed. " +
|
|
124
|
+
"Example: id='abc123', status='paid' to mark an invoice as paid. " +
|
|
120
125
|
"/ Actualiza una factura existente. Solo se modifican los campos proporcionados.",
|
|
121
126
|
annotations: UPDATE_ANNOTATIONS,
|
|
122
127
|
inputSchema: {
|
|
@@ -127,27 +132,23 @@ export function registerInvoiceTools(server, client) {
|
|
|
127
132
|
.min(1)
|
|
128
133
|
.optional()
|
|
129
134
|
.describe("Line items / Conceptos"),
|
|
135
|
+
issueDate: z.string().optional().describe("Issue date (YYYY-MM-DD) / Fecha de emision"),
|
|
136
|
+
dueDate: z.string().optional().describe("Due date (YYYY-MM-DD) / Fecha de vencimiento"),
|
|
130
137
|
status: z
|
|
131
138
|
.enum(["draft", "sent", "paid", "overdue", "cancelled"])
|
|
132
139
|
.optional()
|
|
133
140
|
.describe("Invoice status / Estado"),
|
|
134
|
-
dueDate: z.string().optional().describe("Due date (YYYY-MM-DD) / Fecha de vencimiento"),
|
|
135
141
|
notes: z.string().optional().describe("Notes / Notas"),
|
|
136
142
|
taxRate: z.number().min(0).max(100).optional().describe("Tax rate % / IVA %"),
|
|
137
143
|
},
|
|
138
144
|
outputSchema: invoiceItemOutput,
|
|
139
|
-
}, async ({ id, ...data }) => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
catch (error) {
|
|
148
|
-
return handleToolError(error);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
145
|
+
}, async ({ id, ...data }) => withToolLogging("update_invoice", async () => {
|
|
146
|
+
const result = await client.updateInvoice(id, data);
|
|
147
|
+
return {
|
|
148
|
+
content: [mutateContent(formatRecord("Invoice updated", result))],
|
|
149
|
+
structuredContent: result,
|
|
150
|
+
};
|
|
151
|
+
}));
|
|
151
152
|
// -- delete_invoice --
|
|
152
153
|
server.registerTool("delete_invoice", {
|
|
153
154
|
title: "Delete Invoice",
|
|
@@ -158,43 +159,49 @@ export function registerInvoiceTools(server, client) {
|
|
|
158
159
|
id: z.string().describe("Invoice ID / ID de la factura"),
|
|
159
160
|
},
|
|
160
161
|
outputSchema: deleteResultOutput,
|
|
161
|
-
}, async ({ id }) => {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
catch (error) {
|
|
170
|
-
return handleToolError(error);
|
|
171
|
-
}
|
|
172
|
-
});
|
|
162
|
+
}, async ({ id }) => withToolLogging("delete_invoice", async () => {
|
|
163
|
+
await client.deleteInvoice(id);
|
|
164
|
+
return {
|
|
165
|
+
content: [mutateContent(`Invoice ${id} deleted successfully. / Factura ${id} eliminada correctamente.`)],
|
|
166
|
+
structuredContent: { success: true, id },
|
|
167
|
+
};
|
|
168
|
+
}));
|
|
173
169
|
// -- search_invoices --
|
|
174
170
|
server.registerTool("search_invoices", {
|
|
175
171
|
title: "Search Invoices",
|
|
176
|
-
description: "Search
|
|
177
|
-
"
|
|
172
|
+
description: "Search and filter invoices. Supports filtering by status and date range. " +
|
|
173
|
+
"The query parameter searches across client names and invoice content. " +
|
|
174
|
+
"Example: query='Acme', status='paid', from='2026-01-01', to='2026-03-31' " +
|
|
175
|
+
"/ Busca y filtra facturas. Soporta filtrado por estado y rango de fechas. " +
|
|
176
|
+
"El parametro query busca en nombres de clientes y contenido de facturas.",
|
|
178
177
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
179
178
|
inputSchema: {
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
query: z.string().optional().describe("Search text (client name, etc.) / Texto de busqueda"),
|
|
180
|
+
status: z
|
|
181
|
+
.enum(["draft", "sent", "paid", "overdue", "cancelled"])
|
|
182
|
+
.optional()
|
|
183
|
+
.describe("Filter by status / Filtrar por estado"),
|
|
184
|
+
from: z
|
|
185
|
+
.string()
|
|
186
|
+
.optional()
|
|
187
|
+
.describe("Start date filter (YYYY-MM-DD) / Fecha inicio"),
|
|
188
|
+
to: z
|
|
189
|
+
.string()
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("End date filter (YYYY-MM-DD) / Fecha fin"),
|
|
192
|
+
limit: z.number().int().min(1).max(100).optional().describe("Max results (1-100) / Resultados maximos"),
|
|
182
193
|
offset: z.number().int().min(0).optional().describe("Offset / Desplazamiento"),
|
|
183
194
|
},
|
|
184
195
|
outputSchema: paginatedOutput(invoiceItemOutput),
|
|
185
|
-
}, async ({
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
catch (error) {
|
|
196
|
-
return handleToolError(error);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
196
|
+
}, async ({ query, status, from, to, limit, offset }) => withToolLogging("search_invoices", async () => {
|
|
197
|
+
const result = query
|
|
198
|
+
? await client.searchInvoices(query, { limit, offset, status, from, to })
|
|
199
|
+
: await client.listInvoices({ limit, offset, status, from, to });
|
|
200
|
+
const label = query ? `invoices matching "${query}"` : "invoices";
|
|
201
|
+
return {
|
|
202
|
+
content: [listContent(formatPaginatedResponse(label, result))],
|
|
203
|
+
structuredContent: result,
|
|
204
|
+
};
|
|
205
|
+
}));
|
|
199
206
|
}
|
|
200
207
|
//# sourceMappingURL=invoices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/tools/invoices.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAExQ,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;IAC3F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;IACpD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;CAC7E,CAAC,CAAC;AAEH,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAqB;IAC3E,sBAAsB;IAEtB,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../src/tools/invoices.ts"],"names":[],"mappings":"AAAA;;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K;YAClB,CAAC,CAAC,MAAM,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACzE,CAAC,CAAC,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACnE,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,sBAAsB,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC;QAClE,OAAO;YACL,OAAO,EAAE,CAAC,WAAW,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;YAC9D,iBAAiB,EAAE,MAA4C;SAChE,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/tools/products.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../src/tools/products.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAG5D,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CA2InF"}
|
package/dist/tools/products.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Product tools for the Frihet MCP server.
|
|
3
3
|
*/
|
|
4
4
|
import { z } from "zod/v4";
|
|
5
|
-
import {
|
|
5
|
+
import { withToolLogging, formatPaginatedResponse, formatRecord, listContent, getContent, mutateContent, READ_ONLY_ANNOTATIONS, CREATE_ANNOTATIONS, UPDATE_ANNOTATIONS, DELETE_ANNOTATIONS, paginatedOutput, deleteResultOutput, productItemOutput } from "./shared.js";
|
|
6
6
|
export function registerProductTools(server, client) {
|
|
7
7
|
// -- list_products --
|
|
8
8
|
server.registerTool("list_products", {
|
|
@@ -17,18 +17,13 @@ export function registerProductTools(server, client) {
|
|
|
17
17
|
offset: z.number().int().min(0).optional().describe("Offset / Desplazamiento"),
|
|
18
18
|
},
|
|
19
19
|
outputSchema: paginatedOutput(productItemOutput),
|
|
20
|
-
}, async ({ limit, offset }) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
return handleToolError(error);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
20
|
+
}, async ({ limit, offset }) => withToolLogging("list_products", async () => {
|
|
21
|
+
const result = await client.listProducts({ limit, offset });
|
|
22
|
+
return {
|
|
23
|
+
content: [listContent(formatPaginatedResponse("products", result))],
|
|
24
|
+
structuredContent: result,
|
|
25
|
+
};
|
|
26
|
+
}));
|
|
32
27
|
// -- get_product --
|
|
33
28
|
server.registerTool("get_product", {
|
|
34
29
|
title: "Get Product",
|
|
@@ -39,59 +34,46 @@ export function registerProductTools(server, client) {
|
|
|
39
34
|
id: z.string().describe("Product ID / ID del producto"),
|
|
40
35
|
},
|
|
41
36
|
outputSchema: productItemOutput,
|
|
42
|
-
}, async ({ id }) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
return handleToolError(error);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
37
|
+
}, async ({ id }) => withToolLogging("get_product", async () => {
|
|
38
|
+
const result = await client.getProduct(id);
|
|
39
|
+
return {
|
|
40
|
+
content: [getContent(formatRecord("Product", result))],
|
|
41
|
+
structuredContent: result,
|
|
42
|
+
};
|
|
43
|
+
}));
|
|
54
44
|
// -- create_product --
|
|
55
45
|
server.registerTool("create_product", {
|
|
56
46
|
title: "Create Product",
|
|
57
|
-
description: "Create a new product or service. Requires a name and unit price. " +
|
|
47
|
+
description: "Create a new product or service in the catalog. Requires a name and unit price. " +
|
|
58
48
|
"Products can be referenced when creating invoices and quotes for faster data entry. " +
|
|
59
|
-
"
|
|
60
|
-
"
|
|
49
|
+
"Example: name='Web Design', unitPrice=1500, taxRate=21, description='Full website redesign' " +
|
|
50
|
+
"/ Crea un nuevo producto o servicio en el catalogo. Requiere nombre y precio unitario. " +
|
|
51
|
+
"Los productos se pueden usar al crear facturas y presupuestos para entrada rapida de datos.",
|
|
61
52
|
annotations: CREATE_ANNOTATIONS,
|
|
62
53
|
inputSchema: {
|
|
63
54
|
name: z.string().describe("Product/service name / Nombre del producto o servicio"),
|
|
64
55
|
unitPrice: z.number().describe("Unit price in EUR / Precio unitario en EUR"),
|
|
65
56
|
description: z.string().optional().describe("Product description / Descripcion"),
|
|
66
|
-
unit: z
|
|
67
|
-
.string()
|
|
68
|
-
.optional()
|
|
69
|
-
.describe("Unit of measurement (e.g. 'hour', 'unit', 'kg') / Unidad de medida"),
|
|
70
57
|
taxRate: z
|
|
71
58
|
.number()
|
|
72
59
|
.min(0)
|
|
73
60
|
.max(100)
|
|
74
61
|
.optional()
|
|
75
62
|
.describe("Default tax rate % (e.g. 21 for 21% IVA) / IVA por defecto"),
|
|
76
|
-
sku: z.string().optional().describe("SKU / Reference code / Codigo de referencia"),
|
|
77
63
|
},
|
|
78
64
|
outputSchema: productItemOutput,
|
|
79
|
-
}, async (input) => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
catch (error) {
|
|
88
|
-
return handleToolError(error);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
65
|
+
}, async (input) => withToolLogging("create_product", async () => {
|
|
66
|
+
const result = await client.createProduct(input);
|
|
67
|
+
return {
|
|
68
|
+
content: [mutateContent(formatRecord("Product created", result))],
|
|
69
|
+
structuredContent: result,
|
|
70
|
+
};
|
|
71
|
+
}));
|
|
91
72
|
// -- update_product --
|
|
92
73
|
server.registerTool("update_product", {
|
|
93
74
|
title: "Update Product",
|
|
94
|
-
description: "Update an existing product. Only the provided fields will be changed. " +
|
|
75
|
+
description: "Update an existing product using PATCH semantics. Only the provided fields will be changed. " +
|
|
76
|
+
"Example: id='abc123', unitPrice=2000, taxRate=21 " +
|
|
95
77
|
"/ Actualiza un producto existente. Solo se modifican los campos proporcionados.",
|
|
96
78
|
annotations: UPDATE_ANNOTATIONS,
|
|
97
79
|
inputSchema: {
|
|
@@ -99,23 +81,16 @@ export function registerProductTools(server, client) {
|
|
|
99
81
|
name: z.string().optional().describe("Name / Nombre"),
|
|
100
82
|
unitPrice: z.number().optional().describe("Unit price / Precio unitario"),
|
|
101
83
|
description: z.string().optional().describe("Description / Descripcion"),
|
|
102
|
-
unit: z.string().optional().describe("Unit / Unidad"),
|
|
103
84
|
taxRate: z.number().min(0).max(100).optional().describe("Tax rate % / IVA %"),
|
|
104
|
-
sku: z.string().optional().describe("SKU / Referencia"),
|
|
105
85
|
},
|
|
106
86
|
outputSchema: productItemOutput,
|
|
107
|
-
}, async ({ id, ...data }) => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
return handleToolError(error);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
87
|
+
}, async ({ id, ...data }) => withToolLogging("update_product", async () => {
|
|
88
|
+
const result = await client.updateProduct(id, data);
|
|
89
|
+
return {
|
|
90
|
+
content: [mutateContent(formatRecord("Product updated", result))],
|
|
91
|
+
structuredContent: result,
|
|
92
|
+
};
|
|
93
|
+
}));
|
|
119
94
|
// -- delete_product --
|
|
120
95
|
server.registerTool("delete_product", {
|
|
121
96
|
title: "Delete Product",
|
|
@@ -126,17 +101,12 @@ export function registerProductTools(server, client) {
|
|
|
126
101
|
id: z.string().describe("Product ID / ID del producto"),
|
|
127
102
|
},
|
|
128
103
|
outputSchema: deleteResultOutput,
|
|
129
|
-
}, async ({ id }) => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
catch (error) {
|
|
138
|
-
return handleToolError(error);
|
|
139
|
-
}
|
|
140
|
-
});
|
|
104
|
+
}, async ({ id }) => withToolLogging("delete_product", async () => {
|
|
105
|
+
await client.deleteProduct(id);
|
|
106
|
+
return {
|
|
107
|
+
content: [mutateContent(`Product ${id} deleted successfully. / Producto ${id} eliminado correctamente.`)],
|
|
108
|
+
structuredContent: { success: true, id },
|
|
109
|
+
};
|
|
110
|
+
}));
|
|
141
111
|
}
|
|
142
112
|
//# sourceMappingURL=products.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/tools/products.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAExQ,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAqB;IAC3E,sBAAsB;IAEtB,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;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AE,CAAC,eAAe,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC7D,MAAM,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QAC/B,OAAO;YACL,OAAO,EAAE,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,EAAE,2BAA2B,CAAC,CAAC;YACzG,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAwC;SAC/E,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../src/tools/quotes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAS5D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../src/tools/quotes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAS5D,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAkKjF"}
|