Skip to main content
Glama

get_active_queries

Read-only

Retrieve all queries running right now across every query-service node to spot runaway or stuck statements, inspect elapsed time, statement text, client, and state, and obtain a requestId for cancellation.

Instructions

Get all queries executing right now, across every query-service node.

Use this to find a runaway or stuck statement: elapsed time, the statement text, the client, and current state. Pair with get_cluster_query_vitals to confirm the engine is actually under load from what this returns, and pass a result's "requestId" to delete_active_query to cancel it.

Calls GET /admin/active_requests. Self-managed Couchbase Server 7.6+ only (Capella is rejected without a REST call); needs at minimum the Read-Only Admin (ro_admin) role — verify against your cluster's RBAC before relying on this in production.

/admin/active_requests answers per node — a request only shows up when the node running it is asked — so every query-service node is queried and the lists are merged into one. Each entry already carries its own "node" field, so there is no need to tag entries by which endpoint answered.

Returns {"status": "success", "active_requests": [...merged...], "unreachable_nodes": [{"node", "error"}]} (the last key omitted when every node answered), or {"status": "error", "error": ...} if no query node could be reached at all, or the cluster is Capella.

Input Schema

NameRequiredDescriptionDefault
timeoutNo

Output Schema

NameRequiredDescriptionDefault

No arguments

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?

Beyond readOnlyHint=true, it discloses the per-node fan-out and merge behavior, the unreachable_nodes partial-failure shape, that Capella is rejected without a REST call, and the ro_admin RBAC requirement — exactly the operational context an agent needs.

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 purpose and actions, then caveats, then return shape; well organized, though the detailed return-value enumeration partly duplicates the existing output schema.

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?

Given an output schema exists, the description still adds the unreachable_nodes semantics and the all-nodes-failed error case, and it covers environment constraints (7.6+, self-managed only) and permissions — nothing material is missing.

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?

There is a single 'timeout' parameter with 0% schema description coverage, and the description never mentions it, so its units, default behavior, and effect on multi-node fan-out are left unexplained; the parameter is trivial enough that this is a moderate gap rather than a critical one.

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 all queries executing right now') plus scope ('across every query-service node'), and the returned fields (elapsed time, statement text, client, state) distinguish it from siblings like get_longest_running_queries and get_cluster_query_vitals.

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 when to use it ('find a runaway or stuck statement'), what to pair it with ('get_cluster_query_vitals to confirm the engine is actually under load'), and the follow-up action (pass requestId to delete_active_query).

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