You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding ability to mcp server to pull service metrics (#28)
* Adding ability to mcp server to pull service metrics
* Addressing Previsou PR feedback from Ammar
* Fixing issues and adding ability for the MCP plugin to get instance count
* Add HTTP error and response time metrics support
- Add httperrors and responsetime metric types to MetricType constants
- Implement getHTTPErrorMetrics() for error breakdown by status code
- Implement getResponseTimeMetrics() for P95 latency percentiles
- Update tool description and validation to include new metric types
- Add comprehensive test coverage for new metric types
- Update README documentation with usage examples
Copy file name to clipboardExpand all lines: README.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ server that allows you to interact with your Render resources via LLMs.
8
8
9
9
- Creating and managing web services, static sites, and databases on Render
10
10
- Monitoring application logs and deployment status to help troubleshoot issues
11
+
- Monitoring service performance metrics for debugging, capacity planning, and optimization
11
12
- Querying your Postgres databases directly inside an LLM
12
13
13
14
## Feedback
@@ -215,6 +216,16 @@ feedback or would like to report a bug or feature request, please [create a GitH
215
216
-`endTime`: End time for log query (RFC3339 format) (string, optional)
216
217
-`direction`: The direction to query logs for (string, optional)
217
218
219
+
### Metrics
220
+
221
+
-**get_metrics** - Get performance metrics for any Render resource (services, Postgres databases, key-value stores). Metrics may be empty if the metric is not valid for the given resource
222
+
-`resourceId`: The ID of the resource to get metrics for (service ID, Postgres ID, or key-value store ID) (string, required)
223
+
-`metricTypes`: Which metrics to fetch (array of strings, required). Accepted values: 'cpu', 'memory', 'http', 'connections', 'instancecount', 'httperrors', 'responsetime'. CPU and memory are available for all resources. HTTP, instance count, HTTP error, and response time metrics are only available for services. Connection metrics are only available for databases and key-value stores
224
+
-`startTime`: Start time for metrics query (RFC3339 format), defaults to 1 hour ago (string, optional)
225
+
-`endTime`: End time for metrics query (RFC3339 format), defaults to now (string, optional)
226
+
-`resolution`: Time resolution for data points in seconds, minimum 30 seconds. API defaults to 60 seconds if not provided (number, optional)
227
+
-`aggregationMethod`: Data aggregation method. Accepted values: 'AVG', 'MAX', 'MIN', defaults to 'AVG' (string, optional)
228
+
218
229
### Postgres Databases
219
230
220
231
-**query_render_postgres** - Run a read-only SQL query against a Render-hosted Postgres database
@@ -272,6 +283,28 @@ feedback or would like to report a bug or feature request, please [create a GitH
272
283
[MCP will create a Key Value with appropriate configuration]
273
284
```
274
285
286
+
### Performance Monitoring & Optimization
287
+
288
+
```
289
+
"Show me CPU and memory metrics for my service srv-abc123 over the last 2 hours"
290
+
[MCP will fetch CPU and memory time-series data for analysis]
291
+
292
+
"Get HTTP request metrics for my web service to identify traffic patterns"
293
+
[MCP will show HTTP request volume and response metrics, or empty results if not a web service]
294
+
295
+
"Show me instance count metrics to understand my service scaling"
296
+
[MCP will display instance count over time to help with capacity planning and scaling decisions]
297
+
298
+
"Get HTTP error metrics to identify if issues are client-side or server-side problems"
299
+
[MCP will show error rates by status code, helping distinguish 4xx (client errors) vs 5xx (server errors)]
300
+
301
+
"Check response time metrics to debug performance issues"
302
+
[MCP will display P95 response time percentiles to identify latency bottlenecks and timeout issues]
303
+
304
+
"Check database performance metrics for my Postgres instance pg-def456"
305
+
[MCP will display CPU, memory, and connection metrics for the database]
0 commit comments