Skip to main content
Glama

Read aggregated per-member metric time series

cluster_metrics_get
Read-onlyIdempotent

Retrieve aggregated per-member metric time series for a managed cluster over a chosen time range and step, including timestamps, values, units, and labels.

Instructions

Read aggregated per-member metric time series

Returns start, end, step and per-member series containing name, unit, labels and timestamp/value points for the requested time window. Select the cluster through clusters_list or cluster_get; missing clusters return 404 and unavailable monitoring returns 503.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cluster": "<cluster>"
    },
    "name": "cluster_metrics_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepNoPositive Go duration no greater than range. The omitted default 30s is bounded to a shorter requested range.30s
rangeNoPositive Go duration no greater than 24h, for example 30m, 1h or 24h. Days are not a duration unit.1h
clusterYesManaged cluster name; the RBAC object is namespace/cluster.
namespaceNoNamespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter.

Output Schema

NameRequiredDescriptionDefault
endYes
stepYes
startYes
seriesYes
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / $defs / NamespaceName
      Removed value: -{
      -  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      -  "maxLength": 32,
      -  "minLength": 2,
      -  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      -  "type": "string"
      -}
    • addedInput schema / $defs / NamespaceName_depth16
      Added value: +{
      +  "description": "Project namespace name, 2–32 lowercase letters, digits or hyphens; starts with a letter and ends with a letter or digit. The existing default namespace is reserved.",
      +  "maxLength": 32,
      +  "minLength": 2,
      +  "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cluster / description
      Added value: +"Managed cluster name; the RBAC object is namespace/cluster."
    • changedInput schema / properties / namespace / $ref
      Previous value: -"#/$defs/NamespaceName"New value: +"#/$defs/NamespaceName_depth16"
    • addedInput schema / properties / namespace / description
      Added value: +"Namespace of the requested object; defaults to default for single-object routes and creation. On collection routes (/clusters, /operations, /events, /events/stream, /orphaned-volumes, /backup-storages and root /metrics), absence includes all authorized namespaces and a value filters to that namespace. A nonexistent explicit namespace returns 404 not_found with resource namespace and its name only when the authenticated caller has a permission in that namespace. Otherwise collections remain empty and object requests retain their normal 403 response without revealing existence. Public and unauthenticated authentication routes do not resolve the parameter."
    • addedInput schema / properties / range / description
      Added value: +"Positive Go duration no greater than 24h, for example 30m, 1h or 24h. Days are not a duration unit."
    • addedInput schema / properties / step / description
      Added value: +"Positive Go duration no greater than range. The omitted default 30s is bounded to a shorter requested range."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "MetricPoint_depth14": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "timestamp": {
      +          "format": "date-time",
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "timestamp",
      +        "value"
      +      ],
      +      "type": "object"
      +    },
      +    "MetricSeries_depth15": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "labels": {
      +          "additionalProperties": {
      +            "type": "string"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "member": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "description": "Canonical series: opcounters.total (operations/second, aggregated counter rate), connections.current (count), repl.lagSeconds (seconds), cache.usedBytes and cache.maxBytes (bytes), cpu.percent (percent, 0-100), ram.usedBytes and ram.totalBytes (bytes), disk.usedBytes and disk.totalBytes (bytes). Providers may add names; clients must tolerate unknown series.",
      +          "type": "string"
      +        },
      +        "points": {
      +          "items": {
      +            "$ref": "#/$defs/MetricPoint_depth14"
      +          },
      +          "type": "array"
      +        },
      +        "unit": {
      +          "description": "Canonical units are operations/second, count, seconds, bytes and percent.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "member",
      +        "unit",
      +        "points"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "end": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    },
      +    "series": {
      +      "items": {
      +        "$ref": "#/$defs/MetricSeries_depth15"
      +      },
      +      "type": "array"
      +    },
      +    "start": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "step": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "start",
      +    "end",
      +    "step",
      +    "series"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety is covered structurally. The description still adds real value with its 404/503 error semantics and the returned envelope fields (start, end, step, per-member series). It says nothing about rate limits, retention limits, or how missing members are represented, so it is solid but not rich.

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?

Two short paragraphs, front-loaded with the verb and resource, followed by the return envelope and error behavior. Dense but every sentence carries information; no filler.

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

Completeness4/5

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

An output schema exists, so the description need not explain return values in detail, yet it still summarizes the envelope. Error behavior, cluster resolution, and window semantics are all covered; only edge cases like pagination or member absence are left implicit.

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 description coverage is 100%, so the schema already documents cluster, namespace, range and step formats. The description reinforces the time-window intent ('for the requested time window') and the cluster-selection path, which marginally helps but does not supersede the schema's constraints.

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

Purpose4/5

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

States a specific verb (Read) and resource (aggregated per-member metric time series), plus the window it covers. It does not explicitly differentiate itself from prometheus_metrics_get, but the scope ('per-member', aggregated) is concrete enough that an agent can tell what it returns.

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?

Explicitly tells the agent to resolve the cluster via clusters_list or cluster_get, and names failure conditions (404 for missing clusters, 503 for unavailable monitoring). It gives no guidance on when to prefer this over prometheus_metrics_get, but the usage context is clear.

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

Deploy Server

Other Tools