Skip to main content
Glama

get_slot_stats

Retrieve per-slot key counts and CPU usage to identify hot or most populated cluster slots; failedNodes reveals primaries that didn't respond. Valkey 8.0+ only.

Instructions

Get per-slot key counts and CPU usage (Valkey 8.0+ only). Use orderBy='cpu-usec' to find hot slots, or 'key-count' to find the most populated slots. Returns { slots, failedNodes }; failedNodes lists cluster primaries that did not answer, whose slots are missing. Returns an error message if not supported.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax slots to return (default 20)
orderByNoSort order: 'key-count' or 'cpu-usec' (default 'key-count')
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.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses version support, return shape, the meaning of failedNodes, missing slots from failed primaries, and error behavior when unsupported. It does not mention permissions or explicitly state that the operation is read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is compact and front-loaded: purpose first, then usage guidance, then return and error behavior. Every sentence contributes useful information without repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although there is no output schema, the description explains the returned object and the failedNodes caveat, which is important for interpreting missing slots. It could be more complete by explicitly noting cluster scope or permission requirements.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds goal-based meaning for orderBy beyond the enum descriptions. It adds no extra meaning for limit or instanceId beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: getting per-slot key counts and CPU usage. The Valkey 8.0+ qualifier narrows the scope, though it does not explicitly distinguish the tool from siblings such as get_hot_keys.

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 gives clear guidance for choosing orderBy values: cpu-usec for hot slots and key-count for the most populated slots. It also gates usage by Valkey version, but does not explain when to prefer this over related tools.

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