Skip to content
On this page

Last updated:

MCP Tools

The MCP server exposes the following tools. Input schemas match the CLI subcommands.

TIP

All results are returned as text content containing pretty-printed JSON from the Prometheus HTTP API.

prometheus_query

  • Description: Execute a Prometheus instant query

Parameters

NameTypeRequiredNotes
querystringyesPromQL query
timestringnoEvaluation timestamp (RFC3339 or Unix epoch seconds)
Example call
json
{
  "method": "tools/call",
  "params": {
    "name": "prometheus_query",
    "arguments": {
      "query": "up",
      "time": "2025-09-27T12:00:00Z"
    }
  }
}

prometheus_query_range

  • Description: Execute a Prometheus range query

Parameters

NameTypeRequiredNotes
querystringyesPromQL query
startstringyesRange start time
endstringyesRange end time
stepstringyese.g., 30s, 1m, 1h

prometheus_list_metrics

  • Description: List all metric names (values of the __name__ label)

Parameters

NameTypeRequiredNotes
This tool has no parameters

prometheus_get_metadata

  • Description: Get metadata about a specific metric

Parameters

NameTypeRequiredNotes
metricstringyesMetric name

prometheus_get_series

  • Description: Get time series data for selectors

Parameters

NameTypeRequiredNotes
match_stringsarray<string>yesOne or more series selectors
Example call
json
{
  "name": "prometheus_get_series",
  "arguments": {
    "match_strings": [
      "up",
      "node_cpu_seconds_total{mode=\"idle\"}"
    ]
  }
}

prometheus_get_label_values

  • Description: Get all label values for a specific label

Parameters

NameTypeRequiredNotes
label_namestringyesLabel key to list values for

Apache-2.0 Licensed