get_cluster_nodes
Retrieve cluster node details including roles, addresses, health status, and slot ranges for Valkey/Redis instances to monitor distributed database performance.
Instructions
Discover all nodes in the Valkey cluster — role (master/replica), address, health status, and slot ranges. Returns an error message if this instance is not running in cluster mode.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | No | Optional instance ID override |
Implementation Reference
- packages/mcp/src/index.ts:570-580 (handler)The tool 'get_cluster_nodes' handler implementation in the MCP server package, which fetches cluster node data via an internal API call.
server.tool( 'get_cluster_nodes', 'Discover all nodes in the Valkey cluster — role (master/replica), address, health status, and slot ranges. Returns an error message if this instance is not running in cluster mode.', { instanceId: z.string().optional().describe('Optional instance ID override') }, async ({ instanceId }) => { const id = resolveInstanceId(instanceId); const data = await apiFetch(`/mcp/instance/${id}/cluster/nodes`); return { content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }], }; },