Skip to main content
Glama
elasticsearch-mcp

elasticsearch-mcp

esql

Read-only

Run ES|QL queries on Elasticsearch 8.11+ to return result columns and rows for filtering, aggregating, and sorting log data.

Instructions

Run an ES|QL query (Elasticsearch 8.11+), for example 'FROM logs-* | STATS errors = COUNT(*) BY host.name | SORT errors DESC | LIMIT 10'. Returns columns and rows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "esql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes

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?

readOnlyHint=true already tells the agent this is a safe, non-mutating read, so the description's remaining job is modest. It does add that the result is tabular ('Returns columns and rows') and that the cluster must be 8.11+, but says nothing about row caps, timeouts, or partial-failure behavior for a query language that can scan many indices.

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?

Two sentences: the capability plus version constraint comes first, the worked example second. Every element earns its place, and the example is the most efficient way to convey a query-language syntax in minimal space.

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 one-parameter read-only tool with no output schema and annotations covering the safety profile, this is close to sufficient — the version requirement, syntax example, and return shape cover the essentials. The remaining gap is operational detail such as result-size limits, which matters because ES|QL queries can span wildcard indices.

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 0% — the single 'query' parameter carries only a title and type, so the description must compensate. It partially does by showing a full ES|QL pipeline example that demonstrates the syntax shape, but it never states that the parameter is required or what the valid command set is.

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?

States a specific verb and resource ('Run an ES|QL query') and adds a version floor (Elasticsearch 8.11+), so an agent knows exactly what the tool executes. It does not contrast itself with the sibling 'search' tool, so the agent must infer that 'search' is for DSL/other query forms rather than ES|QL.

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 through a concrete example query and the 8.11+ prerequisite, which is genuinely useful gating information. However, there is no explicit statement of when to choose this over the sibling 'search' tool, nor any guidance on query complexity, result-size limits, or failure conditions.

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