Skip to main content
Glama

get_cluster_metrics

Read-only

Retrieve one or more Couchbase cluster statistics over a historic time window in a single call to check whether a metric is spiking, climbing, or stable and quantify suspected problems.

Instructions

Get one or more cluster statistics over a historic time window in a single call.

Use this to quantify a suspected problem (e.g. after get_cluster_health_and_services or get_client_connectivity_report) — is a metric spiking, climbing, or stable over time?

Self-managed Couchbase Server 7.6+ only — rejects Capella connections without a REST call. Calls POST /pools/default/stats/range.

metrics is passed through as the request body: a list of specs, each with a required "metric" (list of {"label", "value"} pairs, e.g. [{"label": "name", "value": "kv_ep_diskqueue_fill"}]), an optional "nodes" ("host:port" targets; omit it to cover every node, which is usually what you want), and optional "applyFunctions", "nodesAggregation", "start"/"end" (negative seconds relative to now; default -60/now), "step" (seconds, default 10), "alignTimestamps".

To find metric names, call discover_tool_input_values(tool_name="get_cluster_metrics") — it lists or searches the full Couchbase metrics reference bundled with this server, offline. Don't guess a metric name: an unknown name comes back as a per-spec error with no data.

Not bounded: any number of specs, window, step, or node count is passed straight through to the REST call, so a broad request (long window, fine step, many nodes/specs) can return a large response.

Returns {"status": "success", "data": [...]} (one entry per spec, each with "data" and any per-spec "errors") or {"status": "error", "error": "..."}.

Input Schema

NameRequiredDescriptionDefault
metricsYes
timeoutNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond readOnlyHint=true, it discloses the underlying REST endpoint (POST /pools/default/stats/range), the Capella rejection behavior and extra REST call cost, the per-spec error behavior for unknown metric names, and that requests are unbounded so broad queries can return large payloads. That is substantive operational context the annotations cannot convey; only the timeout parameter's runtime effect is left unstated.

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 purpose, then applicability caveat, then parameter contract, then metric-name discovery, then response shape — a logical order with no filler sentences. It runs long and the closing 'Returns {...}' block partially duplicates the existing output schema, a small redundancy.

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 read-only, single-endpoint metrics query with an opaque schema, the description supplies applicability limits, parameter defaults, error semantics, discovery path for metric names, and response envelope. Little an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0% and the metrics schema is an opaque array of free-form objects, yet the description fully unpacks the request-body shape: required 'metric' as label/value pairs with a concrete example, optional nodes targets with the 'omit to cover every node' default, applyFunctions/nodesAggregation/alignTimestamps, start/end defaults of -60/now, and step default of 10. That is exactly the compensation needed for a fully undocumented schema.

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 plus scope: 'Get one or more cluster statistics over a historic time window in a single call.' It also distinguishes itself from the diagnostic siblings by positioning itself as the quantification step after get_cluster_health_and_services or get_client_connectivity_report, so an agent can pick it out of a 30+ tool list.

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

Usage Guidelines5/5

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

Explicit when-to-use with named upstream tools ('to quantify a suspected problem ... is a metric spiking, climbing, or stable'). It also states a hard applicability boundary (self-managed Couchbase Server 7.6+ only, rejects Capella) and routes to discover_tool_input_values for metric names instead of guessing.

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