Skip to main content
Glama
baburajr

elasticsearch-mcp

by baburajr

sql_translate

Read-only

Convert an Elasticsearch SQL SELECT into the equivalent Query DSL using _sql/translate without running it. Learn the query structure, then pass the DSL to run_query for control.

Instructions

Translate an Elasticsearch SQL SELECT into the equivalent native Query DSL via _sql/translate, without running it. Use this to learn the DSL for a query, then hand the DSL to run_query for full control (search_after, routing, profiling).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description adds meaningful behavioral context beyond annotations by stating the operation is a translation only and that the query is not executed. It also clarifies the relationship to run_query, which is valuable for understanding 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?

Two sentences with no filler. The core action is stated first, followed by a concrete usage recommendation. It is concise, scannable, and every clause adds value.

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?

With only one parameter, an output schema, and readOnly annotations, the description addresses all essential aspects: what the tool does, that it does not run the query, what it is useful for, and how to proceed afterward. Nothing critical is missing.

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?

The input schema only exposes 'query' with no description, and schema coverage is 0%, so the description carries the burden. The description compensates by indicating the parameter is a SQL SELECT statement that must be translatable, though it could explicitly name the parameter for absolute clarity.

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 a specific action: translating an Elasticsearch SQL SELECT into native Query DSL via _sql/translate, and notes that it does not execute the query. This distinguishes it from siblings like run_query and sql_query, which actually run queries.

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

Usage Guidelines5/5

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

It explicitly explains when to use the tool: to learn the DSL for a query. It also names run_query as the next step for full control and implies the appropriate workflow, giving the agent a clear decision path.

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/baburajr/elasticsearch_mcp'

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