Skip to main content
Glama

get_cluster_nodes

Discover all nodes in a Valkey cluster with their role, address, state, and slot ranges. Identify failed, suspect, or healthy nodes and see which ones have active monitoring connections.

Instructions

Discover all nodes in the Valkey cluster — role (master/replica), address, state, and slot ranges. Each node has a state: failed when its peers agreed it is down (the fail flag), suspect when they only suspect it (fail?, PFAIL) or it is not a full member yet (handshake, noaddr), and healthy otherwise. The healthy boolean is deprecated: it is true only when state is healthy, use state instead. On Valkey 9.1+ each node also carries shardId, and availabilityZone when the node has one configured. On older versions availabilityZone comes from the zone map set on the connection, if any. collected is true when a connection of the monitor points at the node (its address or announced hostname) and is not known to read another node there, or the node is the one this instance reads; connectionId then names that connection. A node that is not collected has no connection of its own: its slow log, client list and stored metrics are not gathered. Cluster-wide checks can still raise events about it. Returns an error message if this instance is not running in cluster mode.

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": "get_cluster_nodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceIdNoOptional instance ID override

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.33.0
  2. Removedv0.31.0
  3. Addedv0.20.2
  4. Removedv0.20.1
  5. Changed1 schema field changedv0.16.0
    • removedInput schema / additionalProperties
      Removed value: -false
  6. First observedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it explains that a node can be 'collected' or not, that uncollected nodes have no slow log, client list, or metrics gathered, that cluster-wide checks can still raise events about them, and that non-cluster mode returns an error. It also discloses the deprecated `healthy` boolean and version-dependent field availability (Valkey 9.1+ shardId, zone-map fallback on older versions).

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?

The core capability is front-loaded in the first sentence, and each subsequent sentence covers a distinct field-semantics topic (state values, deprecated flag, versioned fields, `collected`/`connectionId`). It is a dense wall of prose rather than structured, but given there is no output schema, the field detail is largely earned.

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 discovery tool with no output schema, the description covers the return shape in detail — state enumeration, version-conditional fields, `collected`/`connectionId` semantics — plus the cluster-mode error condition. Nothing an agent needs to call and interpret it 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?

The single parameter `instanceId` has full schema description coverage ('Optional instance ID override'), so the agent already understands it from the schema. The description adds nothing about the parameter, which is acceptable at 100% coverage but earns only the baseline.

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?

The definition opens with a specific verb and resource: 'Discover all nodes in the Valkey cluster' and enumerates exactly what is returned (role, address, state, slot ranges). That scope is distinguishable from sibling tools like get_cluster_node_stats and get_slot_stats, which focus on per-node metrics and slot-level detail respectively.

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

Usage Guidelines3/5

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

It states one hard precondition — 'Returns an error message if this instance is not running in cluster mode' — which is useful gating. However, it never says when to prefer this tool over get_cluster_node_stats or get_slot_stats, so the agent must infer the choice from the purpose statement alone.

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