@trustpager/mcp-server 1.1.0 → 1.1.2
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/dist/index.d.ts +1 -1
- package/dist/index.js +3 -115
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +57 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +152 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/activities.d.ts.map +1 -1
- package/dist/tools/activities.js +18 -5
- package/dist/tools/activities.js.map +1 -1
- package/dist/tools/ai.js +5 -5
- package/dist/tools/ai.js.map +1 -1
- package/dist/tools/automations.d.ts.map +1 -1
- package/dist/tools/automations.js +26 -20
- package/dist/tools/automations.js.map +1 -1
- package/dist/tools/communications.d.ts.map +1 -1
- package/dist/tools/communications.js +35 -22
- package/dist/tools/communications.js.map +1 -1
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +16 -12
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/crm-templates.js +5 -5
- package/dist/tools/crm-templates.js.map +1 -1
- package/dist/tools/customers.d.ts.map +1 -1
- package/dist/tools/customers.js +16 -12
- package/dist/tools/customers.js.map +1 -1
- package/dist/tools/deals.d.ts.map +1 -1
- package/dist/tools/deals.js +22 -18
- package/dist/tools/deals.js.map +1 -1
- package/dist/tools/documents.d.ts.map +1 -1
- package/dist/tools/documents.js +78 -9
- package/dist/tools/documents.js.map +1 -1
- package/dist/tools/event-queues.js +8 -8
- package/dist/tools/event-queues.js.map +1 -1
- package/dist/tools/files.d.ts +7 -0
- package/dist/tools/files.d.ts.map +1 -0
- package/dist/tools/files.js +182 -0
- package/dist/tools/files.js.map +1 -0
- package/dist/tools/forms.d.ts.map +1 -1
- package/dist/tools/forms.js +74 -9
- package/dist/tools/forms.js.map +1 -1
- package/dist/tools/notepads.d.ts +7 -0
- package/dist/tools/notepads.d.ts.map +1 -0
- package/dist/tools/notepads.js +119 -0
- package/dist/tools/notepads.js.map +1 -0
- package/dist/tools/order-forms.d.ts +7 -0
- package/dist/tools/order-forms.d.ts.map +1 -0
- package/dist/tools/order-forms.js +127 -0
- package/dist/tools/order-forms.js.map +1 -0
- package/dist/tools/pipelines.js +6 -6
- package/dist/tools/pipelines.js.map +1 -1
- package/dist/tools/platform.js +14 -14
- package/dist/tools/platform.js.map +1 -1
- package/dist/tools/products.js +5 -5
- package/dist/tools/products.js.map +1 -1
- package/dist/tools/supplier-products.d.ts +7 -0
- package/dist/tools/supplier-products.d.ts.map +1 -0
- package/dist/tools/supplier-products.js +119 -0
- package/dist/tools/supplier-products.js.map +1 -0
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +19 -6
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/text-agents.d.ts +7 -0
- package/dist/tools/text-agents.d.ts.map +1 -0
- package/dist/tools/text-agents.js +90 -0
- package/dist/tools/text-agents.js.map +1 -0
- package/dist/tools/transcripts.d.ts +7 -0
- package/dist/tools/transcripts.d.ts.map +1 -0
- package/dist/tools/transcripts.js +83 -0
- package/dist/tools/transcripts.js.map +1 -0
- package/dist/tools/webhooks.js +15 -15
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/tools/work-orders.d.ts +7 -0
- package/dist/tools/work-orders.d.ts.map +1 -0
- package/dist/tools/work-orders.js +99 -0
- package/dist/tools/work-orders.js.map +1 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* TrustPager MCP Server
|
|
3
|
+
* TrustPager MCP Server — Stdio Entry Point (Local / npm)
|
|
4
4
|
*
|
|
5
5
|
* Connects Claude Desktop/Code to your TrustPager workspace via the REST API.
|
|
6
6
|
* Exposes all CRM operations as MCP tools that Claude can call.
|
|
@@ -18,121 +18,8 @@
|
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
20
|
*/
|
|
21
|
-
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
22
21
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
23
|
-
import {
|
|
24
|
-
// Tool imports
|
|
25
|
-
import { contactTools, handleContactTool } from './tools/contacts.js';
|
|
26
|
-
import { customerTools, handleCustomerTool } from './tools/customers.js';
|
|
27
|
-
import { dealTools, handleDealTool } from './tools/deals.js';
|
|
28
|
-
import { pipelineTools, handlePipelineTool } from './tools/pipelines.js';
|
|
29
|
-
import { taskTools, handleTaskTool } from './tools/tasks.js';
|
|
30
|
-
import { activityTools, handleActivityTool } from './tools/activities.js';
|
|
31
|
-
import { productTools, handleProductTool } from './tools/products.js';
|
|
32
|
-
import { automationTools, handleAutomationTool } from './tools/automations.js';
|
|
33
|
-
import { formTools, handleFormTool } from './tools/forms.js';
|
|
34
|
-
import { documentTools, handleDocumentTool } from './tools/documents.js';
|
|
35
|
-
import { communicationTools, handleCommunicationTool } from './tools/communications.js';
|
|
36
|
-
import { platformTools, handlePlatformTool } from './tools/platform.js';
|
|
37
|
-
import { aiTools, handleAiTool } from './tools/ai.js';
|
|
38
|
-
import { eventQueueTools, handleEventQueueTool } from './tools/event-queues.js';
|
|
39
|
-
import { webhookTools, handleWebhookTool } from './tools/webhooks.js';
|
|
40
|
-
import { crmTemplateTools, handleCrmTemplateTool } from './tools/crm-templates.js';
|
|
41
|
-
// =============================================================================
|
|
42
|
-
// TOOL REGISTRY
|
|
43
|
-
// =============================================================================
|
|
44
|
-
const ALL_TOOLS = [
|
|
45
|
-
...contactTools,
|
|
46
|
-
...customerTools,
|
|
47
|
-
...dealTools,
|
|
48
|
-
...pipelineTools,
|
|
49
|
-
...taskTools,
|
|
50
|
-
...activityTools,
|
|
51
|
-
...productTools,
|
|
52
|
-
...automationTools,
|
|
53
|
-
...formTools,
|
|
54
|
-
...documentTools,
|
|
55
|
-
...communicationTools,
|
|
56
|
-
...platformTools,
|
|
57
|
-
...aiTools,
|
|
58
|
-
...eventQueueTools,
|
|
59
|
-
...webhookTools,
|
|
60
|
-
...crmTemplateTools,
|
|
61
|
-
];
|
|
62
|
-
/** Map tool name → handler function */
|
|
63
|
-
const TOOL_HANDLERS = {};
|
|
64
|
-
// Register all handlers by tool name
|
|
65
|
-
for (const tool of contactTools)
|
|
66
|
-
TOOL_HANDLERS[tool.name] = handleContactTool;
|
|
67
|
-
for (const tool of customerTools)
|
|
68
|
-
TOOL_HANDLERS[tool.name] = handleCustomerTool;
|
|
69
|
-
for (const tool of dealTools)
|
|
70
|
-
TOOL_HANDLERS[tool.name] = handleDealTool;
|
|
71
|
-
for (const tool of pipelineTools)
|
|
72
|
-
TOOL_HANDLERS[tool.name] = handlePipelineTool;
|
|
73
|
-
for (const tool of taskTools)
|
|
74
|
-
TOOL_HANDLERS[tool.name] = handleTaskTool;
|
|
75
|
-
for (const tool of activityTools)
|
|
76
|
-
TOOL_HANDLERS[tool.name] = handleActivityTool;
|
|
77
|
-
for (const tool of productTools)
|
|
78
|
-
TOOL_HANDLERS[tool.name] = handleProductTool;
|
|
79
|
-
for (const tool of automationTools)
|
|
80
|
-
TOOL_HANDLERS[tool.name] = handleAutomationTool;
|
|
81
|
-
for (const tool of formTools)
|
|
82
|
-
TOOL_HANDLERS[tool.name] = handleFormTool;
|
|
83
|
-
for (const tool of documentTools)
|
|
84
|
-
TOOL_HANDLERS[tool.name] = handleDocumentTool;
|
|
85
|
-
for (const tool of communicationTools)
|
|
86
|
-
TOOL_HANDLERS[tool.name] = handleCommunicationTool;
|
|
87
|
-
for (const tool of platformTools)
|
|
88
|
-
TOOL_HANDLERS[tool.name] = handlePlatformTool;
|
|
89
|
-
for (const tool of aiTools)
|
|
90
|
-
TOOL_HANDLERS[tool.name] = handleAiTool;
|
|
91
|
-
for (const tool of eventQueueTools)
|
|
92
|
-
TOOL_HANDLERS[tool.name] = handleEventQueueTool;
|
|
93
|
-
for (const tool of webhookTools)
|
|
94
|
-
TOOL_HANDLERS[tool.name] = handleWebhookTool;
|
|
95
|
-
for (const tool of crmTemplateTools)
|
|
96
|
-
TOOL_HANDLERS[tool.name] = handleCrmTemplateTool;
|
|
97
|
-
// =============================================================================
|
|
98
|
-
// SERVER
|
|
99
|
-
// =============================================================================
|
|
100
|
-
const server = new Server({ name: '@trustpager/mcp-server', version: '1.0.0' }, { capabilities: { tools: {} } });
|
|
101
|
-
// List all available tools
|
|
102
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
103
|
-
return { tools: ALL_TOOLS };
|
|
104
|
-
});
|
|
105
|
-
// Handle tool calls
|
|
106
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
107
|
-
const { name, arguments: args } = request.params;
|
|
108
|
-
const handler = TOOL_HANDLERS[name];
|
|
109
|
-
if (!handler) {
|
|
110
|
-
return {
|
|
111
|
-
content: [{
|
|
112
|
-
type: 'text',
|
|
113
|
-
text: `Unknown tool: "${name}". Available tools: ${ALL_TOOLS.map(t => t.name).join(', ')}`,
|
|
114
|
-
}],
|
|
115
|
-
isError: true,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
try {
|
|
119
|
-
const result = await handler(name, (args || {}));
|
|
120
|
-
return {
|
|
121
|
-
content: [{ type: 'text', text: result.text }],
|
|
122
|
-
isError: result.isError,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
127
|
-
return {
|
|
128
|
-
content: [{ type: 'text', text: `Error in ${name}: ${message}` }],
|
|
129
|
-
isError: true,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
// =============================================================================
|
|
134
|
-
// START
|
|
135
|
-
// =============================================================================
|
|
22
|
+
import { createServer } from './server.js';
|
|
136
23
|
async function main() {
|
|
137
24
|
// Validate API key is set before starting
|
|
138
25
|
if (!process.env.TRUSTPAGER_API_KEY) {
|
|
@@ -151,6 +38,7 @@ async function main() {
|
|
|
151
38
|
'}');
|
|
152
39
|
process.exit(1);
|
|
153
40
|
}
|
|
41
|
+
const server = createServer();
|
|
154
42
|
const transport = new StdioServerTransport();
|
|
155
43
|
await server.connect(transport);
|
|
156
44
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,UAAU,IAAI;IACjB,0CAA0C;IAC1C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,CAAC;QACpC,OAAO,CAAC,KAAK,CACX,8DAA8D;YAC9D,yCAAyC;YACzC,KAAK;YACL,qBAAqB;YACrB,uBAAuB;YACvB,2BAA2B;YAC3B,mDAAmD;YACnD,kBAAkB;YAClB,yDAAyD;YACzD,WAAW;YACX,SAAS;YACT,OAAO;YACP,GAAG,CACJ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP Server Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates a configured MCP server with all TrustPager tools registered.
|
|
5
|
+
* Used by both the stdio entry point (npm/local) and the HTTP entry point (Vercel/remote).
|
|
6
|
+
*/
|
|
7
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
8
|
+
export declare const ALL_TOOLS: {
|
|
9
|
+
inputSchema: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
type: "object";
|
|
12
|
+
properties?: {
|
|
13
|
+
[x: string]: object;
|
|
14
|
+
} | undefined;
|
|
15
|
+
required?: string[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
outputSchema?: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
type: "object";
|
|
22
|
+
properties?: {
|
|
23
|
+
[x: string]: object;
|
|
24
|
+
} | undefined;
|
|
25
|
+
required?: string[] | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
annotations?: {
|
|
28
|
+
title?: string | undefined;
|
|
29
|
+
readOnlyHint?: boolean | undefined;
|
|
30
|
+
destructiveHint?: boolean | undefined;
|
|
31
|
+
idempotentHint?: boolean | undefined;
|
|
32
|
+
openWorldHint?: boolean | undefined;
|
|
33
|
+
} | undefined;
|
|
34
|
+
execution?: {
|
|
35
|
+
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
_meta?: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
} | undefined;
|
|
40
|
+
icons?: {
|
|
41
|
+
src: string;
|
|
42
|
+
mimeType?: string | undefined;
|
|
43
|
+
sizes?: string[] | undefined;
|
|
44
|
+
theme?: "light" | "dark" | undefined;
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
title?: string | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
/** Map tool name → handler function */
|
|
49
|
+
export declare const TOOL_HANDLERS: Record<string, (name: string, args: Record<string, unknown>) => Promise<{
|
|
50
|
+
text: string;
|
|
51
|
+
isError: boolean;
|
|
52
|
+
}>>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a configured MCP server with all TrustPager tools registered.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createServer(): Server;
|
|
57
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAmCnE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwBrB,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAM,CAAC;AA+B9I;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA0CrC"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP Server Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates a configured MCP server with all TrustPager tools registered.
|
|
5
|
+
* Used by both the stdio entry point (npm/local) and the HTTP entry point (Vercel/remote).
|
|
6
|
+
*/
|
|
7
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
8
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
9
|
+
// Tool imports
|
|
10
|
+
import { contactTools, handleContactTool } from './tools/contacts.js';
|
|
11
|
+
import { customerTools, handleCustomerTool } from './tools/customers.js';
|
|
12
|
+
import { dealTools, handleDealTool } from './tools/deals.js';
|
|
13
|
+
import { pipelineTools, handlePipelineTool } from './tools/pipelines.js';
|
|
14
|
+
import { taskTools, handleTaskTool } from './tools/tasks.js';
|
|
15
|
+
import { activityTools, handleActivityTool } from './tools/activities.js';
|
|
16
|
+
import { productTools, handleProductTool } from './tools/products.js';
|
|
17
|
+
import { automationTools, handleAutomationTool } from './tools/automations.js';
|
|
18
|
+
import { formTools, handleFormTool } from './tools/forms.js';
|
|
19
|
+
import { documentTools, handleDocumentTool } from './tools/documents.js';
|
|
20
|
+
import { communicationTools, handleCommunicationTool } from './tools/communications.js';
|
|
21
|
+
import { platformTools, handlePlatformTool } from './tools/platform.js';
|
|
22
|
+
import { aiTools, handleAiTool } from './tools/ai.js';
|
|
23
|
+
import { eventQueueTools, handleEventQueueTool } from './tools/event-queues.js';
|
|
24
|
+
import { webhookTools, handleWebhookTool } from './tools/webhooks.js';
|
|
25
|
+
import { crmTemplateTools, handleCrmTemplateTool } from './tools/crm-templates.js';
|
|
26
|
+
import { transcriptTools, handleTranscriptTool } from './tools/transcripts.js';
|
|
27
|
+
import { notepadTools, handleNotepadTool } from './tools/notepads.js';
|
|
28
|
+
import { orderFormTools, handleOrderFormTool } from './tools/order-forms.js';
|
|
29
|
+
import { textAgentTools, handleTextAgentTool } from './tools/text-agents.js';
|
|
30
|
+
import { supplierProductTools, handleSupplierProductTool } from './tools/supplier-products.js';
|
|
31
|
+
import { fileTools, handleFileTool } from './tools/files.js';
|
|
32
|
+
import { workOrderTools, handleWorkOrderTool } from './tools/work-orders.js';
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// TOOL REGISTRY
|
|
35
|
+
// =============================================================================
|
|
36
|
+
export const ALL_TOOLS = [
|
|
37
|
+
...contactTools,
|
|
38
|
+
...customerTools,
|
|
39
|
+
...dealTools,
|
|
40
|
+
...pipelineTools,
|
|
41
|
+
...taskTools,
|
|
42
|
+
...activityTools,
|
|
43
|
+
...productTools,
|
|
44
|
+
...automationTools,
|
|
45
|
+
...formTools,
|
|
46
|
+
...documentTools,
|
|
47
|
+
...communicationTools,
|
|
48
|
+
...platformTools,
|
|
49
|
+
...aiTools,
|
|
50
|
+
...eventQueueTools,
|
|
51
|
+
...webhookTools,
|
|
52
|
+
...crmTemplateTools,
|
|
53
|
+
...transcriptTools,
|
|
54
|
+
...notepadTools,
|
|
55
|
+
...orderFormTools,
|
|
56
|
+
...textAgentTools,
|
|
57
|
+
...supplierProductTools,
|
|
58
|
+
...fileTools,
|
|
59
|
+
...workOrderTools,
|
|
60
|
+
];
|
|
61
|
+
/** Map tool name → handler function */
|
|
62
|
+
export const TOOL_HANDLERS = {};
|
|
63
|
+
// Register all handlers by tool name
|
|
64
|
+
for (const tool of contactTools)
|
|
65
|
+
TOOL_HANDLERS[tool.name] = handleContactTool;
|
|
66
|
+
for (const tool of customerTools)
|
|
67
|
+
TOOL_HANDLERS[tool.name] = handleCustomerTool;
|
|
68
|
+
for (const tool of dealTools)
|
|
69
|
+
TOOL_HANDLERS[tool.name] = handleDealTool;
|
|
70
|
+
for (const tool of pipelineTools)
|
|
71
|
+
TOOL_HANDLERS[tool.name] = handlePipelineTool;
|
|
72
|
+
for (const tool of taskTools)
|
|
73
|
+
TOOL_HANDLERS[tool.name] = handleTaskTool;
|
|
74
|
+
for (const tool of activityTools)
|
|
75
|
+
TOOL_HANDLERS[tool.name] = handleActivityTool;
|
|
76
|
+
for (const tool of productTools)
|
|
77
|
+
TOOL_HANDLERS[tool.name] = handleProductTool;
|
|
78
|
+
for (const tool of automationTools)
|
|
79
|
+
TOOL_HANDLERS[tool.name] = handleAutomationTool;
|
|
80
|
+
for (const tool of formTools)
|
|
81
|
+
TOOL_HANDLERS[tool.name] = handleFormTool;
|
|
82
|
+
for (const tool of documentTools)
|
|
83
|
+
TOOL_HANDLERS[tool.name] = handleDocumentTool;
|
|
84
|
+
for (const tool of communicationTools)
|
|
85
|
+
TOOL_HANDLERS[tool.name] = handleCommunicationTool;
|
|
86
|
+
for (const tool of platformTools)
|
|
87
|
+
TOOL_HANDLERS[tool.name] = handlePlatformTool;
|
|
88
|
+
for (const tool of aiTools)
|
|
89
|
+
TOOL_HANDLERS[tool.name] = handleAiTool;
|
|
90
|
+
for (const tool of eventQueueTools)
|
|
91
|
+
TOOL_HANDLERS[tool.name] = handleEventQueueTool;
|
|
92
|
+
for (const tool of webhookTools)
|
|
93
|
+
TOOL_HANDLERS[tool.name] = handleWebhookTool;
|
|
94
|
+
for (const tool of crmTemplateTools)
|
|
95
|
+
TOOL_HANDLERS[tool.name] = handleCrmTemplateTool;
|
|
96
|
+
for (const tool of transcriptTools)
|
|
97
|
+
TOOL_HANDLERS[tool.name] = handleTranscriptTool;
|
|
98
|
+
for (const tool of notepadTools)
|
|
99
|
+
TOOL_HANDLERS[tool.name] = handleNotepadTool;
|
|
100
|
+
for (const tool of orderFormTools)
|
|
101
|
+
TOOL_HANDLERS[tool.name] = handleOrderFormTool;
|
|
102
|
+
for (const tool of textAgentTools)
|
|
103
|
+
TOOL_HANDLERS[tool.name] = handleTextAgentTool;
|
|
104
|
+
for (const tool of supplierProductTools)
|
|
105
|
+
TOOL_HANDLERS[tool.name] = handleSupplierProductTool;
|
|
106
|
+
for (const tool of fileTools)
|
|
107
|
+
TOOL_HANDLERS[tool.name] = handleFileTool;
|
|
108
|
+
for (const tool of workOrderTools)
|
|
109
|
+
TOOL_HANDLERS[tool.name] = handleWorkOrderTool;
|
|
110
|
+
// =============================================================================
|
|
111
|
+
// SERVER FACTORY
|
|
112
|
+
// =============================================================================
|
|
113
|
+
/**
|
|
114
|
+
* Create a configured MCP server with all TrustPager tools registered.
|
|
115
|
+
*/
|
|
116
|
+
export function createServer() {
|
|
117
|
+
const server = new Server({ name: '@trustpager/mcp-server', version: '1.1.0' }, { capabilities: { tools: {} } });
|
|
118
|
+
// List all available tools
|
|
119
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
120
|
+
return { tools: ALL_TOOLS };
|
|
121
|
+
});
|
|
122
|
+
// Handle tool calls
|
|
123
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
124
|
+
const { name, arguments: args } = request.params;
|
|
125
|
+
const handler = TOOL_HANDLERS[name];
|
|
126
|
+
if (!handler) {
|
|
127
|
+
return {
|
|
128
|
+
content: [{
|
|
129
|
+
type: 'text',
|
|
130
|
+
text: `Unknown tool: "${name}". Available tools: ${ALL_TOOLS.map(t => t.name).join(', ')}`,
|
|
131
|
+
}],
|
|
132
|
+
isError: true,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const result = await handler(name, (args || {}));
|
|
137
|
+
return {
|
|
138
|
+
content: [{ type: 'text', text: result.text }],
|
|
139
|
+
isError: result.isError,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
144
|
+
return {
|
|
145
|
+
content: [{ type: 'text', text: `Error in ${name}: ${message}` }],
|
|
146
|
+
isError: true,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
return server;
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAE5C,eAAe;AACf,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;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,IAAI,uBAAuB,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBAC3F,CAAC;gBACF,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC,CAAC;YAC5E,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;gBACvD,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YACzE,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,YAAY,IAAI,KAAK,OAAO,EAAE,EAAE,CAAC;gBAC1E,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../../src/tools/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,aAAa,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"activities.d.ts","sourceRoot":"","sources":["../../src/tools/activities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,aAAa,EAAE,IAAI,EAiF/B,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;GAqCnF"}
|
package/dist/tools/activities.js
CHANGED
|
@@ -2,7 +2,7 @@ import { apiRequest, formatResponse, buildQuery, generateIdempotencyKey } from '
|
|
|
2
2
|
export const activityTools = [
|
|
3
3
|
{
|
|
4
4
|
name: 'list_activities',
|
|
5
|
-
description: 'List activities
|
|
5
|
+
description: 'List all activities — browse, view, or get all activity history including notes, calls, emails, and meetings. Filter by deal, contact, customer, or activity type.',
|
|
6
6
|
inputSchema: {
|
|
7
7
|
type: 'object',
|
|
8
8
|
properties: {
|
|
@@ -15,9 +15,20 @@ export const activityTools = [
|
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
|
+
{
|
|
19
|
+
name: 'get_activity',
|
|
20
|
+
description: 'Get a single activity by ID with full details including type, subject, description, linked entities, and timestamps.',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
id: { type: 'string', description: 'Activity UUID' },
|
|
25
|
+
},
|
|
26
|
+
required: ['id'],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
18
29
|
{
|
|
19
30
|
name: 'add_note',
|
|
20
|
-
description: 'Add a note to a deal, contact, or customer.',
|
|
31
|
+
description: 'Add a note to a deal, contact, or customer — record observations, meeting notes, or important information. Link to one or more entities.',
|
|
21
32
|
inputSchema: {
|
|
22
33
|
type: 'object',
|
|
23
34
|
properties: {
|
|
@@ -32,7 +43,7 @@ export const activityTools = [
|
|
|
32
43
|
},
|
|
33
44
|
{
|
|
34
45
|
name: 'log_call',
|
|
35
|
-
description: 'Log a phone call with notes.',
|
|
46
|
+
description: 'Log a phone call activity with notes — record a call summary, outcome, and link it to a deal, contact, or customer for CRM tracking.',
|
|
36
47
|
inputSchema: {
|
|
37
48
|
type: 'object',
|
|
38
49
|
properties: {
|
|
@@ -47,7 +58,7 @@ export const activityTools = [
|
|
|
47
58
|
},
|
|
48
59
|
{
|
|
49
60
|
name: 'log_meeting',
|
|
50
|
-
description: 'Log a meeting with notes.',
|
|
61
|
+
description: 'Log a meeting activity with notes — record meeting outcomes, action items, and link it to a deal, contact, or customer for CRM tracking.',
|
|
51
62
|
inputSchema: {
|
|
52
63
|
type: 'object',
|
|
53
64
|
properties: {
|
|
@@ -62,7 +73,7 @@ export const activityTools = [
|
|
|
62
73
|
},
|
|
63
74
|
{
|
|
64
75
|
name: 'delete_activity',
|
|
65
|
-
description: 'Permanently delete an activity.',
|
|
76
|
+
description: 'Permanently delete an activity (note, call, or meeting record). This action cannot be undone.',
|
|
66
77
|
inputSchema: {
|
|
67
78
|
type: 'object',
|
|
68
79
|
properties: { id: { type: 'string', description: 'Activity UUID' } },
|
|
@@ -84,6 +95,8 @@ export async function handleActivityTool(name, args) {
|
|
|
84
95
|
});
|
|
85
96
|
return formatResponse(await apiRequest('GET', `/activities${query}`));
|
|
86
97
|
}
|
|
98
|
+
case 'get_activity':
|
|
99
|
+
return formatResponse(await apiRequest('GET', `/activities/${args.id}`));
|
|
87
100
|
case 'add_note': {
|
|
88
101
|
const { id: _, ...rest } = args;
|
|
89
102
|
const body = { ...rest, activity_type: 'note' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activities.js","sourceRoot":"","sources":["../../src/tools/activities.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,iBAAiB;QACvB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"activities.js","sourceRoot":"","sources":["../../src/tools/activities.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAExG,MAAM,CAAC,MAAM,aAAa,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EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;QACjG,CAAC;QACD,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;YAChC,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;YAChD,OAAO,cAAc,CAAC,MAAM,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;QACjG,CAAC;QACD,KAAK,aAAa,CAAC,CAAC,CAAC;YACnB,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;YAChC,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;YACnD,OAAO,cAAc,CAAC,MAAM,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAAC;QACjG,CAAC;QACD,KAAK,iBAAiB,CAAC,CAAC,CAAC;YACvB,OAAO,cAAc,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,eAAe,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAC9E,CAAC;QACD;YACE,OAAO,EAAE,IAAI,EAAE,0BAA0B,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACrE,CAAC;AACH,CAAC"}
|
package/dist/tools/ai.js
CHANGED
|
@@ -2,7 +2,7 @@ import { apiRequest, formatResponse, generateIdempotencyKey } from '../utils/api
|
|
|
2
2
|
export const aiTools = [
|
|
3
3
|
{
|
|
4
4
|
name: 'ai_enrich',
|
|
5
|
-
description: 'Research a contact or customer online and enrich their profile. Costs 5 credits.',
|
|
5
|
+
description: 'Research a contact or customer online and enrich their profile with data — find company info, social profiles, job details, and industry data. Costs 5 credits. Use this for lead enrichment or profile completion.',
|
|
6
6
|
inputSchema: {
|
|
7
7
|
type: 'object',
|
|
8
8
|
properties: {
|
|
@@ -14,7 +14,7 @@ export const aiTools = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
name: 'ai_edit_text',
|
|
17
|
-
description: 'Rewrite or edit text using AI. Costs 1 credit.',
|
|
17
|
+
description: 'Rewrite, improve, translate, summarize, or edit text using AI. Costs 1 credit. Provide an instruction like "make it more professional", "translate to French", or "summarize in 2 sentences".',
|
|
18
18
|
inputSchema: {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
@@ -27,7 +27,7 @@ export const aiTools = [
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: 'ai_deal_probability',
|
|
30
|
-
description: 'Get an AI qualification score for a deal. Costs 2 credits.',
|
|
30
|
+
description: 'Get an AI-generated qualification score and win probability for a deal. Costs 2 credits. Analyzes deal data, activity history, and contact engagement to predict likelihood of closing.',
|
|
31
31
|
inputSchema: {
|
|
32
32
|
type: 'object',
|
|
33
33
|
properties: {
|
|
@@ -38,7 +38,7 @@ export const aiTools = [
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
name: 'ai_call_coaching',
|
|
41
|
-
description: 'Analyze a call transcript for coaching insights. Costs 3 credits.',
|
|
41
|
+
description: 'Analyze a call transcript for sales coaching insights — get performance review, strengths, areas for improvement, and actionable coaching tips. Costs 3 credits. Provide transcript_id or raw transcript_text.',
|
|
42
42
|
inputSchema: {
|
|
43
43
|
type: 'object',
|
|
44
44
|
properties: {
|
|
@@ -50,7 +50,7 @@ export const aiTools = [
|
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
name: 'ai_generate_pipeline',
|
|
53
|
-
description: '
|
|
53
|
+
description: 'Auto-generate a complete sales pipeline with stages from a text description. Costs 3 credits. Describe your sales process and optionally specify an industry for tailored stage suggestions.',
|
|
54
54
|
inputSchema: {
|
|
55
55
|
type: 'object',
|
|
56
56
|
properties: {
|
package/dist/tools/ai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/tools/ai.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAc,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAExG,MAAM,CAAC,MAAM,OAAO,GAAW;IAC7B;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/tools/ai.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAc,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAExG,MAAM,CAAC,MAAM,OAAO,GAAW;IAC7B;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,qNAAqN;QAClO,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,WAAW,EAAE,qCAAqC,EAAE;gBAClH,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;aACzF;YACD,QAAQ,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC;SACvC;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,+LAA+L;QAC5M,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBACpE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uEAAuE,EAAE;gBACrH,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iDAAiD,EAAE;aAC1F;YACD,QAAQ,EAAE,CAA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AAE,CAAC,CAAC;YAC7B,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD;YACE,OAAO,EAAE,IAAI,EAAE,oBAAoB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC/D,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/tools/automations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,eAAe,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/tools/automations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAG1D,eAAO,MAAM,eAAe,EAAE,IAAI,EA8OjC,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;GAkErF"}
|