@last9/mcp-server 0.1.8 → 0.1.11
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 +145 -9
- package/package.json +1 -1
- package/dist/last9-mcp-server +0 -0
package/README.md
CHANGED
|
@@ -17,14 +17,31 @@ Works with Claude desktop app, or Cursor, Windsurf, and VSCode (Github Copilot)
|
|
|
17
17
|
IDEs. Implements the following MCP
|
|
18
18
|
[tools](https://modelcontextprotocol.io/docs/concepts/tools):
|
|
19
19
|
|
|
20
|
+
**Observability & APM Tools:**
|
|
20
21
|
- `get_exceptions`: Get the list of exceptions.
|
|
21
|
-
- `
|
|
22
|
+
- `get_service_summary`: Get service summary with throughput, error rate, and response time.
|
|
23
|
+
- `get_service_environments`: Get available environments for services.
|
|
24
|
+
- `get_service_performance_details`: Get detailed performance metrics for a service.
|
|
25
|
+
- `get_service_operations_summary`: Get operations summary for a service.
|
|
26
|
+
- `get_service_dependency_graph`: Get service dependency graph showing incoming/outgoing dependencies.
|
|
27
|
+
|
|
28
|
+
**Prometheus/PromQL Tools:**
|
|
29
|
+
- `promptheus_range_query`: Execute PromQL range queries for metrics data.
|
|
30
|
+
- `prometheus_instant_query`: Execute PromQL instant queries for metrics data.
|
|
31
|
+
- `prometheus_label_values`: Get label values for PromQL queries.
|
|
32
|
+
- `prometheus_labels`: Get available labels for PromQL queries.
|
|
33
|
+
|
|
34
|
+
**Logs Management:**
|
|
22
35
|
- `get_logs`: Get logs filtered by service name and/or severity level.
|
|
23
36
|
- `get_drop_rules`: Get drop rules for logs that determine what logs get
|
|
24
37
|
filtered out at [Last9 Control Plane](https://last9.io/control-plane)
|
|
25
38
|
- `add_drop_rule`: Create a drop rule for logs at
|
|
26
39
|
[Last9 Control Plane](https://last9.io/control-plane)
|
|
27
40
|
|
|
41
|
+
**Alert Management:**
|
|
42
|
+
- `get_alert_config`: Get alert configurations (alert rules) from Last9.
|
|
43
|
+
- `get_alerts`: Get currently active alerts from Last9 monitoring system.
|
|
44
|
+
|
|
28
45
|
## Tools Documentation
|
|
29
46
|
|
|
30
47
|
### get_exceptions
|
|
@@ -43,18 +60,99 @@ Parameters:
|
|
|
43
60
|
HH:MM:SS). Leave empty to default to current time.
|
|
44
61
|
- `span_name` (string, optional): Name of the span to filter by.
|
|
45
62
|
|
|
46
|
-
###
|
|
63
|
+
### get_service_summary
|
|
47
64
|
|
|
48
|
-
|
|
49
|
-
throughput for each service.
|
|
65
|
+
Get service summary over a given time range. Includes service name, environment, throughput, error rate, and response time. All values are p95 quantiles over the time range.
|
|
50
66
|
|
|
51
67
|
Parameters:
|
|
52
68
|
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to end_time_iso - 1 hour.
|
|
70
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
71
|
+
- `env` (string, optional): Environment to filter by. Defaults to 'prod'.
|
|
72
|
+
|
|
73
|
+
### get_service_environments
|
|
74
|
+
|
|
75
|
+
Get available environments for services. Returns an array of environments that can be used with other APM tools.
|
|
76
|
+
|
|
77
|
+
Parameters:
|
|
78
|
+
|
|
79
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to end_time_iso - 1 hour.
|
|
80
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
81
|
+
|
|
82
|
+
Note: All other APM tools that retrieve service information (like `get_service_performance_details`, `get_service_dependency_graph`, `get_service_operations_summary`, `get_service_summary`) require an `env` parameter. This parameter must be one of the environments returned by this tool. If this tool returns an empty array, use an empty string `""` for the env parameter.
|
|
83
|
+
|
|
84
|
+
### get_service_performance_details
|
|
85
|
+
|
|
86
|
+
Get detailed performance metrics for a specific service over a given time range.
|
|
87
|
+
|
|
88
|
+
Parameters:
|
|
89
|
+
|
|
90
|
+
- `service_name` (string, required): Name of the service to get performance details for.
|
|
91
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
92
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
93
|
+
- `env` (string, optional): Environment to filter by. Defaults to 'prod'.
|
|
94
|
+
|
|
95
|
+
### get_service_operations_summary
|
|
96
|
+
|
|
97
|
+
Get a summary of operations inside a service over a given time range. Returns operations like HTTP endpoints, database queries, messaging producer and HTTP client calls.
|
|
98
|
+
|
|
99
|
+
Parameters:
|
|
100
|
+
|
|
101
|
+
- `service_name` (string, required): Name of the service to get operations summary for.
|
|
102
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
103
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
104
|
+
- `env` (string, optional): Environment to filter by. Defaults to 'prod'.
|
|
105
|
+
|
|
106
|
+
### get_service_dependency_graph
|
|
107
|
+
|
|
108
|
+
Get details of the throughput, response times and error rates of incoming, outgoing and infrastructure components of a service. Useful for analyzing cascading effects of errors and performance issues.
|
|
109
|
+
|
|
110
|
+
Parameters:
|
|
111
|
+
|
|
112
|
+
- `service_name` (string, optional): Name of the service to get the dependency graph for.
|
|
113
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
114
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
115
|
+
- `env` (string, optional): Environment to filter by. Defaults to 'prod'.
|
|
116
|
+
|
|
117
|
+
### promptheus_range_query
|
|
118
|
+
|
|
119
|
+
Perform a Prometheus range query to get metrics data over a specified time range. Recommended to check available labels first using `prometheus_labels` tool.
|
|
120
|
+
|
|
121
|
+
Parameters:
|
|
122
|
+
|
|
123
|
+
- `query` (string, required): The range query to execute.
|
|
124
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
125
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
126
|
+
|
|
127
|
+
### prometheus_instant_query
|
|
128
|
+
|
|
129
|
+
Perform a Prometheus instant query to get metrics data at a specific point in time. Typically should use rollup functions like sum_over_time, avg_over_time, quantile_over_time over a time window.
|
|
130
|
+
|
|
131
|
+
Parameters:
|
|
132
|
+
|
|
133
|
+
- `query` (string, required): The instant query to execute.
|
|
134
|
+
- `time_iso` (string, optional): Time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
135
|
+
|
|
136
|
+
### prometheus_label_values
|
|
137
|
+
|
|
138
|
+
Return the label values for a particular label and PromQL filter query. Similar to Prometheus /label_values call.
|
|
139
|
+
|
|
140
|
+
Parameters:
|
|
141
|
+
|
|
142
|
+
- `match_query` (string, required): A valid PromQL filter query.
|
|
143
|
+
- `label` (string, required): The label to get values for.
|
|
144
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
145
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
146
|
+
|
|
147
|
+
### prometheus_labels
|
|
148
|
+
|
|
149
|
+
Return the labels for a given PromQL match query. Similar to Prometheus /labels call.
|
|
150
|
+
|
|
151
|
+
Parameters:
|
|
152
|
+
|
|
153
|
+
- `match_query` (string, required): A valid PromQL filter query.
|
|
154
|
+
- `start_time_iso` (string, optional): Start time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to now - 60 minutes.
|
|
155
|
+
- `end_time_iso` (string, optional): End time in ISO format (YYYY-MM-DD HH:MM:SS). Leave empty to default to current time.
|
|
58
156
|
|
|
59
157
|
### get_logs
|
|
60
158
|
|
|
@@ -101,6 +199,44 @@ Parameters:
|
|
|
101
199
|
Valid values:
|
|
102
200
|
- "and"
|
|
103
201
|
|
|
202
|
+
### get_alert_config
|
|
203
|
+
|
|
204
|
+
Get alert configurations (alert rules) from Last9. Returns all configured alert rules including their conditions, labels, and annotations.
|
|
205
|
+
|
|
206
|
+
Parameters:
|
|
207
|
+
|
|
208
|
+
None - This tool retrieves all available alert configurations.
|
|
209
|
+
|
|
210
|
+
Returns information about:
|
|
211
|
+
|
|
212
|
+
- Alert rule ID and name
|
|
213
|
+
- Primary indicator being monitored
|
|
214
|
+
- Current state and severity
|
|
215
|
+
- Algorithm used for alerting
|
|
216
|
+
- Entity ID and organization details
|
|
217
|
+
- Properties and configuration
|
|
218
|
+
- Creation and update timestamps
|
|
219
|
+
- Group timeseries notification settings
|
|
220
|
+
|
|
221
|
+
### get_alerts
|
|
222
|
+
|
|
223
|
+
Get currently active alerts from Last9 monitoring system. Returns all alerts that are currently firing or have fired recently within the specified time window.
|
|
224
|
+
|
|
225
|
+
Parameters:
|
|
226
|
+
|
|
227
|
+
- `timestamp` (integer, optional): Unix timestamp for the query time. Leave empty to default to current time.
|
|
228
|
+
- `window` (integer, optional): Time window in seconds to look back for alerts. Defaults to 900 seconds (15 minutes). Range: 60-86400 seconds.
|
|
229
|
+
|
|
230
|
+
Returns information about:
|
|
231
|
+
|
|
232
|
+
- Alert rule details (ID, name, group, type)
|
|
233
|
+
- Current state and severity
|
|
234
|
+
- Last fired timestamp and duration
|
|
235
|
+
- Rule properties and configuration
|
|
236
|
+
- Alert instances with current values
|
|
237
|
+
- Metric degradation information
|
|
238
|
+
- Group labels and annotations for each instance
|
|
239
|
+
|
|
104
240
|
## Installation
|
|
105
241
|
|
|
106
242
|
You can install the Last9 Observability MCP server using either:
|
package/package.json
CHANGED
package/dist/last9-mcp-server
DELETED
|
Binary file
|