@robinmordasiewicz/f5xc-cloudstatus-mcp 1.2.6
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 +196 -0
- package/dist/cache/cache-service.d.ts +60 -0
- package/dist/cache/cache-service.d.ts.map +1 -0
- package/dist/cache/cache-service.js +162 -0
- package/dist/cache/cache-service.js.map +1 -0
- package/dist/cache/index.d.ts +6 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +6 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/data-access/api-client.d.ts +71 -0
- package/dist/data-access/api-client.d.ts.map +1 -0
- package/dist/data-access/api-client.js +188 -0
- package/dist/data-access/api-client.js.map +1 -0
- package/dist/data-access/data-access-layer.d.ts +72 -0
- package/dist/data-access/data-access-layer.d.ts.map +1 -0
- package/dist/data-access/data-access-layer.js +171 -0
- package/dist/data-access/data-access-layer.js.map +1 -0
- package/dist/data-access/index.d.ts +9 -0
- package/dist/data-access/index.d.ts.map +1 -0
- package/dist/data-access/index.js +8 -0
- package/dist/data-access/index.js.map +1 -0
- package/dist/data-access/web-scraper.d.ts +60 -0
- package/dist/data-access/web-scraper.d.ts.map +1 -0
- package/dist/data-access/web-scraper.js +281 -0
- package/dist/data-access/web-scraper.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +6 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/mcp-server.d.ts +35 -0
- package/dist/server/mcp-server.d.ts.map +1 -0
- package/dist/server/mcp-server.js +143 -0
- package/dist/server/mcp-server.js.map +1 -0
- package/dist/services/component-service.d.ts +80 -0
- package/dist/services/component-service.d.ts.map +1 -0
- package/dist/services/component-service.js +187 -0
- package/dist/services/component-service.js.map +1 -0
- package/dist/services/incident-service.d.ts +96 -0
- package/dist/services/incident-service.d.ts.map +1 -0
- package/dist/services/incident-service.js +219 -0
- package/dist/services/incident-service.js.map +1 -0
- package/dist/services/index.d.ts +8 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +8 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/status-service.d.ts +56 -0
- package/dist/services/status-service.d.ts.map +1 -0
- package/dist/services/status-service.js +105 -0
- package/dist/services/status-service.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +7 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/tool-definitions.d.ts +257 -0
- package/dist/tools/tool-definitions.d.ts.map +1 -0
- package/dist/tools/tool-definitions.js +192 -0
- package/dist/tools/tool-definitions.js.map +1 -0
- package/dist/tools/tool-handler.d.ts +49 -0
- package/dist/tools/tool-handler.d.ts.map +1 -0
- package/dist/tools/tool-handler.js +264 -0
- package/dist/tools/tool-handler.js.map +1 -0
- package/dist/types/api.d.ts +215 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +6 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/domain.d.ts +115 -0
- package/dist/types/domain.d.ts.map +1 -0
- package/dist/types/domain.js +6 -0
- package/dist/types/domain.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/config.d.ts +38 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +113 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/errors.d.ts +77 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +130 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +48 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +90 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status Service
|
|
3
|
+
* Business logic for overall F5 Cloud status
|
|
4
|
+
*/
|
|
5
|
+
import { config } from '../utils/config.js';
|
|
6
|
+
import { logger } from '../utils/logger.js';
|
|
7
|
+
/**
|
|
8
|
+
* Status Service class
|
|
9
|
+
*/
|
|
10
|
+
export class StatusService {
|
|
11
|
+
constructor(dataAccess, cache) {
|
|
12
|
+
this.dataAccess = dataAccess;
|
|
13
|
+
this.cache = cache;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get overall status
|
|
17
|
+
*/
|
|
18
|
+
async getOverallStatus() {
|
|
19
|
+
logger.debug('Getting overall status');
|
|
20
|
+
return this.cache.get('overall-status', config.cache.ttlStatus, async () => {
|
|
21
|
+
const rawStatus = await this.dataAccess.getStatus();
|
|
22
|
+
return this.transformStatus(rawStatus);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get status description
|
|
27
|
+
*/
|
|
28
|
+
async getStatusDescription() {
|
|
29
|
+
const status = await this.getOverallStatus();
|
|
30
|
+
return status.description;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get status indicator
|
|
34
|
+
*/
|
|
35
|
+
async getStatusIndicator() {
|
|
36
|
+
const status = await this.getOverallStatus();
|
|
37
|
+
return status.indicator;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if system is operational
|
|
41
|
+
*/
|
|
42
|
+
async isOperational() {
|
|
43
|
+
const status = await this.getOverallStatus();
|
|
44
|
+
return status.status === 'operational';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if system has any issues
|
|
48
|
+
*/
|
|
49
|
+
async hasIssues() {
|
|
50
|
+
const status = await this.getOverallStatus();
|
|
51
|
+
return status.indicator !== 'none';
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get status level as human-readable string
|
|
55
|
+
*/
|
|
56
|
+
async getStatusLevel() {
|
|
57
|
+
const status = await this.getOverallStatus();
|
|
58
|
+
return status.status;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Transform raw status to domain model
|
|
62
|
+
*/
|
|
63
|
+
transformStatus(rawStatus) {
|
|
64
|
+
// If already transformed (from scraper), return as-is
|
|
65
|
+
if ('lastUpdated' in rawStatus) {
|
|
66
|
+
return rawStatus;
|
|
67
|
+
}
|
|
68
|
+
// Transform API response
|
|
69
|
+
return {
|
|
70
|
+
status: this.mapIndicatorToStatus(rawStatus.status.indicator),
|
|
71
|
+
indicator: rawStatus.status.indicator,
|
|
72
|
+
description: rawStatus.status.description,
|
|
73
|
+
lastUpdated: new Date(rawStatus.page.updated_at),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Map API indicator to status level
|
|
78
|
+
*/
|
|
79
|
+
mapIndicatorToStatus(indicator) {
|
|
80
|
+
switch (indicator) {
|
|
81
|
+
case 'none':
|
|
82
|
+
return 'operational';
|
|
83
|
+
case 'minor':
|
|
84
|
+
return 'degraded_performance';
|
|
85
|
+
case 'major':
|
|
86
|
+
return 'partial_outage';
|
|
87
|
+
case 'critical':
|
|
88
|
+
return 'major_outage';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Invalidate status cache
|
|
93
|
+
*/
|
|
94
|
+
invalidateCache() {
|
|
95
|
+
this.cache.delete('overall-status');
|
|
96
|
+
logger.info('Status cache invalidated');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create status service instance
|
|
101
|
+
*/
|
|
102
|
+
export function createStatusService(dataAccess, cache) {
|
|
103
|
+
return new StatusService(dataAccess, cache);
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=status-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-service.js","sourceRoot":"","sources":["../../src/services/status-service.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C;;GAEG;AACH,MAAM,OAAO,aAAa;IAIxB,YAAY,UAA2B,EAAE,KAAmB;QAC1D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,gBAAgB;QACpB,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAEvC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;YACzE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,oBAAoB;QACxB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB;QACtB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,MAAM,KAAK,aAAa,CAAC;IACzC,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OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tools module index
|
|
3
|
+
* Re-exports all MCP tool components
|
|
4
|
+
*/
|
|
5
|
+
export { allTools, toolSchemas } from './tool-definitions.js';
|
|
6
|
+
export type { ToolInputs } from './tool-definitions.js';
|
|
7
|
+
export { ToolHandler, createToolHandler } from './tool-handler.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Definitions
|
|
3
|
+
* Defines all available MCP tools for F5 Status monitoring
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Tool: Get Overall Status
|
|
8
|
+
* Returns the current overall status of F5 Cloud services
|
|
9
|
+
*/
|
|
10
|
+
export declare const getOverallStatusTool: {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: "object";
|
|
15
|
+
properties: {};
|
|
16
|
+
required: never[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Tool: Get Components
|
|
21
|
+
* Returns all F5 Cloud service components with their current status
|
|
22
|
+
*/
|
|
23
|
+
export declare const getComponentsTool: {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: "object";
|
|
28
|
+
properties: {
|
|
29
|
+
status: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
enum: string[];
|
|
33
|
+
};
|
|
34
|
+
group: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
required: never[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Tool: Get Component
|
|
44
|
+
* Returns details about a specific component by ID or name
|
|
45
|
+
*/
|
|
46
|
+
export declare const getComponentTool: {
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object";
|
|
51
|
+
properties: {
|
|
52
|
+
id: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
name: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
required: never[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Tool: Get Incidents
|
|
66
|
+
* Returns active and recent incidents affecting F5 Cloud services
|
|
67
|
+
*/
|
|
68
|
+
export declare const getIncidentsTool: {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: "object";
|
|
73
|
+
properties: {
|
|
74
|
+
status: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
enum: string[];
|
|
78
|
+
};
|
|
79
|
+
impact: {
|
|
80
|
+
type: string;
|
|
81
|
+
description: string;
|
|
82
|
+
enum: string[];
|
|
83
|
+
};
|
|
84
|
+
days: {
|
|
85
|
+
type: string;
|
|
86
|
+
description: string;
|
|
87
|
+
minimum: number;
|
|
88
|
+
maximum: number;
|
|
89
|
+
};
|
|
90
|
+
unresolved_only: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
required: never[];
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Tool: Get Maintenance
|
|
100
|
+
* Returns scheduled maintenance windows for F5 Cloud services
|
|
101
|
+
*/
|
|
102
|
+
export declare const getMaintenanceTool: {
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: "object";
|
|
107
|
+
properties: {
|
|
108
|
+
status: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
enum: string[];
|
|
112
|
+
};
|
|
113
|
+
active_only: {
|
|
114
|
+
type: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
upcoming_only: {
|
|
118
|
+
type: string;
|
|
119
|
+
description: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
required: never[];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Tool: Search
|
|
127
|
+
* Search for components, incidents, or information by keyword
|
|
128
|
+
*/
|
|
129
|
+
export declare const searchTool: {
|
|
130
|
+
name: string;
|
|
131
|
+
description: string;
|
|
132
|
+
inputSchema: {
|
|
133
|
+
type: "object";
|
|
134
|
+
properties: {
|
|
135
|
+
query: {
|
|
136
|
+
type: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
type: {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
enum: string[];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
required: string[];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* All tool definitions
|
|
150
|
+
*/
|
|
151
|
+
export declare const allTools: ({
|
|
152
|
+
name: string;
|
|
153
|
+
description: string;
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: "object";
|
|
156
|
+
properties: {};
|
|
157
|
+
required: never[];
|
|
158
|
+
};
|
|
159
|
+
} | {
|
|
160
|
+
name: string;
|
|
161
|
+
description: string;
|
|
162
|
+
inputSchema: {
|
|
163
|
+
type: "object";
|
|
164
|
+
properties: {
|
|
165
|
+
query: {
|
|
166
|
+
type: string;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
type: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
enum: string[];
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
required: string[];
|
|
176
|
+
};
|
|
177
|
+
})[];
|
|
178
|
+
/**
|
|
179
|
+
* Tool input schemas with Zod validation
|
|
180
|
+
*/
|
|
181
|
+
export declare const toolSchemas: {
|
|
182
|
+
'f5-status-get-overall': z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
183
|
+
'f5-status-get-components': z.ZodObject<{
|
|
184
|
+
status: z.ZodOptional<z.ZodEnum<["none", "minor", "major", "critical"]>>;
|
|
185
|
+
group: z.ZodOptional<z.ZodString>;
|
|
186
|
+
}, "strip", z.ZodTypeAny, {
|
|
187
|
+
status?: "none" | "minor" | "major" | "critical" | undefined;
|
|
188
|
+
group?: string | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
status?: "none" | "minor" | "major" | "critical" | undefined;
|
|
191
|
+
group?: string | undefined;
|
|
192
|
+
}>;
|
|
193
|
+
'f5-status-get-component': z.ZodEffects<z.ZodObject<{
|
|
194
|
+
id: z.ZodOptional<z.ZodString>;
|
|
195
|
+
name: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
name?: string | undefined;
|
|
198
|
+
id?: string | undefined;
|
|
199
|
+
}, {
|
|
200
|
+
name?: string | undefined;
|
|
201
|
+
id?: string | undefined;
|
|
202
|
+
}>, {
|
|
203
|
+
name?: string | undefined;
|
|
204
|
+
id?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
name?: string | undefined;
|
|
207
|
+
id?: string | undefined;
|
|
208
|
+
}>;
|
|
209
|
+
'f5-status-get-incidents': z.ZodObject<{
|
|
210
|
+
status: z.ZodOptional<z.ZodEnum<["investigating", "identified", "monitoring", "resolved", "postmortem"]>>;
|
|
211
|
+
impact: z.ZodOptional<z.ZodEnum<["none", "minor", "major", "critical"]>>;
|
|
212
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
unresolved_only: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
status?: "investigating" | "identified" | "monitoring" | "resolved" | "postmortem" | undefined;
|
|
216
|
+
impact?: "none" | "minor" | "major" | "critical" | undefined;
|
|
217
|
+
days?: number | undefined;
|
|
218
|
+
unresolved_only?: boolean | undefined;
|
|
219
|
+
}, {
|
|
220
|
+
status?: "investigating" | "identified" | "monitoring" | "resolved" | "postmortem" | undefined;
|
|
221
|
+
impact?: "none" | "minor" | "major" | "critical" | undefined;
|
|
222
|
+
days?: number | undefined;
|
|
223
|
+
unresolved_only?: boolean | undefined;
|
|
224
|
+
}>;
|
|
225
|
+
'f5-status-get-maintenance': z.ZodObject<{
|
|
226
|
+
status: z.ZodOptional<z.ZodEnum<["scheduled", "in_progress", "verifying", "completed"]>>;
|
|
227
|
+
active_only: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
upcoming_only: z.ZodOptional<z.ZodBoolean>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
status?: "scheduled" | "in_progress" | "verifying" | "completed" | undefined;
|
|
231
|
+
active_only?: boolean | undefined;
|
|
232
|
+
upcoming_only?: boolean | undefined;
|
|
233
|
+
}, {
|
|
234
|
+
status?: "scheduled" | "in_progress" | "verifying" | "completed" | undefined;
|
|
235
|
+
active_only?: boolean | undefined;
|
|
236
|
+
upcoming_only?: boolean | undefined;
|
|
237
|
+
}>;
|
|
238
|
+
'f5-status-search': z.ZodObject<{
|
|
239
|
+
query: z.ZodString;
|
|
240
|
+
type: z.ZodOptional<z.ZodEnum<["components", "incidents", "maintenance", "all"]>>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
query: string;
|
|
243
|
+
type?: "components" | "incidents" | "maintenance" | "all" | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
query: string;
|
|
246
|
+
type?: "components" | "incidents" | "maintenance" | "all" | undefined;
|
|
247
|
+
}>;
|
|
248
|
+
};
|
|
249
|
+
export type ToolInputs = {
|
|
250
|
+
'f5-status-get-overall': z.infer<(typeof toolSchemas)['f5-status-get-overall']>;
|
|
251
|
+
'f5-status-get-components': z.infer<(typeof toolSchemas)['f5-status-get-components']>;
|
|
252
|
+
'f5-status-get-component': z.infer<(typeof toolSchemas)['f5-status-get-component']>;
|
|
253
|
+
'f5-status-get-incidents': z.infer<(typeof toolSchemas)['f5-status-get-incidents']>;
|
|
254
|
+
'f5-status-get-maintenance': z.infer<(typeof toolSchemas)['f5-status-get-maintenance']>;
|
|
255
|
+
'f5-status-search': z.infer<(typeof toolSchemas)['f5-status-search']>;
|
|
256
|
+
};
|
|
257
|
+
//# sourceMappingURL=tool-definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.d.ts","sourceRoot":"","sources":["../../src/tools/tool-definitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;CAShC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;CAmB7B,CAAC;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P Tool Definitions
|
|
3
|
+
* Defines all available MCP tools for F5 Status monitoring
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Tool: Get Overall Status
|
|
8
|
+
* Returns the current overall status of F5 Cloud services
|
|
9
|
+
*/
|
|
10
|
+
export const getOverallStatusTool = {
|
|
11
|
+
name: 'f5-status-get-overall',
|
|
12
|
+
description: 'Get the current overall status of F5 Cloud services including operational state and service health indicator',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {},
|
|
16
|
+
required: [],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Tool: Get Components
|
|
21
|
+
* Returns all F5 Cloud service components with their current status
|
|
22
|
+
*/
|
|
23
|
+
export const getComponentsTool = {
|
|
24
|
+
name: 'f5-status-get-components',
|
|
25
|
+
description: 'Get all F5 Cloud service components with their current operational status, organized by category (Distributed Cloud Services, XC App Stack, etc.)',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
status: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Filter components by status',
|
|
32
|
+
enum: ['none', 'minor', 'major', 'critical'],
|
|
33
|
+
},
|
|
34
|
+
group: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Filter components by group name',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: [],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Tool: Get Component
|
|
44
|
+
* Returns details about a specific component by ID or name
|
|
45
|
+
*/
|
|
46
|
+
export const getComponentTool = {
|
|
47
|
+
name: 'f5-status-get-component',
|
|
48
|
+
description: 'Get detailed information about a specific F5 Cloud service component by ID or name',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
id: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Component ID',
|
|
55
|
+
},
|
|
56
|
+
name: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Component name',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
required: [],
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Tool: Get Incidents
|
|
66
|
+
* Returns active and recent incidents affecting F5 Cloud services
|
|
67
|
+
*/
|
|
68
|
+
export const getIncidentsTool = {
|
|
69
|
+
name: 'f5-status-get-incidents',
|
|
70
|
+
description: 'Get current and recent incidents affecting F5 Cloud services, including status updates and affected components',
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: {
|
|
74
|
+
status: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Filter incidents by status',
|
|
77
|
+
enum: ['investigating', 'identified', 'monitoring', 'resolved', 'postmortem'],
|
|
78
|
+
},
|
|
79
|
+
impact: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Filter incidents by impact level',
|
|
82
|
+
enum: ['none', 'minor', 'major', 'critical'],
|
|
83
|
+
},
|
|
84
|
+
days: {
|
|
85
|
+
type: 'number',
|
|
86
|
+
description: 'Get incidents from the last N days (default: 7)',
|
|
87
|
+
minimum: 1,
|
|
88
|
+
maximum: 90,
|
|
89
|
+
},
|
|
90
|
+
unresolved_only: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
description: 'Only return unresolved incidents (default: false)',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
required: [],
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Tool: Get Maintenance
|
|
100
|
+
* Returns scheduled maintenance windows for F5 Cloud services
|
|
101
|
+
*/
|
|
102
|
+
export const getMaintenanceTool = {
|
|
103
|
+
name: 'f5-status-get-maintenance',
|
|
104
|
+
description: 'Get scheduled, active, and upcoming maintenance windows for F5 Cloud services',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
status: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'Filter maintenance by status',
|
|
111
|
+
enum: ['scheduled', 'in_progress', 'verifying', 'completed'],
|
|
112
|
+
},
|
|
113
|
+
active_only: {
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
description: 'Only return active maintenance windows (default: false)',
|
|
116
|
+
},
|
|
117
|
+
upcoming_only: {
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
description: 'Only return upcoming maintenance windows (default: false)',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: [],
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Tool: Search
|
|
127
|
+
* Search for components, incidents, or information by keyword
|
|
128
|
+
*/
|
|
129
|
+
export const searchTool = {
|
|
130
|
+
name: 'f5-status-search',
|
|
131
|
+
description: 'Search F5 Cloud status information by keyword or pattern, including components, incidents, and maintenance',
|
|
132
|
+
inputSchema: {
|
|
133
|
+
type: 'object',
|
|
134
|
+
properties: {
|
|
135
|
+
query: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'Search query or pattern',
|
|
138
|
+
},
|
|
139
|
+
type: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
description: 'Type of entity to search',
|
|
142
|
+
enum: ['components', 'incidents', 'maintenance', 'all'],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
required: ['query'],
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* All tool definitions
|
|
150
|
+
*/
|
|
151
|
+
export const allTools = [
|
|
152
|
+
getOverallStatusTool,
|
|
153
|
+
getComponentsTool,
|
|
154
|
+
getComponentTool,
|
|
155
|
+
getIncidentsTool,
|
|
156
|
+
getMaintenanceTool,
|
|
157
|
+
searchTool,
|
|
158
|
+
];
|
|
159
|
+
/**
|
|
160
|
+
* Tool input schemas with Zod validation
|
|
161
|
+
*/
|
|
162
|
+
export const toolSchemas = {
|
|
163
|
+
'f5-status-get-overall': z.object({}),
|
|
164
|
+
'f5-status-get-components': z.object({
|
|
165
|
+
status: z.enum(['none', 'minor', 'major', 'critical']).optional(),
|
|
166
|
+
group: z.string().optional(),
|
|
167
|
+
}),
|
|
168
|
+
'f5-status-get-component': z
|
|
169
|
+
.object({
|
|
170
|
+
id: z.string().optional(),
|
|
171
|
+
name: z.string().optional(),
|
|
172
|
+
})
|
|
173
|
+
.refine((data) => data.id || data.name, { message: 'Either id or name must be provided' }),
|
|
174
|
+
'f5-status-get-incidents': z.object({
|
|
175
|
+
status: z
|
|
176
|
+
.enum(['investigating', 'identified', 'monitoring', 'resolved', 'postmortem'])
|
|
177
|
+
.optional(),
|
|
178
|
+
impact: z.enum(['none', 'minor', 'major', 'critical']).optional(),
|
|
179
|
+
days: z.number().min(1).max(90).optional(),
|
|
180
|
+
unresolved_only: z.boolean().optional(),
|
|
181
|
+
}),
|
|
182
|
+
'f5-status-get-maintenance': z.object({
|
|
183
|
+
status: z.enum(['scheduled', 'in_progress', 'verifying', 'completed']).optional(),
|
|
184
|
+
active_only: z.boolean().optional(),
|
|
185
|
+
upcoming_only: z.boolean().optional(),
|
|
186
|
+
}),
|
|
187
|
+
'f5-status-search': z.object({
|
|
188
|
+
query: z.string(),
|
|
189
|
+
type: z.enum(['components', 'incidents', 'maintenance', 'all']).optional(),
|
|
190
|
+
}),
|
|
191
|
+
};
|
|
192
|
+
//# sourceMappingURL=tool-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../../src/tools/tool-definitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,8GAA8G;IAChH,WAAW,EAAE;QACX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EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC1C,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC;IAEF,2BAA2B,EAAE,CAAC,CAAC,MAAM,CAAC;QACpC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE;QACjF,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QACnC,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC;IAEF,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC;QAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC3E,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool Handler
|
|
3
|
+
* Processes tool requests and coordinates with services
|
|
4
|
+
*/
|
|
5
|
+
import { StatusService } from '../services/status-service.js';
|
|
6
|
+
import { ComponentService } from '../services/component-service.js';
|
|
7
|
+
import { IncidentService } from '../services/incident-service.js';
|
|
8
|
+
/**
|
|
9
|
+
* Tool Handler class
|
|
10
|
+
*/
|
|
11
|
+
export declare class ToolHandler {
|
|
12
|
+
private statusService;
|
|
13
|
+
private componentService;
|
|
14
|
+
private incidentService;
|
|
15
|
+
constructor(statusService: StatusService, componentService: ComponentService, incidentService: IncidentService);
|
|
16
|
+
/**
|
|
17
|
+
* Handle tool request
|
|
18
|
+
*/
|
|
19
|
+
handleTool(name: string, args: unknown): Promise<unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Handle get overall status tool
|
|
22
|
+
*/
|
|
23
|
+
private handleGetOverallStatus;
|
|
24
|
+
/**
|
|
25
|
+
* Handle get components tool
|
|
26
|
+
*/
|
|
27
|
+
private handleGetComponents;
|
|
28
|
+
/**
|
|
29
|
+
* Handle get component tool
|
|
30
|
+
*/
|
|
31
|
+
private handleGetComponent;
|
|
32
|
+
/**
|
|
33
|
+
* Handle get incidents tool
|
|
34
|
+
*/
|
|
35
|
+
private handleGetIncidents;
|
|
36
|
+
/**
|
|
37
|
+
* Handle get maintenance tool
|
|
38
|
+
*/
|
|
39
|
+
private handleGetMaintenance;
|
|
40
|
+
/**
|
|
41
|
+
* Handle search tool
|
|
42
|
+
*/
|
|
43
|
+
private handleSearch;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create tool handler instance
|
|
47
|
+
*/
|
|
48
|
+
export declare function createToolHandler(statusService: StatusService, componentService: ComponentService, incidentService: IncidentService): ToolHandler;
|
|
49
|
+
//# sourceMappingURL=tool-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-handler.d.ts","sourceRoot":"","sources":["../../src/tools/tool-handler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAKlE;;GAEG;AACH,qBAAa,WAAW;IAEpB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,eAAe;gBAFf,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe;IAG1C;;OAEG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAgC/D;;OAEG;YACW,sBAAsB;IAapC;;OAEG;YACW,mBAAmB;IAkCjC;;OAEG;YACW,kBAAkB;IAmBhC;;OAEG;YACW,kBAAkB;IA4ChC;;OAEG;YACW,oBAAoB;IA0ClC;;OAEG;YACW,YAAY;CAkE3B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,GAC/B,WAAW,CAEb"}
|