MCP server for interacting with elasticsearch
The Elasticsearch MCP server has 4 tools with basic but incomplete definitions. All tools are explicitly registered with names, descriptions, and input schemas. However, descriptions are generic and lack LLM-optimization details (e.g., 'Run an Elasticsearch query' does not explain WHEN to use search vs other tools or WHAT format the query expects). Parameter descriptions are minimal or absent: the 'query' parameter in search has no description; 'document' in index_document lacks detail on expected structure; 'mappings' and 'settings' in create_index have descriptions but lack examples or format guidance. No output schemas are documented, LLMs cannot infer what fields will be returned or plan downstream tool calls. Error handling is present but generic (throws errors without recovery guidance). Security practices are not evident, no mention of how Elasticsearch credentials are managed or how permissions are enforced. Tool composition is reasonable (search, create_index, list_indices, index_document are distinct operations), but tools lack the context-heavy descriptions production tools exhibit.
Create a new Elasticsearch index
Index a document in Elasticsearch
List all Elasticsearch indices
Run an Elasticsearch query
Critical: No output schema documentation. LLMs cannot predict return structure, plan chaining, or extract required IDs.
High: Descriptions lack LLM-optimization context. 'Run an Elasticsearch query' does not specify when to use search, what query format is valid, or what the output contains. Should be: 'Execute a bool/match/range/aggregation query against an index. Returns matching documents with _id, _score, and _source fields. Use for full-text search, filtering, or analytics.'
High: Critical parameters lack descriptions. 'query' in search has no description (what structure? DSL? bool queries?). 'document' in index_document lacks detail on field requirements and structure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 42 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 39 | - | v1 |
Medium: No parameter constraints or examples. 'query' parameter in search should state it accepts Elasticsearch Query DSL (bool, match, range, etc.). Lack of constraints invites malformed queries from LLMs.
Medium: No error recovery guidance. Errors are thrown (e.g., 'Search failed: <message>') but do not guide the LLM on what to do next (retry? adjust query? check index exists?). Should follow pattern:recovery-guide.
Medium: Irreversible operations (create_index, index_document, implicitly delete-via-search) lack confirmation or dry-run capability. Agents can accidentally create unwanted indices or overwrite documents without warning.
Low: Credentials/Elasticsearch URL passed as command-line argument. While this avoids leaking secrets as tool parameters, no documentation on how to securely inject this in production (env vars, vault, etc.).