Skip to main content
Glama
elasticsearch-mcp

elasticsearch-mcp

get_shards

Read-only

Inspect Elasticsearch shards for indices matching a pattern to view primary/replica status, state, document counts, size, and node assignment.

Instructions

Show shards for indices matching a pattern: primary or replica, state, docs, size and node.

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

Input Schema

NameRequiredDescriptionDefault
indexNo*

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes that this is a safe read operation. The description adds useful context by listing the shard attributes returned, but it does not discuss permissions, pagination, or any other behavioral caveats.

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 a single front-loaded sentence with no wasted wording. The scope and returned fields are presented efficiently.

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?

For a simple read-only tool with one optional parameter and no output schema, the description is largely complete because it names the returned shard fields. The only minor gap is that it does not explain the default index pattern or wildcard behavior.

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 description coverage is 0%, so the description must compensate. It clarifies that the index parameter accepts a pattern, which adds meaning beyond the bare schema, but it omits the default value "*" and does not explain wildcard syntax.

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 ("Show shards") plus the scope (indices matching a pattern) and the fields returned. It is clear what the tool does, though it does not explicitly distinguish itself from siblings like list_indices or cluster_health.

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?

Usage is implied: inspect shard-level details such as primary/replica, state, docs, size, and node. There is no explicit when-to-use guidance, no when-not-to-use guidance, and no named alternative for index-level or cluster-level inspection.

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