Skip to main content
Glama
This connector has been deprecated

Replaced by Control Plane.

This listing has been renamed. Control Plane is now listed as com.controlplane/mcp.

It is the same server at the same endpoint (https://mcp.cpln.io/mcp), so existing connections keep working. Please use the new listing going forward.

Query Workload Metrics (PromQL)

query_metrics
Read-onlyIdempotent

Run a PromQL query over Control Plane metrics. Default: a range query over the last hour at a 60s step; resolution "instant" for one point, and since, from, to, and step to adjust. Prose shows the first 50 series; the full response is attached as JSON. Gauges (cpu_used, mem_used, replica_count) and the pre-rated egress and requests_per_second are queried bare; counters need rate(), e.g. sum by (workload) (rate(container_restarts[5m])); latency is histogram_quantile(0.95, sum by (le) (request_duration_ms_bucket)). Without query, lists the metrics instead: the documented defaults with a PromQL template each, plus every metric present in the org now (custom, mk8s). mk8s clusters with the metrics add-on label their series cluster_name and node, e.g. sum by (node) (rate(node_cpu_seconds_total{cluster_name="prod",mode!="idle"}[5m])). List first when a name or label is uncertain or a query returns no series. Measure before changing autoscaling.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "query_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of range — RFC3339 or epoch seconds. Default: now.
orgNoOrganization slug.
fromNoStart of range — RFC3339 or epoch seconds. Overrides `since` when set.
stepNoStep (range queries only). Examples: "15s", "60s", "5m". Default: "60s".
limitNoWithout `query`: most documented metrics to list (default: all).
queryNoPromQL, scoped to the org (no org label). Real metric names only; omit `query` to list them if unsure. Pre-rated egress, cross_zone_traffic, and requests_per_second are queried bare, never in rate().
sinceNoRelative lookback (e.g., "5m", "1h", "24h"). Used when `from` is not provided. Default: "1h".
filterNoWithout `query`: a case-insensitive substring that narrows the listed names, e.g. "cpu".
metricNoWithout `query`: a metric name, custom ones too; returns its live labels and their values.
resolutionNo`instant` for /query — a single sample at `to` (defaults to now); `from`/`since`/`step` are ignored. `range` for /query_range (default).

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoThe full result. Read this, not only the summary.
detailsNo
summaryYes
nextStepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / metric / description
      Previous value: -"Without `query`: a metric name, custom ones too; returns its live label values (workload, gvc, location)."New value: +"Without `query`: a metric name, custom ones too; returns its live labels and their values."
  2. Changed5 schema fields changed
    • addedInput schema / properties / filter
      Added value: +{
      +  "description": "Without `query`: a case-insensitive substring that narrows the listed names, e.g. \"cpu\".",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Without `query`: most documented metrics to list (default: all).",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / metric
      Added value: +{
      +  "description": "Without `query`: a metric name, custom ones too; returns its live label values (workload, gvc, location).",
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"PromQL, scoped to the org (no org label). Real metric names only; list_metrics if unsure. Pre-rated egress, cross_zone_traffic, and requests_per_second are queried bare, never in rate()."New value: +"PromQL, scoped to the org (no org label). Real metric names only; omit `query` to list them if unsure. Pre-rated egress, cross_zone_traffic, and requests_per_second are queried bare, never in rate()."
    • removedInput schema / required
      Removed value: -[
      -  "query"
      -]
  3. Changed21 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / from / maxLength
      Removed value: -40
    • changedInput schema / properties / org / description
      Previous value: -"Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants."New value: +"Organization slug."
    • removedInput schema / properties / org / maxLength
      Removed value: -63
    • removedInput schema / properties / org / minLength
      Removed value: -1
    • removedInput schema / properties / org / pattern
      Removed value: -"^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$"
    • changedInput schema / properties / query / description
      Previous value: -"PromQL query, scoped automatically to the org in the request path (no `org=` label needed). Use REAL Control Plane metric names — call list_metrics if unsure. Examples with actual metrics: `avg by (workload) (cpu_used)` (gauge), `sum by (workload) (rate(container_restarts[5m]))` (counter), `histogram_quantile(0.95, sum by (le) (request_duration_ms_bucket))` (latency histogram). Pre-rated series — `egress`, `cross_zone_traffic`, `requests_per_second` — are queried bare, never wrapped in rate()."New value: +"PromQL, scoped to the org (no org label). Real metric names only; list_metrics if unsure. Pre-rated egress, cross_zone_traffic, and requests_per_second are queried bare, never in rate()."
    • removedInput schema / properties / query / maxLength
      Removed value: -4000
    • removedInput schema / properties / query / minLength
      Removed value: -1
    • removedInput schema / properties / since / maxLength
      Removed value: -40
    • removedInput schema / properties / step / maxLength
      Removed value: -20
    • removedInput schema / properties / to / maxLength
      Removed value: -40
    • changedInput schema / required
      Previous value: -[
      -  "org",
      -  "query"
      -]New value: +[
      +  "query"
      +]
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / data / description
      Previous value: -"The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary."New value: +"The full result. Read this, not only the summary."
    • addedOutput schema / properties / details
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / nextSteps / description
      Removed value: -"Recommended follow-up actions for this task, in order."
    • removedOutput schema / properties / ok / description
      Removed value: -"Whether the call succeeded."
    • removedOutput schema / properties / summary / description
      Removed value: -"One-line summary of the result."
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only/idempotent/non-destructive, and the description adds substantial context beyond them: default range window (last hour, 60s step), that prose truncates to 50 series with full JSON attached, and metric-type semantics (gauges and pre-rated metrics queried bare, counters need rate(), latency needs histogram_quantile). It also documents mk8s label conventions (cluster_name, node), which an agent could not infer elsewhere.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and defaults, then examples. It is dense and long, with three PromQL templates, but each illustrates a distinct metric class (counter, histogram, node-level) rather than padding. Slightly heavy for a single tool definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, open-ended PromQL tool with an output schema, the description covers everything an agent needs: defaults, mode switching, metric naming pitfalls, and label conventions. Return-format detail is appropriately left to the output schema, with just the 50-series truncation caveat noted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description goes modestly beyond by explaining how the time parameters interact ("resolution 'instant' for one point, and since, from, to, and step to adjust") and tying the optional `query` omission to list mode. It stops short of adding format examples for from/to beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ("Run a PromQL query over Control Plane metrics") and immediately disambiguates its two modes: query mode vs. list mode when `query` is omitted. An agent can distinguish it from siblings like query_traces or query_audit_events purely from the name and first sentence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete routing advice: "List first when a name or label is uncertain or a query returns no series," and "Measure before changing autoscaling." It does not explicitly name or exclude sibling tools, but the when-to-use guidance for its own two modes is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.