Metrics
The MCP server supports querying Prometheus-compatible metrics using PromQL. Use these tools to retrieve time-series data, explore label metadata, and monitor service behavior in real time.
Instant metric query
Run a PromQL expression at a single point in time using the metrics__instant_query
tool.
Example:
Parameters:
Name | Description |
---|---|
query | A valid PromQL expression to evaluate at a single point in time. |
limit | Maximum number of time-series to return (1–20). |
evaluationTime | (Optional) RFC-3339 timestamp (UTC) to evaluate the query at a specific time. Defaults to current time if omitted. |
Range metric query
Run a PromQL expression across a time window using the metrics__range_query
tool.
Example:
{
"query": "cpu_usage_percent",
"start": "2024-01-15T10:00:00Z",
"end": "2024-01-15T11:00:00Z",
"step": "1m",
"limit": 5
}
Parameters:
Name | Description |
---|---|
query | A valid PromQL expression to evaluate over a range of time. |
start | Start time of the query window (RFC-3339 UTC format). |
end | End time of the query window (RFC-3339 UTC format). |
step | Interval between data points, specified as a duration (e.g., 1m , 30s ). |
limit | Maximum number of time-series to return (1–20). |
List metric label names
Get all metric label names within a time range using the metrics__labels
tool.
Example:
{
"limit": 10,
"startDate": "2024-01-15T00:00:00Z",
"endDate": "2024-01-15T23:59:59Z",
"match": ["app=\"frontend\""]
}
Parameters:
Name | Description |
---|---|
limit | Maximum number of label names to return (1–20). |
startDate | (Optional) Start of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
endDate | (Optional) End of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
match | (Optional) Array of PromQL selector strings to filter results. |
List values for a specific label
List possible values for a specific label using the metrics__label_values
tool.
Example:
Parameters:
Name | Description |
---|---|
labelName | The name of the label to retrieve values for. |
limit | Maximum number of values to return (1–20). |
startDate | (Optional) Start of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
endDate | (Optional) End of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
match | (Optional) Array of PromQL selector strings to filter results. |
List matching metric series
Return all metric series (label sets) matching a selector list using the metrics__series
tool.
Example:
Parameters:
Name | Description |
---|---|
match | Array of PromQL selectors used to filter series. |
limit | Maximum number of series (label sets) to return (1–20). |
startDate | (Optional) Start of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
endDate | (Optional) End of the search range (RFC-3339 UTC). Allows dates up to three months back from the current date. |
Theme
Light