qorrelate-mcp-server 0.1.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/README.md +197 -0
- package/dist/client.d.ts +293 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +358 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +242 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/alerts.d.ts +14 -0
- package/dist/tools/alerts.d.ts.map +1 -0
- package/dist/tools/alerts.js +381 -0
- package/dist/tools/alerts.js.map +1 -0
- package/dist/tools/dashboards.d.ts +14 -0
- package/dist/tools/dashboards.d.ts.map +1 -0
- package/dist/tools/dashboards.js +409 -0
- package/dist/tools/dashboards.js.map +1 -0
- package/dist/tools/data-control.d.ts +19 -0
- package/dist/tools/data-control.d.ts.map +1 -0
- package/dist/tools/data-control.js +213 -0
- package/dist/tools/data-control.js.map +1 -0
- package/dist/tools/logs.d.ts +14 -0
- package/dist/tools/logs.d.ts.map +1 -0
- package/dist/tools/logs.js +191 -0
- package/dist/tools/logs.js.map +1 -0
- package/dist/tools/metrics.d.ts +14 -0
- package/dist/tools/metrics.d.ts.map +1 -0
- package/dist/tools/metrics.js +217 -0
- package/dist/tools/metrics.js.map +1 -0
- package/dist/tools/organizations.d.ts +16 -0
- package/dist/tools/organizations.d.ts.map +1 -0
- package/dist/tools/organizations.js +378 -0
- package/dist/tools/organizations.js.map +1 -0
- package/dist/tools/services.d.ts +14 -0
- package/dist/tools/services.d.ts.map +1 -0
- package/dist/tools/services.js +218 -0
- package/dist/tools/services.js.map +1 -0
- package/dist/tools/sessions.d.ts +14 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +221 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/setup.d.ts +17 -0
- package/dist/tools/setup.d.ts.map +1 -0
- package/dist/tools/setup.js +304 -0
- package/dist/tools/setup.js.map +1 -0
- package/dist/tools/traces.d.ts +14 -0
- package/dist/tools/traces.d.ts.map +1 -0
- package/dist/tools/traces.js +350 -0
- package/dist/tools/traces.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log-related MCP tools
|
|
3
|
+
*/
|
|
4
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import type { QorrelateClient } from "../client.js";
|
|
6
|
+
export declare function registerLogTools(): Tool[];
|
|
7
|
+
export declare function handleLogTool(client: QorrelateClient, toolName: string, args: Record<string, unknown> | undefined): Promise<{
|
|
8
|
+
content: Array<{
|
|
9
|
+
type: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}>;
|
|
12
|
+
isError?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../src/tools/logs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,wBAAgB,gBAAgB,IAAI,IAAI,EAAE,CAuFzC;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACxC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAyGhF"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Log-related MCP tools
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerLogTools = registerLogTools;
|
|
7
|
+
exports.handleLogTool = handleLogTool;
|
|
8
|
+
function registerLogTools() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
name: "query_logs",
|
|
12
|
+
description: `Search application logs with filters. Use this to investigate errors, debug issues, or understand application behavior.
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- Find all errors: query_logs with severity="ERROR"
|
|
16
|
+
- Find logs for a service: query_logs with service="checkout"
|
|
17
|
+
- Search by content: query_logs with query="payment failed"
|
|
18
|
+
- Find logs in a time range: query_logs with start_time and end_time`,
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
query: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Search query - matches log body content. Supports field:value syntax like 'user_id:123'",
|
|
25
|
+
},
|
|
26
|
+
severity: {
|
|
27
|
+
type: "string",
|
|
28
|
+
enum: ["DEBUG", "INFO", "WARN", "ERROR", "FATAL"],
|
|
29
|
+
description: "Filter by log severity level",
|
|
30
|
+
},
|
|
31
|
+
service: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Filter by service name",
|
|
34
|
+
},
|
|
35
|
+
start_time: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Start of time range (ISO 8601 format). Defaults to 1 hour ago.",
|
|
38
|
+
},
|
|
39
|
+
end_time: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "End of time range (ISO 8601 format). Defaults to now.",
|
|
42
|
+
},
|
|
43
|
+
limit: {
|
|
44
|
+
type: "number",
|
|
45
|
+
description: "Maximum number of logs to return (default: 50, max: 500)",
|
|
46
|
+
default: 50,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "logs_get_histogram",
|
|
53
|
+
description: "Get a histogram of log counts over time. Useful for visualizing log volume trends and identifying spikes.",
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: "object",
|
|
56
|
+
properties: {
|
|
57
|
+
start_time: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Start of time range (ISO 8601 format)",
|
|
60
|
+
},
|
|
61
|
+
end_time: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "End of time range (ISO 8601 format)",
|
|
64
|
+
},
|
|
65
|
+
query: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Optional query to filter logs for the histogram",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "logs_get_error_summary",
|
|
74
|
+
description: "Get a summary of errors for a service. Groups errors by message and shows counts.",
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
service: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "Service name to analyze",
|
|
81
|
+
},
|
|
82
|
+
start_time: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Start of time range (ISO 8601 format). Defaults to 1 hour ago.",
|
|
85
|
+
},
|
|
86
|
+
end_time: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "End of time range (ISO 8601 format). Defaults to now.",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
required: ["service"],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
async function handleLogTool(client, toolName, args) {
|
|
97
|
+
const params = args || {};
|
|
98
|
+
switch (toolName) {
|
|
99
|
+
case "query_logs": {
|
|
100
|
+
const result = await client.searchLogs({
|
|
101
|
+
query: params.query,
|
|
102
|
+
severity: params.severity,
|
|
103
|
+
service: params.service,
|
|
104
|
+
start_time: params.start_time,
|
|
105
|
+
end_time: params.end_time,
|
|
106
|
+
limit: Math.min(params.limit || 50, 500),
|
|
107
|
+
});
|
|
108
|
+
// Format logs for readability
|
|
109
|
+
const formattedLogs = result.logs.map(log => ({
|
|
110
|
+
timestamp: log.timestamp,
|
|
111
|
+
severity: log.severity,
|
|
112
|
+
service: log.service_name || 'unknown',
|
|
113
|
+
message: log.body,
|
|
114
|
+
trace_id: log.trace_id,
|
|
115
|
+
}));
|
|
116
|
+
return {
|
|
117
|
+
content: [{
|
|
118
|
+
type: "text",
|
|
119
|
+
text: JSON.stringify({
|
|
120
|
+
total: result.total,
|
|
121
|
+
returned: formattedLogs.length,
|
|
122
|
+
has_more: result.has_more,
|
|
123
|
+
logs: formattedLogs,
|
|
124
|
+
}, null, 2),
|
|
125
|
+
}],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
case "logs_get_histogram": {
|
|
129
|
+
const result = await client.getLogHistogram({
|
|
130
|
+
start_time: params.start_time,
|
|
131
|
+
end_time: params.end_time,
|
|
132
|
+
query: params.query,
|
|
133
|
+
});
|
|
134
|
+
return {
|
|
135
|
+
content: [{
|
|
136
|
+
type: "text",
|
|
137
|
+
text: JSON.stringify(result, null, 2),
|
|
138
|
+
}],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
case "logs_get_error_summary": {
|
|
142
|
+
// Get error logs for the service
|
|
143
|
+
const result = await client.searchLogs({
|
|
144
|
+
service: params.service,
|
|
145
|
+
severity: "ERROR",
|
|
146
|
+
start_time: params.start_time,
|
|
147
|
+
end_time: params.end_time,
|
|
148
|
+
limit: 500,
|
|
149
|
+
});
|
|
150
|
+
// Group by error message
|
|
151
|
+
const errorCounts = new Map();
|
|
152
|
+
const errorExamples = new Map();
|
|
153
|
+
for (const log of result.logs) {
|
|
154
|
+
// Normalize error message (first 200 chars)
|
|
155
|
+
const key = log.body.substring(0, 200);
|
|
156
|
+
errorCounts.set(key, (errorCounts.get(key) || 0) + 1);
|
|
157
|
+
if (!errorExamples.has(key)) {
|
|
158
|
+
errorExamples.set(key, {
|
|
159
|
+
timestamp: log.timestamp,
|
|
160
|
+
trace_id: log.trace_id,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Sort by count descending
|
|
165
|
+
const summary = Array.from(errorCounts.entries())
|
|
166
|
+
.map(([message, count]) => ({
|
|
167
|
+
message,
|
|
168
|
+
count,
|
|
169
|
+
example: errorExamples.get(message),
|
|
170
|
+
}))
|
|
171
|
+
.sort((a, b) => b.count - a.count);
|
|
172
|
+
return {
|
|
173
|
+
content: [{
|
|
174
|
+
type: "text",
|
|
175
|
+
text: JSON.stringify({
|
|
176
|
+
service: params.service,
|
|
177
|
+
total_errors: result.logs.length,
|
|
178
|
+
unique_error_types: summary.length,
|
|
179
|
+
errors: summary,
|
|
180
|
+
}, null, 2),
|
|
181
|
+
}],
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
default:
|
|
185
|
+
return {
|
|
186
|
+
content: [{ type: "text", text: `Unknown log tool: ${toolName}` }],
|
|
187
|
+
isError: true,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/tools/logs.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,4CAuFC;AAED,sCA6GC;AAtMD,SAAgB,gBAAgB;IAC9B,OAAO;QACL;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE;;;;;;qEAMkD;YAC/D,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yFAAyF;qBACvG;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;wBACjD,WAAW,EAAE,8BAA8B;qBAC5C;oBACD,OAAO,EAAE;wB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AAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;iBAC9C,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;gBAC1B,OAAO;gBACP,KAAK;gBACL,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;aACpC,CAAC,CAAC;iBACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;YAErC,OAAO;gBACL,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,OAAO,EAAE,MAAM,CAAC,OAAO;4BACvB,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;4BAChC,kBAAkB,EAAE,OAAO,CAAC,MAAM;4BAClC,MAAM,EAAE,OAAO;yBAChB,EAAE,IAAI,EAAE,CAAC,CAAC;qBACZ,CAAC;aACH,CAAC;QACJ,CAAC;QAED;YACE,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,QAAQ,EAAE,EAAE,CAAC;gBAClE,OAAO,EAAE,IAAI;aACd,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics-related MCP tools
|
|
3
|
+
*/
|
|
4
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import type { QorrelateClient } from "../client.js";
|
|
6
|
+
export declare function registerMetricTools(): Tool[];
|
|
7
|
+
export declare function handleMetricTool(client: QorrelateClient, toolName: string, args: Record<string, unknown> | undefined): Promise<{
|
|
8
|
+
content: Array<{
|
|
9
|
+
type: string;
|
|
10
|
+
text: string;
|
|
11
|
+
}>;
|
|
12
|
+
isError?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/tools/metrics.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,wBAAgB,mBAAmB,IAAI,IAAI,EAAE,CA8F5C;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,eAAe,EACvB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACxC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA4HhF"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Metrics-related MCP tools
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.registerMetricTools = registerMetricTools;
|
|
7
|
+
exports.handleMetricTool = handleMetricTool;
|
|
8
|
+
function registerMetricTools() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
name: "query_metrics",
|
|
12
|
+
description: `Query time-series metrics data. Use this to analyze system performance, resource usage, and business metrics.
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- CPU usage: query_metrics with metric_name="system.cpu.usage"
|
|
16
|
+
- Request rate: query_metrics with metric_name="http.server.request.count"
|
|
17
|
+
- Error rate by service: query_metrics with metric_name="http.server.errors" and group_by="service.name"`,
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
metric_name: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Name of the metric to query (e.g., http.server.duration, system.memory.usage)",
|
|
24
|
+
},
|
|
25
|
+
aggregation: {
|
|
26
|
+
type: "string",
|
|
27
|
+
enum: ["avg", "sum", "min", "max", "count"],
|
|
28
|
+
description: "How to aggregate the metric values (default: avg)",
|
|
29
|
+
default: "avg",
|
|
30
|
+
},
|
|
31
|
+
group_by: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Label to group results by (e.g., service.name, http.method)",
|
|
34
|
+
},
|
|
35
|
+
start_time: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Start of time range (ISO 8601 format). Defaults to 1 hour ago.",
|
|
38
|
+
},
|
|
39
|
+
end_time: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "End of time range (ISO 8601 format). Defaults to now.",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ["metric_name"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "metrics_list",
|
|
49
|
+
description: "List available metrics. Use this to discover what metrics are being collected.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
prefix: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Filter metrics by name prefix (e.g., 'http' for all HTTP metrics)",
|
|
56
|
+
},
|
|
57
|
+
limit: {
|
|
58
|
+
type: "number",
|
|
59
|
+
description: "Maximum number of metrics to return (default: 50)",
|
|
60
|
+
default: 50,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "metrics_compare",
|
|
67
|
+
description: "Compare a metric between two time periods. Useful for before/after analysis of deployments or changes.",
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
metric_name: {
|
|
72
|
+
type: "string",
|
|
73
|
+
description: "Name of the metric to compare",
|
|
74
|
+
},
|
|
75
|
+
period1_start: {
|
|
76
|
+
type: "string",
|
|
77
|
+
description: "Start of first period (ISO 8601 format)",
|
|
78
|
+
},
|
|
79
|
+
period1_end: {
|
|
80
|
+
type: "string",
|
|
81
|
+
description: "End of first period (ISO 8601 format)",
|
|
82
|
+
},
|
|
83
|
+
period2_start: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Start of second period (ISO 8601 format)",
|
|
86
|
+
},
|
|
87
|
+
period2_end: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "End of second period (ISO 8601 format)",
|
|
90
|
+
},
|
|
91
|
+
aggregation: {
|
|
92
|
+
type: "string",
|
|
93
|
+
enum: ["avg", "sum", "min", "max"],
|
|
94
|
+
description: "How to aggregate values for comparison",
|
|
95
|
+
default: "avg",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
required: ["metric_name", "period1_start", "period1_end", "period2_start", "period2_end"],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
async function handleMetricTool(client, toolName, args) {
|
|
104
|
+
const params = args || {};
|
|
105
|
+
switch (toolName) {
|
|
106
|
+
case "query_metrics": {
|
|
107
|
+
const metricName = params.metric_name;
|
|
108
|
+
if (!metricName) {
|
|
109
|
+
return {
|
|
110
|
+
content: [{ type: "text", text: "metric_name is required" }],
|
|
111
|
+
isError: true,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const result = await client.queryMetrics({
|
|
115
|
+
metric_name: metricName,
|
|
116
|
+
aggregation: params.aggregation || 'avg',
|
|
117
|
+
group_by: params.group_by,
|
|
118
|
+
start_time: params.start_time,
|
|
119
|
+
end_time: params.end_time,
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
content: [{
|
|
123
|
+
type: "text",
|
|
124
|
+
text: JSON.stringify(result, null, 2),
|
|
125
|
+
}],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
case "metrics_list": {
|
|
129
|
+
const result = await client.listMetrics({
|
|
130
|
+
prefix: params.prefix,
|
|
131
|
+
limit: params.limit || 50,
|
|
132
|
+
});
|
|
133
|
+
return {
|
|
134
|
+
content: [{
|
|
135
|
+
type: "text",
|
|
136
|
+
text: JSON.stringify({
|
|
137
|
+
count: result.metrics.length,
|
|
138
|
+
metrics: result.metrics,
|
|
139
|
+
}, null, 2),
|
|
140
|
+
}],
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
case "metrics_compare": {
|
|
144
|
+
const metricName = params.metric_name;
|
|
145
|
+
if (!metricName) {
|
|
146
|
+
return {
|
|
147
|
+
content: [{ type: "text", text: "metric_name is required" }],
|
|
148
|
+
isError: true,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
const aggregation = params.aggregation || 'avg';
|
|
152
|
+
// Fetch both periods
|
|
153
|
+
const [period1, period2] = await Promise.all([
|
|
154
|
+
client.queryMetrics({
|
|
155
|
+
metric_name: metricName,
|
|
156
|
+
aggregation,
|
|
157
|
+
start_time: params.period1_start,
|
|
158
|
+
end_time: params.period1_end,
|
|
159
|
+
}),
|
|
160
|
+
client.queryMetrics({
|
|
161
|
+
metric_name: metricName,
|
|
162
|
+
aggregation,
|
|
163
|
+
start_time: params.period2_start,
|
|
164
|
+
end_time: params.period2_end,
|
|
165
|
+
}),
|
|
166
|
+
]);
|
|
167
|
+
// Calculate aggregate values for each period
|
|
168
|
+
const calculateAggregate = (dataPoints) => {
|
|
169
|
+
if (dataPoints.length === 0)
|
|
170
|
+
return 0;
|
|
171
|
+
const values = dataPoints.map(d => d.value);
|
|
172
|
+
switch (aggregation) {
|
|
173
|
+
case 'sum': return values.reduce((a, b) => a + b, 0);
|
|
174
|
+
case 'min': return Math.min(...values);
|
|
175
|
+
case 'max': return Math.max(...values);
|
|
176
|
+
case 'avg':
|
|
177
|
+
default: return values.reduce((a, b) => a + b, 0) / values.length;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const value1 = calculateAggregate(period1.data_points);
|
|
181
|
+
const value2 = calculateAggregate(period2.data_points);
|
|
182
|
+
const change = value1 !== 0 ? ((value2 - value1) / value1) * 100 : 0;
|
|
183
|
+
return {
|
|
184
|
+
content: [{
|
|
185
|
+
type: "text",
|
|
186
|
+
text: JSON.stringify({
|
|
187
|
+
metric_name: metricName,
|
|
188
|
+
aggregation,
|
|
189
|
+
period1: {
|
|
190
|
+
start: params.period1_start,
|
|
191
|
+
end: params.period1_end,
|
|
192
|
+
value: Math.round(value1 * 1000) / 1000,
|
|
193
|
+
data_points: period1.data_points.length,
|
|
194
|
+
},
|
|
195
|
+
period2: {
|
|
196
|
+
start: params.period2_start,
|
|
197
|
+
end: params.period2_end,
|
|
198
|
+
value: Math.round(value2 * 1000) / 1000,
|
|
199
|
+
data_points: period2.data_points.length,
|
|
200
|
+
},
|
|
201
|
+
change: {
|
|
202
|
+
absolute: Math.round((value2 - value1) * 1000) / 1000,
|
|
203
|
+
percent: Math.round(change * 100) / 100,
|
|
204
|
+
direction: change > 0 ? "increased" : change < 0 ? "decreased" : "unchanged",
|
|
205
|
+
},
|
|
206
|
+
}, null, 2),
|
|
207
|
+
}],
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
default:
|
|
211
|
+
return {
|
|
212
|
+
content: [{ type: "text", text: `Unknown metrics tool: ${toolName}` }],
|
|
213
|
+
isError: true,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../src/tools/metrics.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,kDA8FC;AAED,4CAgIC;AAhOD,SAAgB,mBAAmB;IACjC,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE;;;;;yGAKsF;YACnG,WAAW,EAAE;gBACX,IA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* Organization Management Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for managing organizations, members, invitations, and API keys.
|
|
5
|
+
* Enables AI agents to fully automate the setup and onboarding process.
|
|
6
|
+
*/
|
|
7
|
+
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
8
|
+
import { QorrelateClient } from "../client.js";
|
|
9
|
+
export declare function registerOrganizationTools(): Tool[];
|
|
10
|
+
export declare function handleOrganizationTool(client: QorrelateClient, name: string, args: Record<string, unknown>): Promise<{
|
|
11
|
+
content: Array<{
|
|
12
|
+
type: string;
|
|
13
|
+
text: string;
|
|
14
|
+
}>;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=organizations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../src/tools/organizations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,yBAAyB,IAAI,IAAI,EAAE,CA0NlD;AAED,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CA8J7D"}
|