# Metrics

The MCP server supports querying Prometheus-compatible metrics using PromQL. Use these tools to retrieve time-series data, explore metric metadata, and monitor service behavior in real time.

Before querying, use `read_metrics_guidelines_v1` to understand best practices for constructing effective PromQL queries against Coralogix Metrics.

### Read metrics guidelines

Use the `read_metrics_guidelines_v1` tool to load guidance on how to query metrics effectively in Coralogix. Run this tool before using the other metrics tools to ensure your queries are well-formed.

### List available metrics

Use the `metrics__list_v1` tool to retrieve the names of metrics available in your Coralogix account within a given time range. This is useful for discovering what metrics exist before writing PromQL queries.

### Get metric details

Use the `metrics__metric_details_v1` tool to retrieve metadata for a specific Prometheus or Coralogix metric, including its type, labels, and example values. Use this to understand metric structure before constructing queries.

### Range metric query

Run a PromQL expression across a time window using the `metrics__range_query_v1` tool.

**Example:**

```js
{
  "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).                            |
