Skip to main content
Glama

get_hot_shards

Identify hot shards on a Valkey or Redis cluster by returning shards above twice median CPU for a minute, with load, hot keys, and a read-only rebalance suggestion.

Instructions

Get the hot shards open on a cluster right now: each shard that has carried at least twice the median CPU for a minute, with its load, top slots, hot keys when they can be read, and a rebalance suggestion. Each hot shard names its primary in node (nodeId, address, role, plus shardId and availabilityZone when known, and collected: false when no connection of the monitor points at that node, so its own metrics are not gathered; connectionId names the connection that collects it). rebalance.kind is plan (slot ranges to move to named target shards, the projected load of every shard before and after, warnings such as a target short on memory or replicas, and in commands the command an operator can run for the move when support is valkey_atomic or redis_atomic) or no_plan with a reason: key_level (one or a few slots carry the load, so moving slots will not help), cluster_hot (the other shards together have no room), too_many_targets (there is room, but not within the 4 shards one suggestion may use), covered_by_other_plan (the plan for another hot shard, listed in coveredBy, already brings this one near the median: apply that plan first), conflicts_with_other_plan (no plan for this shard fits next to the plans for the hot shards listed in conflictsWith: apply those first), no_target, unhealthy_node, migration_running, settling or slots_scattered. The suggestion is read-only: nothing is moved. An empty list means no hot shard event is open; it does not prove the cluster is balanced: a shard must stay hot for a minute first, and the per-slot load must be measured (cluster-slot-stats-enabled yes on every primary, on a connection that reaches each node). Use when a cluster looks unbalanced or a hot_shard anomaly is open.

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_hot_shards"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceIdNoOptional instance ID override

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.56.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it declares that the suggestion is read-only and nothing is moved, explains empty-list semantics, and discloses the cluster-slot-stats-enabled prerequisite. It also defines output fields such as collected, connectionId, rebalance.kind, and each no_plan reason.

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 description is long and dense but front-loads the purpose and progresses logically from returned fields to rebalance reasons to usage. The length is largely justified by the absence of an output schema, though some field-level detail could be trimmed.

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?

No output schema exists, so the description must explain return values; it does so comprehensively, including node fields, rebalance kinds, no_plan reasons, and empty-list caveats. For a complex monitoring tool with one optional parameter, this is complete enough to call correctly.

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?

Schema coverage is 100% for the single optional instanceId parameter, and the description does not add usage details beyond the schema's 'Optional instance ID override.' The baseline for high schema coverage with no extra parameter guidance is 3.

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 description states a specific verb and resource: get the hot shards open on a cluster right now. It defines the exact hot-shard condition (at least twice the median CPU for a minute) and lists the returned content, so an agent can distinguish this from general slot-stats or hot-keys tools.

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

Usage Guidelines4/5

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

It explicitly says when to use the tool: when a cluster looks unbalanced or a hot_shard anomaly is open. It does not name an alternative tool or state when not to use it, but the trigger context is clear.

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