Skip to main content
Glama
bpamiri

elasticsearch-mcp

by bpamiri

es_search

Search Elasticsearch indices using Query DSL. Specify index, query, size, pagination, and sort to retrieve matching documents.

Instructions

Execute a search query using Elasticsearch Query DSL.

Args: index: Index to search (supports wildcards like "logs-*"). query: Elasticsearch query DSL (e.g., {"match": {"message": "error"}}). size: Maximum results to return (default: 10, max: from config). from_: Starting offset for pagination. sort: Sort specification (e.g., [{"@timestamp": "desc"}]).

Returns: Search hits with _id, _score, and _source fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
queryNo
sizeNo
from_No
sortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions defaults (size=10, max from config), wildcard support for index, and the return format. However, it does not explicitly state that this is a read-only operation, nor does it cover rate limits, authentication requirements, or potential side effects.

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 description is concise and well-structured: a one-sentence purpose statement, followed by a bullet-style parameter list with examples, and a clear return description. Every sentence adds value without redundancy.

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?

Given the presence of an output schema (not shown but indicated), the description adequately covers parameters and return values. It could be improved by mentioning potential errors or timeout settings, but it provides sufficient detail for a search operation.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description thoroughly explains each parameter: index (supports wildcards), query (example DSL), size (default and max), from_ (pagination offset), sort (example syntax). This adds significant meaning beyond the schema's type definitions.

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 clearly states the tool's purpose: 'Execute a search query using Elasticsearch Query DSL.' It specifies the action (execute search), the resource (Elasticsearch), and the method (Query DSL), distinguishing it from sibling tools like search_simple which likely uses simpler query formats.

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

Usage Guidelines2/5

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

The description does not provide any guidance on when to use this tool versus alternatives such as search_simple or aggregate. It lacks explicit context on when this tool is appropriate or not, leaving the agent to infer usage from the Query DSL mention.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bpamiri/elasticsearch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server