Skip to main content
Glama

Grafana MCP Server

by levalhq

query_prometheus

Execute PromQL queries against Prometheus data sources to retrieve instant metrics or time series data for monitoring and analysis.

Instructions

Query Prometheus using a PromQL expression. Supports both instant and range queries.

Input Schema

NameRequiredDescriptionDefault
datasourceUidYesThe UID of the datasource to query
endTimeNoThe end time for range queries
exprYesThe PromQL expression to query
queryTypeYesThe type of query to use
startTimeYesThe start time (RFC3339 or relative like "now-1h")
stepSecondsNoThe time series step size in seconds for range queries

Input Schema (JSON Schema)

{ "properties": { "datasourceUid": { "description": "The UID of the datasource to query", "type": "string" }, "endTime": { "description": "The end time for range queries", "type": "string" }, "expr": { "description": "The PromQL expression to query", "type": "string" }, "queryType": { "description": "The type of query to use", "enum": [ "range", "instant" ], "type": "string" }, "startTime": { "description": "The start time (RFC3339 or relative like \"now-1h\")", "type": "string" }, "stepSeconds": { "description": "The time series step size in seconds for range queries", "type": "number" } }, "required": [ "datasourceUid", "expr", "queryType", "startTime" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/levalhq/mcp-grafana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server