Skip to main content
Glama

get_cluster_tasks

Read-only

Retrieve current Couchbase cluster tasks (rebalance, compaction, XDCR, index builds) to find stuck jobs and lagging replication. Pair with metrics to tell slow progress from flatlined tasks.

Instructions

Get the cluster tasks running right now — rebalance, compaction, XDCR, index build.

Answers "what is this cluster doing?" — where stuck rebalances, hung index builds and lagging XDCR surface. One call is a single sample, so pair it with get_cluster_metrics to tell "slow but progressing" from "flatlined".

Calls GET /pools/default/tasks. Self-managed Couchbase Server 7.6+ only (Capella is rejected without a REST call); needs the Read-Only Admin (ro_admin) role.

Returns the endpoint's array unchanged, or [] if no tasks are reported. Only "type" and "status" are common to every entry; the rest are per type — rebalance: progress, perNode, detailedProgress, stageInfo, subtype; bucket_compaction: bucket, progress, changesDone, totalChanges; xdcr: changesLeft, docsChecked, docsWritten, source, target; global_indexes/indexer: bucket, index, progress, id; loadingSampleBucket: task_id, bucket, bucket_uuid.

Reading the result:

  • An idle cluster still reports a rebalance entry with status "notRunning", so check each task's "status" rather than counting entries.

  • "statusIsStale": true means the cluster cannot vouch for that status — read it as "unknown", not "stuck". Flatlined progress and a status that stopped updating look identical here but mean different things.

  • "progress" means different things per type, so do not compare it across tasks.

  • Poll no faster than "recommendedRefreshPeriod" (seconds), the server's own hint.

  • "cancelURI"/"lastReportURI" are informational UI links; this tool only ever GETs and never invokes them.

Input Schema

NameRequiredDescriptionDefault
timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond the readOnlyHint annotation: names the underlying endpoint, the platform and role requirements, the unchanged-pass-through return behavior, and the empty-array case. The per-type field map and the interpretation notes (idle clusters still emit a 'notRunning' rebalance entry, 'statusIsStale' means unknown, progress is not comparable across types, poll no faster than recommendedRefreshPeriod, cancelURI is never invoked) are exactly the behavioral context an agent cannot infer from annotations or schema.

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 one-line purpose, then the usage pairing, then endpoint/preconditions, then a bulleted reading guide — well structured and scannable. It is on the long side, and the per-type field enumeration partially duplicates the available output schema, but each bullet is actionable rather than filler.

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 diagnostic single-sample read tool, everything an agent needs is present: scope, preconditions, sibling relationship, sampling/polling guidance, and stale-vs-stuck interpretation traps. The presence of an output schema makes the return-value detail optional, yet it is included and correctly hedged as per-type.

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

Parameters3/5

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

The single parameter is an optional 'timeout' with 0% schema description coverage, and the description never mentions it, so its units and effect remain undefined. The gap is mitigated somewhat because the schema supplies a default of 30 and a timeout is a conventional control, but the description does not compensate for the coverage hole.

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?

States a specific verb and resource ('Get the cluster tasks running right now') and enumerates the task families it covers (rebalance, compaction, XDCR, index build). It also frames the question the tool answers ('what is this cluster doing?'), which separates it cleanly from the sibling get_cluster_metrics.

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?

Explicitly says to pair a single call with get_cluster_metrics to distinguish 'slow but progressing' from 'flatlined', giving both the when-to-use and the named alternative. It also states prerequisites and exclusions: self-managed Couchbase Server 7.6+ only, Capella rejected without a REST call, and the ro_admin role required.

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