@trustpager/mcp-server 1.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.
Files changed (61) hide show
  1. package/dist/index.d.ts +22 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +149 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/tools/activities.d.ts +7 -0
  6. package/dist/tools/activities.d.ts.map +1 -0
  7. package/dist/tools/activities.js +109 -0
  8. package/dist/tools/activities.js.map +1 -0
  9. package/dist/tools/ai.d.ts +7 -0
  10. package/dist/tools/ai.d.ts.map +1 -0
  11. package/dist/tools/ai.js +105 -0
  12. package/dist/tools/ai.js.map +1 -0
  13. package/dist/tools/automations.d.ts +7 -0
  14. package/dist/tools/automations.d.ts.map +1 -0
  15. package/dist/tools/automations.js +190 -0
  16. package/dist/tools/automations.js.map +1 -0
  17. package/dist/tools/communications.d.ts +7 -0
  18. package/dist/tools/communications.d.ts.map +1 -0
  19. package/dist/tools/communications.js +141 -0
  20. package/dist/tools/communications.js.map +1 -0
  21. package/dist/tools/contacts.d.ts +7 -0
  22. package/dist/tools/contacts.d.ts.map +1 -0
  23. package/dist/tools/contacts.js +125 -0
  24. package/dist/tools/contacts.js.map +1 -0
  25. package/dist/tools/customers.d.ts +7 -0
  26. package/dist/tools/customers.d.ts.map +1 -0
  27. package/dist/tools/customers.js +83 -0
  28. package/dist/tools/customers.js.map +1 -0
  29. package/dist/tools/deals.d.ts +7 -0
  30. package/dist/tools/deals.d.ts.map +1 -0
  31. package/dist/tools/deals.js +264 -0
  32. package/dist/tools/deals.js.map +1 -0
  33. package/dist/tools/documents.d.ts +7 -0
  34. package/dist/tools/documents.d.ts.map +1 -0
  35. package/dist/tools/documents.js +173 -0
  36. package/dist/tools/documents.js.map +1 -0
  37. package/dist/tools/forms.d.ts +7 -0
  38. package/dist/tools/forms.d.ts.map +1 -0
  39. package/dist/tools/forms.js +179 -0
  40. package/dist/tools/forms.js.map +1 -0
  41. package/dist/tools/pipelines.d.ts +7 -0
  42. package/dist/tools/pipelines.d.ts.map +1 -0
  43. package/dist/tools/pipelines.js +207 -0
  44. package/dist/tools/pipelines.js.map +1 -0
  45. package/dist/tools/platform.d.ts +7 -0
  46. package/dist/tools/platform.d.ts.map +1 -0
  47. package/dist/tools/platform.js +188 -0
  48. package/dist/tools/platform.js.map +1 -0
  49. package/dist/tools/products.d.ts +7 -0
  50. package/dist/tools/products.d.ts.map +1 -0
  51. package/dist/tools/products.js +105 -0
  52. package/dist/tools/products.js.map +1 -0
  53. package/dist/tools/tasks.d.ts +7 -0
  54. package/dist/tools/tasks.d.ts.map +1 -0
  55. package/dist/tools/tasks.js +130 -0
  56. package/dist/tools/tasks.js.map +1 -0
  57. package/dist/utils/api-client.d.ts +40 -0
  58. package/dist/utils/api-client.d.ts.map +1 -0
  59. package/dist/utils/api-client.js +98 -0
  60. package/dist/utils/api-client.js.map +1 -0
  61. package/package.json +44 -0
@@ -0,0 +1,264 @@
1
+ import { apiRequest, formatResponse, buildQuery, generateIdempotencyKey } from '../utils/api-client.js';
2
+ export const dealTools = [
3
+ {
4
+ name: 'search_deals',
5
+ description: 'Search deals/opportunities by name. Returns deals with their pipeline placements showing which pipeline and stage each deal is in.',
6
+ inputSchema: {
7
+ type: 'object',
8
+ properties: {
9
+ query: { type: 'string', description: 'Search text (matches deal name)' },
10
+ limit: { type: 'number', description: 'Max results (default 25, max 100)' },
11
+ },
12
+ required: ['query'],
13
+ },
14
+ },
15
+ {
16
+ name: 'list_deals',
17
+ description: 'List deals with optional filters. Returns paginated results with cursor navigation.',
18
+ inputSchema: {
19
+ type: 'object',
20
+ properties: {
21
+ limit: { type: 'number', description: 'Items per page (default 25, max 100)' },
22
+ after: { type: 'string', description: 'Cursor: get items after this ID' },
23
+ sort: { type: 'string', description: 'Sort field (name, created_at, expected_close_date, probability)' },
24
+ order: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction' },
25
+ status: { type: 'string', enum: ['open', 'won', 'lost'], description: 'Filter by deal status' },
26
+ contact_id: { type: 'string', description: 'Filter by contact UUID' },
27
+ customer_id: { type: 'string', description: 'Filter by customer/account UUID' },
28
+ assigned_to: { type: 'string', description: 'Filter by assigned user UUID' },
29
+ pipeline_id: { type: 'string', description: 'Filter by pipeline UUID' },
30
+ search: { type: 'string', description: 'Search text filter' },
31
+ fields: { type: 'string', description: 'Comma-separated field names to return (e.g. "id,name,status")' },
32
+ expand: { type: 'string', description: 'Expand related objects (contact, customer, products, assigned_users)' },
33
+ },
34
+ },
35
+ },
36
+ {
37
+ name: 'get_deal',
38
+ description: 'Get a single deal by ID with full details.',
39
+ inputSchema: {
40
+ type: 'object',
41
+ properties: {
42
+ id: { type: 'string', description: 'Deal UUID' },
43
+ expand: { type: 'string', description: 'Expand related objects (contact, customer, products, assigned_users)' },
44
+ },
45
+ required: ['id'],
46
+ },
47
+ },
48
+ {
49
+ name: 'create_deal',
50
+ description: 'Create a new deal/opportunity in the CRM.',
51
+ inputSchema: {
52
+ type: 'object',
53
+ properties: {
54
+ name: { type: 'string', description: 'Deal name (required)' },
55
+ contact_id: { type: 'string', description: 'Associated contact UUID' },
56
+ customer_id: { type: 'string', description: 'Associated customer/account UUID' },
57
+ currency: { type: 'string', description: 'Currency code (default AUD)' },
58
+ probability: { type: 'number', description: 'Win probability 0-100' },
59
+ expected_close_date: { type: 'string', description: 'Expected close date (YYYY-MM-DD)' },
60
+ lead_source: { type: 'string', description: 'Lead source (e.g. website, referral, cold_call)' },
61
+ notes: { type: 'string', description: 'Notes about the deal' },
62
+ tags: { type: 'array', items: { type: 'string' }, description: 'Tags for categorisation' },
63
+ },
64
+ required: ['name'],
65
+ },
66
+ },
67
+ {
68
+ name: 'update_deal',
69
+ description: 'Update an existing deal. Only include fields you want to change.',
70
+ inputSchema: {
71
+ type: 'object',
72
+ properties: {
73
+ id: { type: 'string', description: 'Deal UUID' },
74
+ name: { type: 'string' },
75
+ contact_id: { type: 'string' },
76
+ customer_id: { type: 'string' },
77
+ currency: { type: 'string' },
78
+ probability: { type: 'number' },
79
+ expected_close_date: { type: 'string' },
80
+ lead_source: { type: 'string' },
81
+ notes: { type: 'string' },
82
+ tags: { type: 'array', items: { type: 'string' } },
83
+ },
84
+ required: ['id'],
85
+ },
86
+ },
87
+ {
88
+ name: 'delete_deal',
89
+ description: 'Permanently delete a deal.',
90
+ inputSchema: {
91
+ type: 'object',
92
+ properties: { id: { type: 'string', description: 'Deal UUID' } },
93
+ required: ['id'],
94
+ },
95
+ },
96
+ {
97
+ name: 'move_deal',
98
+ description: 'Move a deal to a pipeline stage. If the deal is already in a different pipeline, it will be moved (not duplicated). Use GET /pipelines to find pipeline IDs and GET /pipelines/:id/stages to find stage IDs.',
99
+ inputSchema: {
100
+ type: 'object',
101
+ properties: {
102
+ id: { type: 'string', description: 'Deal UUID' },
103
+ pipeline_id: { type: 'string', description: 'Target pipeline UUID' },
104
+ stage_id: { type: 'string', description: 'Target stage UUID' },
105
+ },
106
+ required: ['id', 'pipeline_id', 'stage_id'],
107
+ },
108
+ },
109
+ {
110
+ name: 'add_deal_product',
111
+ description: 'Add a product/line item to a deal.',
112
+ inputSchema: {
113
+ type: 'object',
114
+ properties: {
115
+ id: { type: 'string', description: 'Deal UUID' },
116
+ product_id: { type: 'string', description: 'Product UUID to add' },
117
+ quantity: { type: 'number', description: 'Quantity (required)' },
118
+ unit_price: { type: 'number', description: 'Override unit price (uses product default if omitted)' },
119
+ discount_percent: { type: 'number', description: 'Discount percentage (0-100)' },
120
+ deposit_percent: { type: 'number', description: 'Deposit percentage (0-100)' },
121
+ },
122
+ required: ['id', 'product_id', 'quantity'],
123
+ },
124
+ },
125
+ {
126
+ name: 'remove_deal_product',
127
+ description: 'Remove a product/line item from a deal.',
128
+ inputSchema: {
129
+ type: 'object',
130
+ properties: {
131
+ id: { type: 'string', description: 'Deal UUID' },
132
+ deal_product_id: { type: 'string', description: 'Deal-product link UUID to remove' },
133
+ },
134
+ required: ['id', 'deal_product_id'],
135
+ },
136
+ },
137
+ {
138
+ name: 'assign_deal_user',
139
+ description: 'Assign a user to a deal.',
140
+ inputSchema: {
141
+ type: 'object',
142
+ properties: {
143
+ id: { type: 'string', description: 'Deal UUID' },
144
+ user_id: { type: 'string', description: 'User UUID to assign' },
145
+ },
146
+ required: ['id', 'user_id'],
147
+ },
148
+ },
149
+ {
150
+ name: 'unassign_deal_user',
151
+ description: 'Remove a user assignment from a deal.',
152
+ inputSchema: {
153
+ type: 'object',
154
+ properties: {
155
+ id: { type: 'string', description: 'Deal UUID' },
156
+ user_id: { type: 'string', description: 'User UUID to unassign' },
157
+ },
158
+ required: ['id', 'user_id'],
159
+ },
160
+ },
161
+ {
162
+ name: 'get_deal_activities',
163
+ description: 'Get the activity history for a deal (status changes, notes, emails, etc.).',
164
+ inputSchema: {
165
+ type: 'object',
166
+ properties: {
167
+ id: { type: 'string', description: 'Deal UUID' },
168
+ },
169
+ required: ['id'],
170
+ },
171
+ },
172
+ {
173
+ name: 'get_deal_tasks',
174
+ description: 'Get tasks associated with a deal.',
175
+ inputSchema: {
176
+ type: 'object',
177
+ properties: {
178
+ id: { type: 'string', description: 'Deal UUID' },
179
+ },
180
+ required: ['id'],
181
+ },
182
+ },
183
+ ];
184
+ export async function handleDealTool(name, args) {
185
+ switch (name) {
186
+ case 'search_deals': {
187
+ const res = await apiRequest('POST', '/deals/search', { query: args.query, limit: args.limit || 25 }, generateIdempotencyKey());
188
+ return formatResponse(res);
189
+ }
190
+ case 'list_deals': {
191
+ const { limit, after, sort, order, status, contact_id, customer_id, assigned_to, pipeline_id, search, fields, expand } = args;
192
+ const query = buildQuery({
193
+ limit: limit,
194
+ after: after,
195
+ sort: sort,
196
+ order: order,
197
+ status: status,
198
+ contact_id: contact_id,
199
+ customer_id: customer_id,
200
+ assigned_to: assigned_to,
201
+ pipeline_id: pipeline_id,
202
+ search: search,
203
+ fields: fields,
204
+ expand: expand,
205
+ });
206
+ const res = await apiRequest('GET', `/deals${query}`);
207
+ return formatResponse(res);
208
+ }
209
+ case 'get_deal': {
210
+ const query = args.expand ? `?expand=${args.expand}` : '';
211
+ const res = await apiRequest('GET', `/deals/${args.id}${query}`);
212
+ return formatResponse(res);
213
+ }
214
+ case 'create_deal': {
215
+ const { id: _, ...body } = args;
216
+ const res = await apiRequest('POST', '/deals', body, generateIdempotencyKey());
217
+ return formatResponse(res);
218
+ }
219
+ case 'update_deal': {
220
+ const { id, ...body } = args;
221
+ const res = await apiRequest('PATCH', `/deals/${id}`, body);
222
+ return formatResponse(res);
223
+ }
224
+ case 'delete_deal': {
225
+ const res = await apiRequest('DELETE', `/deals/${args.id}`);
226
+ return formatResponse(res);
227
+ }
228
+ case 'move_deal': {
229
+ const res = await apiRequest('POST', `/deals/${args.id}/move`, {
230
+ pipeline_id: args.pipeline_id,
231
+ stage_id: args.stage_id,
232
+ }, generateIdempotencyKey());
233
+ return formatResponse(res);
234
+ }
235
+ case 'add_deal_product': {
236
+ const { id, ...body } = args;
237
+ const res = await apiRequest('POST', `/deals/${id}/products`, body, generateIdempotencyKey());
238
+ return formatResponse(res);
239
+ }
240
+ case 'remove_deal_product': {
241
+ const res = await apiRequest('DELETE', `/deals/${args.id}/products/${args.deal_product_id}`);
242
+ return formatResponse(res);
243
+ }
244
+ case 'assign_deal_user': {
245
+ const res = await apiRequest('POST', `/deals/${args.id}/users/${args.user_id}`, undefined, generateIdempotencyKey());
246
+ return formatResponse(res);
247
+ }
248
+ case 'unassign_deal_user': {
249
+ const res = await apiRequest('DELETE', `/deals/${args.id}/users/${args.user_id}`);
250
+ return formatResponse(res);
251
+ }
252
+ case 'get_deal_activities': {
253
+ const res = await apiRequest('GET', `/deals/${args.id}/activities`);
254
+ return formatResponse(res);
255
+ }
256
+ case 'get_deal_tasks': {
257
+ const res = await apiRequest('GET', `/deals/${args.id}/tasks`);
258
+ return formatResponse(res);
259
+ }
260
+ default:
261
+ return { text: `Unknown deal tool: ${name}`, isError: true };
262
+ }
263
+ }
264
+ //# sourceMappingURL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AAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD,KAAK,qBAAqB,CAAC,CAAC,CAAC;YAC3B,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,UAAU,IAAI,CAAC,EAAE,aAAa,CAAC,CAAC;YACpE,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD,KAAK,gBAAgB,CAAC,CAAC,CAAC;YACtB,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,UAAU,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC/D,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD;YACE,OAAO,EAAE,IAAI,EAAE,sBAAsB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACjE,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ export declare const documentTools: Tool[];
3
+ export declare function handleDocumentTool(name: string, args: Record<string, unknown>): Promise<{
4
+ text: string;
5
+ isError: boolean;
6
+ }>;
7
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../src/tools/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,aAAa,EAAE,IAAI,EAoI/B,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;GAqCnF"}
@@ -0,0 +1,173 @@
1
+ import { apiRequest, formatResponse, buildQuery, generateIdempotencyKey } from '../utils/api-client.js';
2
+ export const documentTools = [
3
+ {
4
+ name: 'list_document_templates',
5
+ description: 'List all document templates.',
6
+ inputSchema: {
7
+ type: 'object',
8
+ properties: {
9
+ limit: { type: 'number', description: 'Items per page (default 25, max 100)' },
10
+ after: { type: 'string', description: 'Cursor: get items after this ID' },
11
+ },
12
+ },
13
+ },
14
+ {
15
+ name: 'get_document_template',
16
+ description: 'Get a document template by ID with its sections inline.',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ id: { type: 'string', description: 'Document template UUID' },
21
+ },
22
+ required: ['id'],
23
+ },
24
+ },
25
+ {
26
+ name: 'create_document_template',
27
+ description: 'Create a new document template.',
28
+ inputSchema: {
29
+ type: 'object',
30
+ properties: {
31
+ name: { type: 'string', description: 'Template name (required)' },
32
+ category: { type: 'string', description: 'Template category (e.g. proposal, contract, invoice)' },
33
+ page_size: { type: 'string', enum: ['A4', 'Letter'], description: 'Page size (default A4)' },
34
+ page_margins: { type: 'object', description: 'Page margin config (JSON)' },
35
+ brand_colors: { type: 'object', description: 'Brand color palette (JSON)' },
36
+ brand_typography: { type: 'object', description: 'Brand typography settings (JSON)' },
37
+ },
38
+ required: ['name'],
39
+ },
40
+ },
41
+ {
42
+ name: 'add_document_section',
43
+ description: 'Add a section to a document template.',
44
+ inputSchema: {
45
+ type: 'object',
46
+ properties: {
47
+ templateId: { type: 'string', description: 'Document template UUID' },
48
+ type: {
49
+ type: 'string',
50
+ description: 'Section type (required). Examples: TextSection, ProductTableSection, SignatureBlockSection',
51
+ },
52
+ content: { type: 'object', description: 'Section content (JSON, structure depends on type)' },
53
+ styling: { type: 'object', description: 'Section styling overrides (JSON)' },
54
+ order_index: { type: 'number', description: 'Display order' },
55
+ },
56
+ required: ['templateId', 'type'],
57
+ },
58
+ },
59
+ {
60
+ name: 'update_document_section',
61
+ description: 'Update a section on a document template. Only include fields you want to change.',
62
+ inputSchema: {
63
+ type: 'object',
64
+ properties: {
65
+ templateId: { type: 'string', description: 'Document template UUID' },
66
+ sectionId: { type: 'string', description: 'Section UUID' },
67
+ type: { type: 'string' },
68
+ content: { type: 'object' },
69
+ styling: { type: 'object' },
70
+ order_index: { type: 'number' },
71
+ },
72
+ required: ['templateId', 'sectionId'],
73
+ },
74
+ },
75
+ {
76
+ name: 'delete_document_section',
77
+ description: 'Delete a section from a document template.',
78
+ inputSchema: {
79
+ type: 'object',
80
+ properties: {
81
+ templateId: { type: 'string', description: 'Document template UUID' },
82
+ sectionId: { type: 'string', description: 'Section UUID' },
83
+ },
84
+ required: ['templateId', 'sectionId'],
85
+ },
86
+ },
87
+ {
88
+ name: 'delete_document_template',
89
+ description: 'Permanently delete a document template.',
90
+ inputSchema: {
91
+ type: 'object',
92
+ properties: { id: { type: 'string', description: 'Document template UUID' } },
93
+ required: ['id'],
94
+ },
95
+ },
96
+ {
97
+ name: 'send_for_signing',
98
+ description: 'Send a document for e-signature. Costs 5 credits.',
99
+ inputSchema: {
100
+ type: 'object',
101
+ properties: {
102
+ template_id: { type: 'string', description: 'Document template UUID (required)' },
103
+ deal_id: { type: 'string', description: 'Link to a deal UUID' },
104
+ signers: {
105
+ type: 'array',
106
+ description: 'List of signers (required)',
107
+ items: {
108
+ type: 'object',
109
+ properties: {
110
+ name: { type: 'string', description: 'Signer name' },
111
+ email: { type: 'string', description: 'Signer email' },
112
+ role: { type: 'string', description: 'Signer role (e.g. client, witness)' },
113
+ order_index: { type: 'number', description: 'Signing order' },
114
+ },
115
+ required: ['name', 'email'],
116
+ },
117
+ },
118
+ personal_message: { type: 'string', description: 'Personal message included in the signing email' },
119
+ },
120
+ required: ['template_id', 'signers'],
121
+ },
122
+ },
123
+ {
124
+ name: 'list_signing_envelopes',
125
+ description: 'List signing envelopes (sent documents awaiting or completed signatures).',
126
+ inputSchema: {
127
+ type: 'object',
128
+ properties: {
129
+ limit: { type: 'number', description: 'Items per page (default 25, max 100)' },
130
+ after: { type: 'string', description: 'Cursor: get items after this ID' },
131
+ },
132
+ },
133
+ },
134
+ ];
135
+ export async function handleDocumentTool(name, args) {
136
+ switch (name) {
137
+ case 'list_document_templates': {
138
+ const { limit, after } = args;
139
+ const query = buildQuery({ limit: limit, after: after });
140
+ return formatResponse(await apiRequest('GET', `/document-templates${query}`));
141
+ }
142
+ case 'get_document_template':
143
+ return formatResponse(await apiRequest('GET', `/document-templates/${args.id}`));
144
+ case 'create_document_template': {
145
+ const { id: _, ...body } = args;
146
+ return formatResponse(await apiRequest('POST', '/document-templates', body, generateIdempotencyKey()));
147
+ }
148
+ case 'add_document_section': {
149
+ const { templateId, ...body } = args;
150
+ return formatResponse(await apiRequest('POST', `/document-templates/${templateId}/sections`, body, generateIdempotencyKey()));
151
+ }
152
+ case 'update_document_section': {
153
+ const { templateId, sectionId, ...body } = args;
154
+ return formatResponse(await apiRequest('PATCH', `/document-templates/${templateId}/sections/${sectionId}`, body));
155
+ }
156
+ case 'delete_document_section': {
157
+ const { templateId, sectionId } = args;
158
+ return formatResponse(await apiRequest('DELETE', `/document-templates/${templateId}/sections/${sectionId}`));
159
+ }
160
+ case 'delete_document_template':
161
+ return formatResponse(await apiRequest('DELETE', `/document-templates/${args.id}`));
162
+ case 'send_for_signing':
163
+ return formatResponse(await apiRequest('POST', '/signing/send', args, generateIdempotencyKey()));
164
+ case 'list_signing_envelopes': {
165
+ const { limit, after } = args;
166
+ const query = buildQuery({ limit: limit, after: after });
167
+ return formatResponse(await apiRequest('GET', `/signing/envelopes${query}`));
168
+ }
169
+ default:
170
+ return { text: `Unknown document tool: ${name}`, isError: true };
171
+ }
172
+ }
173
+ //# sourceMappingURL=documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../src/tools/documents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAExG,MAAM,CAAC,MAAM,aAAa,GAAW;IACnC;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EA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ontextprotocol/sdk/types.js';
2
+ export declare const formTools: Tool[];
3
+ export declare function handleFormTool(name: string, args: Record<string, unknown>): Promise<{
4
+ text: string;
5
+ isError: boolean;
6
+ }>;
7
+ //# sourceMappingURL=forms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/tools/forms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,SAAS,EAAE,IAAI,EAkI3B,CAAC;AAEF,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;GA6C/E"}