Skip to main content
Glama

OCM MCP Server

by yanmxa
387
2

prometheus

Query Prometheus metrics for charting, supporting instant or time-series data. Group results by labels like 'pod' or 'namespace', and specify units such as bytes or cores. Works across multi-cluster Kubernetes environments.

Instructions

Queries a Prometheus server (snapshot or range) and returns metrics formatted for charting.

Input Schema

NameRequiredDescriptionDefault
clusterNoTarget cluster name in a multi-cluster environment. Defaults to the hub cluster if not provided.default
data_typeNoType of query: 'snapshot' (instant) or 'range' (time-series).snapshot
endNo(range only) End time in ISO 8601 format. Defaults to current time if not provided.
group_byNoLabel to group results by, such as 'pod' or 'namespace'. If not specified, behavior depends on the query (e.g., 'sum', 'avg').pod
qlYesThe PromQL query string to run against the Prometheus server.
startNo(range only) Start time in ISO 8601 format, e.g., '2025-06-06T00:00:00Z'.
stepNo(range only) Resolution step (e.g., '30s', '5m', '1h'). Choose appropriately to keep the sample count under 200.
unitNoDesired output unit. Use 'auto' to infer from the query content (e.g., memory → MiB, CPU → cores).auto

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "cluster": { "default": "default", "description": "Target cluster name in a multi-cluster environment. Defaults to the hub cluster if not provided.", "type": "string" }, "data_type": { "default": "snapshot", "description": "Type of query: 'snapshot' (instant) or 'range' (time-series).", "enum": [ "snapshot", "range" ], "type": "string" }, "end": { "description": "(range only) End time in ISO 8601 format. Defaults to current time if not provided.", "type": "string" }, "group_by": { "default": "pod", "description": "Label to group results by, such as 'pod' or 'namespace'. If not specified, behavior depends on the query (e.g., 'sum', 'avg').", "type": "string" }, "ql": { "description": "The PromQL query string to run against the Prometheus server.", "type": "string" }, "start": { "description": "(range only) Start time in ISO 8601 format, e.g., '2025-06-06T00:00:00Z'.", "type": "string" }, "step": { "description": "(range only) Resolution step (e.g., '30s', '5m', '1h'). Choose appropriately to keep the sample count under 200.", "type": "string" }, "unit": { "default": "auto", "description": "Desired output unit. Use 'auto' to infer from the query content (e.g., memory → MiB, CPU → cores).", "enum": [ "auto", "bytes", "MiB", "GiB", "cores", "millicores" ], "type": "string" } }, "required": [ "ql" ], "type": "object" }
Install Server

Other Tools from OCM MCP Server

Related Tools

    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/yanmxa/ocm-mcp-server'

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