@promptpartner/bexio-mcp-server 2.0.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/LICENSE +21 -0
- package/README.md +161 -0
- package/dist/bexio-client.d.ts +350 -0
- package/dist/bexio-client.js +1045 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +80 -0
- package/dist/logger.d.ts +17 -0
- package/dist/logger.js +28 -0
- package/dist/server.d.ts +18 -0
- package/dist/server.js +81 -0
- package/dist/shared/errors.d.ts +21 -0
- package/dist/shared/errors.js +54 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/response.d.ts +24 -0
- package/dist/shared/response.js +92 -0
- package/dist/tools/accounting/definitions.d.ts +9 -0
- package/dist/tools/accounting/definitions.js +345 -0
- package/dist/tools/accounting/handlers.d.ts +10 -0
- package/dist/tools/accounting/handlers.js +121 -0
- package/dist/tools/accounting/index.d.ts +16 -0
- package/dist/tools/accounting/index.js +16 -0
- package/dist/tools/banking/definitions.d.ts +11 -0
- package/dist/tools/banking/definitions.js +349 -0
- package/dist/tools/banking/handlers.d.ts +9 -0
- package/dist/tools/banking/handlers.js +123 -0
- package/dist/tools/banking/index.d.ts +6 -0
- package/dist/tools/banking/index.js +6 -0
- package/dist/tools/company/definitions.d.ts +7 -0
- package/dist/tools/company/definitions.js +87 -0
- package/dist/tools/company/handlers.d.ts +7 -0
- package/dist/tools/company/handlers.js +31 -0
- package/dist/tools/company/index.d.ts +6 -0
- package/dist/tools/company/index.js +6 -0
- package/dist/tools/contacts/definitions.d.ts +6 -0
- package/dist/tools/contacts/definitions.js +150 -0
- package/dist/tools/contacts/handlers.d.ts +7 -0
- package/dist/tools/contacts/handlers.js +40 -0
- package/dist/tools/contacts/index.d.ts +6 -0
- package/dist/tools/contacts/index.js +5 -0
- package/dist/tools/deliveries/definitions.d.ts +6 -0
- package/dist/tools/deliveries/definitions.js +67 -0
- package/dist/tools/deliveries/handlers.d.ts +7 -0
- package/dist/tools/deliveries/handlers.js +28 -0
- package/dist/tools/deliveries/index.d.ts +6 -0
- package/dist/tools/deliveries/index.js +5 -0
- package/dist/tools/files/definitions.d.ts +6 -0
- package/dist/tools/files/definitions.js +217 -0
- package/dist/tools/files/handlers.d.ts +7 -0
- package/dist/tools/files/handlers.js +63 -0
- package/dist/tools/files/index.d.ts +6 -0
- package/dist/tools/files/index.js +5 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.js +93 -0
- package/dist/tools/invoices/definitions.d.ts +6 -0
- package/dist/tools/invoices/definitions.js +147 -0
- package/dist/tools/invoices/handlers.d.ts +7 -0
- package/dist/tools/invoices/handlers.js +119 -0
- package/dist/tools/invoices/index.d.ts +6 -0
- package/dist/tools/invoices/index.js +5 -0
- package/dist/tools/items/definitions.d.ts +6 -0
- package/dist/tools/items/definitions.js +100 -0
- package/dist/tools/items/handlers.d.ts +7 -0
- package/dist/tools/items/handlers.js +36 -0
- package/dist/tools/items/index.d.ts +6 -0
- package/dist/tools/items/index.js +5 -0
- package/dist/tools/misc/definitions.d.ts +6 -0
- package/dist/tools/misc/definitions.js +126 -0
- package/dist/tools/misc/handlers.d.ts +7 -0
- package/dist/tools/misc/handlers.js +52 -0
- package/dist/tools/misc/index.d.ts +6 -0
- package/dist/tools/misc/index.js +5 -0
- package/dist/tools/orders/definitions.d.ts +6 -0
- package/dist/tools/orders/definitions.js +114 -0
- package/dist/tools/orders/handlers.d.ts +7 -0
- package/dist/tools/orders/handlers.js +62 -0
- package/dist/tools/orders/index.d.ts +6 -0
- package/dist/tools/orders/index.js +5 -0
- package/dist/tools/payments/definitions.d.ts +6 -0
- package/dist/tools/payments/definitions.js +74 -0
- package/dist/tools/payments/handlers.d.ts +7 -0
- package/dist/tools/payments/handlers.js +28 -0
- package/dist/tools/payments/index.d.ts +6 -0
- package/dist/tools/payments/index.js +5 -0
- package/dist/tools/payroll/definitions.d.ts +15 -0
- package/dist/tools/payroll/definitions.js +239 -0
- package/dist/tools/payroll/handlers.d.ts +14 -0
- package/dist/tools/payroll/handlers.js +152 -0
- package/dist/tools/payroll/index.d.ts +16 -0
- package/dist/tools/payroll/index.js +16 -0
- package/dist/tools/projects/definitions.d.ts +7 -0
- package/dist/tools/projects/definitions.js +430 -0
- package/dist/tools/projects/handlers.d.ts +7 -0
- package/dist/tools/projects/handlers.js +127 -0
- package/dist/tools/projects/index.d.ts +6 -0
- package/dist/tools/projects/index.js +6 -0
- package/dist/tools/purchase/definitions.d.ts +6 -0
- package/dist/tools/purchase/definitions.js +381 -0
- package/dist/tools/purchase/handlers.d.ts +7 -0
- package/dist/tools/purchase/handlers.js +120 -0
- package/dist/tools/purchase/index.d.ts +7 -0
- package/dist/tools/purchase/index.js +6 -0
- package/dist/tools/quotes/definitions.d.ts +6 -0
- package/dist/tools/quotes/definitions.js +174 -0
- package/dist/tools/quotes/handlers.d.ts +7 -0
- package/dist/tools/quotes/handlers.js +79 -0
- package/dist/tools/quotes/index.d.ts +6 -0
- package/dist/tools/quotes/index.js +5 -0
- package/dist/tools/reference/definitions.d.ts +7 -0
- package/dist/tools/reference/definitions.js +421 -0
- package/dist/tools/reference/handlers.d.ts +7 -0
- package/dist/tools/reference/handlers.js +161 -0
- package/dist/tools/reference/index.d.ts +6 -0
- package/dist/tools/reference/index.js +6 -0
- package/dist/tools/reminders/definitions.d.ts +6 -0
- package/dist/tools/reminders/definitions.js +132 -0
- package/dist/tools/reminders/handlers.d.ts +7 -0
- package/dist/tools/reminders/handlers.js +43 -0
- package/dist/tools/reminders/index.d.ts +6 -0
- package/dist/tools/reminders/index.js +5 -0
- package/dist/tools/reports/definitions.d.ts +6 -0
- package/dist/tools/reports/definitions.js +133 -0
- package/dist/tools/reports/handlers.d.ts +7 -0
- package/dist/tools/reports/handlers.js +33 -0
- package/dist/tools/reports/index.d.ts +6 -0
- package/dist/tools/reports/index.js +5 -0
- package/dist/tools/timetracking/definitions.d.ts +9 -0
- package/dist/tools/timetracking/definitions.js +226 -0
- package/dist/tools/timetracking/handlers.d.ts +9 -0
- package/dist/tools/timetracking/handlers.js +88 -0
- package/dist/tools/timetracking/index.d.ts +6 -0
- package/dist/tools/timetracking/index.js +6 -0
- package/dist/tools/users/definitions.d.ts +6 -0
- package/dist/tools/users/definitions.js +93 -0
- package/dist/tools/users/handlers.d.ts +7 -0
- package/dist/tools/users/handlers.js +35 -0
- package/dist/tools/users/index.d.ts +6 -0
- package/dist/tools/users/index.js +5 -0
- package/dist/transports/http.d.ts +17 -0
- package/dist/transports/http.js +203 -0
- package/dist/transports/index.d.ts +4 -0
- package/dist/transports/index.js +4 -0
- package/dist/types/common.d.ts +32 -0
- package/dist/types/common.js +11 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +11 -0
- package/dist/types/schemas/accounting.d.ts +225 -0
- package/dist/types/schemas/accounting.js +96 -0
- package/dist/types/schemas/banking.d.ts +207 -0
- package/dist/types/schemas/banking.js +86 -0
- package/dist/types/schemas/company.d.ts +44 -0
- package/dist/types/schemas/company.js +23 -0
- package/dist/types/schemas/contacts.d.ts +104 -0
- package/dist/types/schemas/contacts.js +42 -0
- package/dist/types/schemas/deliveries.d.ts +40 -0
- package/dist/types/schemas/deliveries.js +22 -0
- package/dist/types/schemas/files.d.ts +152 -0
- package/dist/types/schemas/files.js +64 -0
- package/dist/types/schemas/index.d.ts +24 -0
- package/dist/types/schemas/index.js +44 -0
- package/dist/types/schemas/invoices.d.ts +594 -0
- package/dist/types/schemas/invoices.js +109 -0
- package/dist/types/schemas/items.d.ts +153 -0
- package/dist/types/schemas/items.js +43 -0
- package/dist/types/schemas/misc.d.ts +64 -0
- package/dist/types/schemas/misc.js +36 -0
- package/dist/types/schemas/orders.d.ts +657 -0
- package/dist/types/schemas/orders.js +101 -0
- package/dist/types/schemas/payments.d.ts +46 -0
- package/dist/types/schemas/payments.js +24 -0
- package/dist/types/schemas/payroll.d.ts +146 -0
- package/dist/types/schemas/payroll.js +65 -0
- package/dist/types/schemas/projects.d.ts +268 -0
- package/dist/types/schemas/projects.js +102 -0
- package/dist/types/schemas/purchase.d.ts +228 -0
- package/dist/types/schemas/purchase.js +114 -0
- package/dist/types/schemas/quotes.d.ts +102 -0
- package/dist/types/schemas/quotes.js +49 -0
- package/dist/types/schemas/reference.d.ts +240 -0
- package/dist/types/schemas/reference.js +99 -0
- package/dist/types/schemas/reminders.d.ts +76 -0
- package/dist/types/schemas/reminders.js +38 -0
- package/dist/types/schemas/reports.d.ts +69 -0
- package/dist/types/schemas/reports.js +36 -0
- package/dist/types/schemas/timetracking.d.ts +150 -0
- package/dist/types/schemas/timetracking.js +68 -0
- package/dist/types/schemas/users.d.ts +51 -0
- package/dist/types/schemas/users.js +27 -0
- package/dist/ui/contact-card/mcp-app.d.ts +1 -0
- package/dist/ui/contact-card/mcp-app.js +108 -0
- package/dist/ui/dashboard/mcp-app.d.ts +1 -0
- package/dist/ui/dashboard/mcp-app.js +81 -0
- package/dist/ui/invoice-preview/mcp-app.d.ts +1 -0
- package/dist/ui/invoice-preview/mcp-app.js +96 -0
- package/dist/ui-resources.d.ts +17 -0
- package/dist/ui-resources.js +124 -0
- package/dist/vite.config.d.ts +2 -0
- package/dist/vite.config.js +46 -0
- package/package.json +78 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote tool definitions.
|
|
3
|
+
* Contains MCP tool metadata for quotes/offers domain.
|
|
4
|
+
*/
|
|
5
|
+
export const toolDefinitions = [
|
|
6
|
+
{
|
|
7
|
+
name: "list_quotes",
|
|
8
|
+
description: "List quotes (offers) from Bexio with optional pagination",
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {
|
|
12
|
+
limit: {
|
|
13
|
+
type: "integer",
|
|
14
|
+
description: "Maximum number of quotes to return (default: 50)",
|
|
15
|
+
default: 50,
|
|
16
|
+
},
|
|
17
|
+
offset: {
|
|
18
|
+
type: "integer",
|
|
19
|
+
description: "Number of quotes to skip (default: 0)",
|
|
20
|
+
default: 0,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "get_quote",
|
|
27
|
+
description: "Get a specific quote by ID",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
quote_id: {
|
|
32
|
+
type: "integer",
|
|
33
|
+
description: "The ID of the quote to retrieve",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ["quote_id"],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "create_quote",
|
|
41
|
+
description: "Create a new quote (offer) for an existing contact",
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
contact_id: {
|
|
46
|
+
type: "integer",
|
|
47
|
+
description: "The contact ID the quote should be created for",
|
|
48
|
+
},
|
|
49
|
+
quote_data: {
|
|
50
|
+
type: "object",
|
|
51
|
+
description: "Quote payload according to Bexio's /kb_offer schema. The contact_id is merged automatically.",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: ["contact_id", "quote_data"],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "search_quotes",
|
|
59
|
+
description: "Search quotes with filters",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
search_params: {
|
|
64
|
+
type: "object",
|
|
65
|
+
description: "Search parameters for quotes",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
required: ["search_params"],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "search_quotes_by_customer",
|
|
73
|
+
description: "Search quotes by customer name (2-step process: find contact by name, then find quotes by contact_id)",
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
customer_name: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: 'Customer name to search for (e.g., "Anton", "Mustermann")',
|
|
80
|
+
},
|
|
81
|
+
limit: {
|
|
82
|
+
type: "integer",
|
|
83
|
+
description: "Maximum number of quotes to return (default: 50)",
|
|
84
|
+
default: 50,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
required: ["customer_name"],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "issue_quote",
|
|
92
|
+
description: "Issue a quote",
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: "object",
|
|
95
|
+
properties: {
|
|
96
|
+
quote_id: {
|
|
97
|
+
type: "integer",
|
|
98
|
+
description: "The ID of the quote to issue",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
required: ["quote_id"],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "accept_quote",
|
|
106
|
+
description: "Accept a quote",
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: "object",
|
|
109
|
+
properties: {
|
|
110
|
+
quote_id: {
|
|
111
|
+
type: "integer",
|
|
112
|
+
description: "The ID of the quote to accept",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
required: ["quote_id"],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "decline_quote",
|
|
120
|
+
description: "Decline a quote",
|
|
121
|
+
inputSchema: {
|
|
122
|
+
type: "object",
|
|
123
|
+
properties: {
|
|
124
|
+
quote_id: {
|
|
125
|
+
type: "integer",
|
|
126
|
+
description: "The ID of the quote to decline",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
required: ["quote_id"],
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "send_quote",
|
|
134
|
+
description: "Send a quote",
|
|
135
|
+
inputSchema: {
|
|
136
|
+
type: "object",
|
|
137
|
+
properties: {
|
|
138
|
+
quote_id: {
|
|
139
|
+
type: "integer",
|
|
140
|
+
description: "The ID of the quote to send",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
required: ["quote_id"],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "create_order_from_quote",
|
|
148
|
+
description: "Create an order from a quote",
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
quote_id: {
|
|
153
|
+
type: "integer",
|
|
154
|
+
description: "The ID of the quote to create an order from",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
required: ["quote_id"],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "create_invoice_from_quote",
|
|
162
|
+
description: "Create an invoice from a quote",
|
|
163
|
+
inputSchema: {
|
|
164
|
+
type: "object",
|
|
165
|
+
properties: {
|
|
166
|
+
quote_id: {
|
|
167
|
+
type: "integer",
|
|
168
|
+
description: "The ID of the quote to create an invoice from",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
required: ["quote_id"],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote tool handlers.
|
|
3
|
+
* Implements the logic for each quote tool.
|
|
4
|
+
*/
|
|
5
|
+
import { BexioClient } from "../../bexio-client.js";
|
|
6
|
+
export type HandlerFn = (client: BexioClient, args: unknown) => Promise<unknown>;
|
|
7
|
+
export declare const handlers: Record<string, HandlerFn>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quote tool handlers.
|
|
3
|
+
* Implements the logic for each quote tool.
|
|
4
|
+
*/
|
|
5
|
+
import { McpError } from "../../shared/errors.js";
|
|
6
|
+
import { ListQuotesParamsSchema, GetQuoteParamsSchema, CreateQuoteParamsSchema, SearchQuotesParamsSchema, SearchQuotesByCustomerParamsSchema, IssueQuoteParamsSchema, AcceptQuoteParamsSchema, DeclineQuoteParamsSchema, SendQuoteParamsSchema, CreateOrderFromQuoteParamsSchema, CreateInvoiceFromQuoteParamsSchema, } from "../../types/index.js";
|
|
7
|
+
export const handlers = {
|
|
8
|
+
list_quotes: async (client, args) => {
|
|
9
|
+
const params = ListQuotesParamsSchema.parse(args);
|
|
10
|
+
return client.listQuotes(params);
|
|
11
|
+
},
|
|
12
|
+
get_quote: async (client, args) => {
|
|
13
|
+
const { quote_id } = GetQuoteParamsSchema.parse(args);
|
|
14
|
+
const quote = await client.getQuote(quote_id);
|
|
15
|
+
if (!quote) {
|
|
16
|
+
throw McpError.notFound("Quote", quote_id);
|
|
17
|
+
}
|
|
18
|
+
return quote;
|
|
19
|
+
},
|
|
20
|
+
create_quote: async (client, args) => {
|
|
21
|
+
const { contact_id, quote_data } = CreateQuoteParamsSchema.parse(args);
|
|
22
|
+
const payload = { ...quote_data, contact_id };
|
|
23
|
+
return client.createQuote(payload);
|
|
24
|
+
},
|
|
25
|
+
search_quotes: async (client, args) => {
|
|
26
|
+
const { search_params } = SearchQuotesParamsSchema.parse(args);
|
|
27
|
+
return client.searchQuotes(search_params);
|
|
28
|
+
},
|
|
29
|
+
search_quotes_by_customer: async (client, args) => {
|
|
30
|
+
const params = SearchQuotesByCustomerParamsSchema.parse(args);
|
|
31
|
+
// Step 1: Find contacts by name
|
|
32
|
+
const contacts = await client.findContactByName(params.customer_name);
|
|
33
|
+
if (!contacts || contacts.length === 0) {
|
|
34
|
+
return {
|
|
35
|
+
quotes: [],
|
|
36
|
+
message: `No contacts found with name "${params.customer_name}"`,
|
|
37
|
+
contacts_found: 0,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Step 2: Search quotes for each contact (limit to first 5)
|
|
41
|
+
const allQuotes = [];
|
|
42
|
+
for (const contact of contacts.slice(0, 5)) {
|
|
43
|
+
const contactId = contact.id;
|
|
44
|
+
if (contactId) {
|
|
45
|
+
const quotes = await client.searchQuotesByContactId(contactId);
|
|
46
|
+
allQuotes.push(...quotes);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
quotes: allQuotes,
|
|
51
|
+
contacts_found: contacts.length,
|
|
52
|
+
customer_name: params.customer_name,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
issue_quote: async (client, args) => {
|
|
56
|
+
const { quote_id } = IssueQuoteParamsSchema.parse(args);
|
|
57
|
+
return client.issueQuote(quote_id);
|
|
58
|
+
},
|
|
59
|
+
accept_quote: async (client, args) => {
|
|
60
|
+
const { quote_id } = AcceptQuoteParamsSchema.parse(args);
|
|
61
|
+
return client.acceptQuote(quote_id);
|
|
62
|
+
},
|
|
63
|
+
decline_quote: async (client, args) => {
|
|
64
|
+
const { quote_id } = DeclineQuoteParamsSchema.parse(args);
|
|
65
|
+
return client.declineQuote(quote_id);
|
|
66
|
+
},
|
|
67
|
+
send_quote: async (client, args) => {
|
|
68
|
+
const { quote_id } = SendQuoteParamsSchema.parse(args);
|
|
69
|
+
return client.sendQuote(quote_id);
|
|
70
|
+
},
|
|
71
|
+
create_order_from_quote: async (client, args) => {
|
|
72
|
+
const { quote_id } = CreateOrderFromQuoteParamsSchema.parse(args);
|
|
73
|
+
return client.createOrderFromQuote(quote_id);
|
|
74
|
+
},
|
|
75
|
+
create_invoice_from_quote: async (client, args) => {
|
|
76
|
+
const { quote_id } = CreateInvoiceFromQuoteParamsSchema.parse(args);
|
|
77
|
+
return client.createInvoiceFromQuote(quote_id);
|
|
78
|
+
},
|
|
79
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference data tool definitions.
|
|
3
|
+
* Contains MCP tool metadata for reference data domain.
|
|
4
|
+
* Includes: Contact Groups, Sectors, Salutations, Titles, Countries, Languages, Units
|
|
5
|
+
*/
|
|
6
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
export declare const toolDefinitions: Tool[];
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reference data tool definitions.
|
|
3
|
+
* Contains MCP tool metadata for reference data domain.
|
|
4
|
+
* Includes: Contact Groups, Sectors, Salutations, Titles, Countries, Languages, Units
|
|
5
|
+
*/
|
|
6
|
+
export const toolDefinitions = [
|
|
7
|
+
// ===== CONTACT GROUPS (REFDATA-01) =====
|
|
8
|
+
{
|
|
9
|
+
name: "list_contact_groups",
|
|
10
|
+
description: "List all contact groups for categorizing contacts",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
limit: {
|
|
15
|
+
type: "integer",
|
|
16
|
+
description: "Maximum number of results to return (default: 100)",
|
|
17
|
+
default: 100,
|
|
18
|
+
},
|
|
19
|
+
offset: {
|
|
20
|
+
type: "integer",
|
|
21
|
+
description: "Number of results to skip (default: 0)",
|
|
22
|
+
default: 0,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "get_contact_group",
|
|
29
|
+
description: "Get a specific contact group by ID",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
group_id: {
|
|
34
|
+
type: "integer",
|
|
35
|
+
description: "The ID of the contact group to retrieve",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ["group_id"],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "create_contact_group",
|
|
43
|
+
description: "Create a new contact group for categorizing contacts",
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
name: {
|
|
48
|
+
type: "string",
|
|
49
|
+
description: "The name of the contact group",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ["name"],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "delete_contact_group",
|
|
57
|
+
description: "Delete a contact group by ID",
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: {
|
|
61
|
+
group_id: {
|
|
62
|
+
type: "integer",
|
|
63
|
+
description: "The ID of the contact group to delete",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
required: ["group_id"],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
// ===== CONTACT SECTORS (REFDATA-02) =====
|
|
70
|
+
{
|
|
71
|
+
name: "list_contact_sectors",
|
|
72
|
+
description: "List all contact sectors (industry types for contacts)",
|
|
73
|
+
inputSchema: {
|
|
74
|
+
type: "object",
|
|
75
|
+
properties: {
|
|
76
|
+
limit: {
|
|
77
|
+
type: "integer",
|
|
78
|
+
description: "Maximum number of results to return (default: 100)",
|
|
79
|
+
default: 100,
|
|
80
|
+
},
|
|
81
|
+
offset: {
|
|
82
|
+
type: "integer",
|
|
83
|
+
description: "Number of results to skip (default: 0)",
|
|
84
|
+
default: 0,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "get_contact_sector",
|
|
91
|
+
description: "Get a specific contact sector by ID",
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: "object",
|
|
94
|
+
properties: {
|
|
95
|
+
sector_id: {
|
|
96
|
+
type: "integer",
|
|
97
|
+
description: "The ID of the contact sector to retrieve",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ["sector_id"],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "create_contact_sector",
|
|
105
|
+
description: "Create a new contact sector (industry type)",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: {
|
|
109
|
+
name: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "The name of the contact sector",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ["name"],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
// ===== SALUTATIONS (REFDATA-03) =====
|
|
118
|
+
{
|
|
119
|
+
name: "list_salutations",
|
|
120
|
+
description: "List all salutations (e.g., Mr., Mrs., Dr.)",
|
|
121
|
+
inputSchema: {
|
|
122
|
+
type: "object",
|
|
123
|
+
properties: {
|
|
124
|
+
limit: {
|
|
125
|
+
type: "integer",
|
|
126
|
+
description: "Maximum number of results to return (default: 100)",
|
|
127
|
+
default: 100,
|
|
128
|
+
},
|
|
129
|
+
offset: {
|
|
130
|
+
type: "integer",
|
|
131
|
+
description: "Number of results to skip (default: 0)",
|
|
132
|
+
default: 0,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "get_salutation",
|
|
139
|
+
description: "Get a specific salutation by ID",
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
salutation_id: {
|
|
144
|
+
type: "integer",
|
|
145
|
+
description: "The ID of the salutation to retrieve",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
required: ["salutation_id"],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "create_salutation",
|
|
153
|
+
description: "Create a new salutation (e.g., Mr., Mrs., Dr.)",
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: "object",
|
|
156
|
+
properties: {
|
|
157
|
+
name: {
|
|
158
|
+
type: "string",
|
|
159
|
+
description: "The name of the salutation",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
required: ["name"],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "delete_salutation",
|
|
167
|
+
description: "Delete a salutation by ID",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
salutation_id: {
|
|
172
|
+
type: "integer",
|
|
173
|
+
description: "The ID of the salutation to delete",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
required: ["salutation_id"],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
// ===== TITLES (REFDATA-04) =====
|
|
180
|
+
{
|
|
181
|
+
name: "list_titles",
|
|
182
|
+
description: "List all titles (e.g., CEO, Manager, Director)",
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: "object",
|
|
185
|
+
properties: {
|
|
186
|
+
limit: {
|
|
187
|
+
type: "integer",
|
|
188
|
+
description: "Maximum number of results to return (default: 100)",
|
|
189
|
+
default: 100,
|
|
190
|
+
},
|
|
191
|
+
offset: {
|
|
192
|
+
type: "integer",
|
|
193
|
+
description: "Number of results to skip (default: 0)",
|
|
194
|
+
default: 0,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "get_title",
|
|
201
|
+
description: "Get a specific title by ID",
|
|
202
|
+
inputSchema: {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: {
|
|
205
|
+
title_id: {
|
|
206
|
+
type: "integer",
|
|
207
|
+
description: "The ID of the title to retrieve",
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
required: ["title_id"],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: "create_title",
|
|
215
|
+
description: "Create a new title (e.g., CEO, Manager, Director)",
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: "object",
|
|
218
|
+
properties: {
|
|
219
|
+
name: {
|
|
220
|
+
type: "string",
|
|
221
|
+
description: "The name of the title",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
required: ["name"],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "delete_title",
|
|
229
|
+
description: "Delete a title by ID",
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: "object",
|
|
232
|
+
properties: {
|
|
233
|
+
title_id: {
|
|
234
|
+
type: "integer",
|
|
235
|
+
description: "The ID of the title to delete",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
required: ["title_id"],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
// ===== COUNTRIES (REFDATA-05) =====
|
|
242
|
+
{
|
|
243
|
+
name: "list_countries",
|
|
244
|
+
description: "List all countries available in Bexio",
|
|
245
|
+
inputSchema: {
|
|
246
|
+
type: "object",
|
|
247
|
+
properties: {
|
|
248
|
+
limit: {
|
|
249
|
+
type: "integer",
|
|
250
|
+
description: "Maximum number of results to return (default: 100)",
|
|
251
|
+
default: 100,
|
|
252
|
+
},
|
|
253
|
+
offset: {
|
|
254
|
+
type: "integer",
|
|
255
|
+
description: "Number of results to skip (default: 0)",
|
|
256
|
+
default: 0,
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: "get_country",
|
|
263
|
+
description: "Get a specific country by ID",
|
|
264
|
+
inputSchema: {
|
|
265
|
+
type: "object",
|
|
266
|
+
properties: {
|
|
267
|
+
country_id: {
|
|
268
|
+
type: "integer",
|
|
269
|
+
description: "The ID of the country to retrieve",
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
required: ["country_id"],
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: "create_country",
|
|
277
|
+
description: "Create a new country entry",
|
|
278
|
+
inputSchema: {
|
|
279
|
+
type: "object",
|
|
280
|
+
properties: {
|
|
281
|
+
name: {
|
|
282
|
+
type: "string",
|
|
283
|
+
description: "The name of the country",
|
|
284
|
+
},
|
|
285
|
+
iso_3166_alpha2: {
|
|
286
|
+
type: "string",
|
|
287
|
+
description: "ISO 3166 alpha-2 country code (2 characters, e.g., 'CH', 'DE')",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
required: ["name", "iso_3166_alpha2"],
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "delete_country",
|
|
295
|
+
description: "Delete a country by ID",
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
country_id: {
|
|
300
|
+
type: "integer",
|
|
301
|
+
description: "The ID of the country to delete",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
required: ["country_id"],
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
// ===== LANGUAGES (REFDATA-06) =====
|
|
308
|
+
{
|
|
309
|
+
name: "list_languages",
|
|
310
|
+
description: "List all languages available in Bexio",
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: "object",
|
|
313
|
+
properties: {
|
|
314
|
+
limit: {
|
|
315
|
+
type: "integer",
|
|
316
|
+
description: "Maximum number of results to return (default: 100)",
|
|
317
|
+
default: 100,
|
|
318
|
+
},
|
|
319
|
+
offset: {
|
|
320
|
+
type: "integer",
|
|
321
|
+
description: "Number of results to skip (default: 0)",
|
|
322
|
+
default: 0,
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "get_language",
|
|
329
|
+
description: "Get a specific language by ID",
|
|
330
|
+
inputSchema: {
|
|
331
|
+
type: "object",
|
|
332
|
+
properties: {
|
|
333
|
+
language_id: {
|
|
334
|
+
type: "integer",
|
|
335
|
+
description: "The ID of the language to retrieve",
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
required: ["language_id"],
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: "create_language",
|
|
343
|
+
description: "Create a new language entry",
|
|
344
|
+
inputSchema: {
|
|
345
|
+
type: "object",
|
|
346
|
+
properties: {
|
|
347
|
+
name: {
|
|
348
|
+
type: "string",
|
|
349
|
+
description: "The name of the language",
|
|
350
|
+
},
|
|
351
|
+
iso_639_1: {
|
|
352
|
+
type: "string",
|
|
353
|
+
description: "ISO 639-1 language code (2 characters, e.g., 'de', 'fr', 'en')",
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
required: ["name", "iso_639_1"],
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
// ===== UNITS (REFDATA-07) =====
|
|
360
|
+
{
|
|
361
|
+
name: "list_units",
|
|
362
|
+
description: "List all units of measurement (e.g., hours, pieces, kg)",
|
|
363
|
+
inputSchema: {
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
limit: {
|
|
367
|
+
type: "integer",
|
|
368
|
+
description: "Maximum number of results to return (default: 100)",
|
|
369
|
+
default: 100,
|
|
370
|
+
},
|
|
371
|
+
offset: {
|
|
372
|
+
type: "integer",
|
|
373
|
+
description: "Number of results to skip (default: 0)",
|
|
374
|
+
default: 0,
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: "get_unit",
|
|
381
|
+
description: "Get a specific unit by ID",
|
|
382
|
+
inputSchema: {
|
|
383
|
+
type: "object",
|
|
384
|
+
properties: {
|
|
385
|
+
unit_id: {
|
|
386
|
+
type: "integer",
|
|
387
|
+
description: "The ID of the unit to retrieve",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
required: ["unit_id"],
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: "create_unit",
|
|
395
|
+
description: "Create a new unit of measurement",
|
|
396
|
+
inputSchema: {
|
|
397
|
+
type: "object",
|
|
398
|
+
properties: {
|
|
399
|
+
name: {
|
|
400
|
+
type: "string",
|
|
401
|
+
description: "The name of the unit (e.g., 'hours', 'pieces', 'kg')",
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
required: ["name"],
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "delete_unit",
|
|
409
|
+
description: "Delete a unit by ID",
|
|
410
|
+
inputSchema: {
|
|
411
|
+
type: "object",
|
|
412
|
+
properties: {
|
|
413
|
+
unit_id: {
|
|
414
|
+
type: "integer",
|
|
415
|
+
description: "The ID of the unit to delete",
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
required: ["unit_id"],
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
];
|