@closedloop-ai/mcp-client 1.2.5 → 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/index.js +68 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ const server = new Server(
|
|
|
32
32
|
const tools = [
|
|
33
33
|
{
|
|
34
34
|
name: 'list_insights',
|
|
35
|
-
description: 'Retrieve
|
|
35
|
+
description: 'Retrieve product insights with optional filtering, sorting, and pagination',
|
|
36
36
|
inputSchema: {
|
|
37
37
|
type: 'object',
|
|
38
38
|
properties: {
|
|
@@ -42,10 +42,38 @@ const tools = [
|
|
|
42
42
|
format: 'date'
|
|
43
43
|
},
|
|
44
44
|
date_to: {
|
|
45
|
-
type: 'string',
|
|
45
|
+
type: 'string',
|
|
46
46
|
description: 'End date for insights (YYYY-MM-DD)',
|
|
47
47
|
format: 'date'
|
|
48
48
|
},
|
|
49
|
+
severity: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: ['critical', 'high', 'medium', 'low', 'all'],
|
|
52
|
+
description: 'Filter by severity level (default: all)'
|
|
53
|
+
},
|
|
54
|
+
status: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
enum: ['open', 'closed', 'all'],
|
|
57
|
+
description: 'Filter by insight status (default: all)'
|
|
58
|
+
},
|
|
59
|
+
source_id: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Filter by integration source UUID'
|
|
62
|
+
},
|
|
63
|
+
tag: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Filter by tag (letters, numbers, underscores, hyphens only)'
|
|
66
|
+
},
|
|
67
|
+
sort_by: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
enum: ['timestamp', 'severity', 'status'],
|
|
70
|
+
description: 'Field to sort by (default: timestamp)'
|
|
71
|
+
},
|
|
72
|
+
sort_order: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
enum: ['asc', 'desc'],
|
|
75
|
+
description: 'Sort direction (default: desc)'
|
|
76
|
+
},
|
|
49
77
|
page: {
|
|
50
78
|
type: 'integer',
|
|
51
79
|
description: 'Page number (default: 1)',
|
|
@@ -137,6 +165,34 @@ const tools = [
|
|
|
137
165
|
},
|
|
138
166
|
required: ['query']
|
|
139
167
|
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'get_planning_context',
|
|
171
|
+
description: 'Get customer evidence for a feature or task before planning/implementing. Returns semantically matched patterns ranked by business impact, deal blockers, churn risks, affected CRM deals, and individual signals with full context. Call this before writing any implementation plan.',
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: 'object',
|
|
174
|
+
properties: {
|
|
175
|
+
query: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: 'Task or feature description to find relevant customer evidence for'
|
|
178
|
+
},
|
|
179
|
+
limit_patterns: {
|
|
180
|
+
type: 'integer',
|
|
181
|
+
minimum: 1,
|
|
182
|
+
maximum: 20,
|
|
183
|
+
default: 5,
|
|
184
|
+
description: 'Max patterns to return (default 5)'
|
|
185
|
+
},
|
|
186
|
+
limit_signals: {
|
|
187
|
+
type: 'integer',
|
|
188
|
+
minimum: 1,
|
|
189
|
+
maximum: 20,
|
|
190
|
+
default: 10,
|
|
191
|
+
description: 'Max individual signals to return (default 10)'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
required: ['query']
|
|
195
|
+
}
|
|
140
196
|
}
|
|
141
197
|
];
|
|
142
198
|
|
|
@@ -192,6 +248,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
192
248
|
});
|
|
193
249
|
break;
|
|
194
250
|
|
|
251
|
+
case 'get_planning_context':
|
|
252
|
+
if (!args.query) {
|
|
253
|
+
throw new Error('query is required');
|
|
254
|
+
}
|
|
255
|
+
response = await axios.get(`${CLOSEDLOOP_SERVER_URL}/planning-context`, {
|
|
256
|
+
headers,
|
|
257
|
+
params: args
|
|
258
|
+
});
|
|
259
|
+
break;
|
|
260
|
+
|
|
195
261
|
default:
|
|
196
262
|
throw new Error(`Unknown tool: ${name}`);
|
|
197
263
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@closedloop-ai/mcp-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "ClosedLoop AI MCP Client for AI assistant integration with advanced search capabilities",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"start": "node index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@modelcontextprotocol/sdk": "^
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
18
18
|
"axios": "^1.6.0"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|